Happy Christmas Pythoneers

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu Dec 27 03:05:19 EST 2007


En Thu, 27 Dec 2007 02:32:54 -0300, mensanator at aol.com  
<mensanator at aol.com> escribió:

> On Dec 26, 9:43 pm, Steven D'Aprano
> <ste... at REMOVE.THIS.cybersource.com.au> wrote:

>> watch_fireworks()
>> try:
>>     champagne
>> except NameError:
>>     champagne = any_fizzy_alcoholic_drink_will_do()
>> champagne.drink()
>> shout("Happy New Years!!!")
>> for person in adults_nearby:
>>     if (person.is_appropriate_sex and person.is_pretty):
>
> Hey, my version of the person module doesn't have
> an is_appropriate_sex attribute, but an
> is_opposite_sex attribute instead. Is this a new version?

The default is_appropriate_sex implementation just happens to call  
is_opposite_sex, but this is an implementation detail and you should not  
rely on that, even more so if you didn't create that particular person  
instance.

-- 
Gabriel Genellina




More information about the Python-list mailing list