|
Loading...
|
django-developers@googlegroups.com
[Prev] Thread [Next] | [Prev] Date [Next]
Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Łukasz Langa Thu Apr 05 01:00:58 2012
Wiadomość napisana przez Łukasz Rekucki w dniu 5 kwi 2012, o godz. 10:03:
> I' sure you meant:
>
> def greet(self):
> return {self.MALE: 'Hi, boy', self.FEMALE: 'Hi, girl.'}[self.gender]
>
> Unless you defined MALE/FEMALE as globals too :) Otherwise you'll get
> a NameError.
Also, a minor diversity note: in real life gender choice is not binary.
--
Best regards,
Łukasz Langa
Senior Systems Architecture Engineer
IT Infrastructure Department
Grupa Allegro Sp. z o.o.
http://lukasz.langa.pl/
+48 791 080 144
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en.
- Re: Proposal: upgrading the choices machinery for Django, (continued)
- Re: Proposal: upgrading the choices machinery for Django Adrian Holovaty 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Sean Brant 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Łukasz Langa 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Daniel Greenfeld 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Łukasz Langa 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Alex Ogier 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Stephen Burrows 2012/04/04
- Re: Proposal: upgrading the choices machinery for Django Łukasz Langa 2012/04/05
Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Thomas Guettler 2012/04/05
- Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Łukasz Rekucki 2012/04/05
- Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Łukasz Langa 2012/04/05 <=
- Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Thomas Guettler 2012/04/05
- Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Alex Ogier 2012/04/05
- Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Łukasz Rekucki 2012/04/05
- Re: Ticket for Docs improvement Was: Proposal: upgrading the choices machinery for Django Alex Ogier 2012/04/05