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 django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.