Happy Christmas Pythoneers
Steven D'Aprano
steven at REMOVE.THIS.cybersource.com.au
Thu Dec 27 02:47:29 EST 2007
On Wed, 26 Dec 2007 21:32:54 -0800, mensanator at aol.com wrote:
>> > Anyway, happy New Years as well to all in the group.
>>
>> 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?
Generally instances use:
person.is_appropriate_sex = person.is_opposite_sex
but some instances define it as:
person.is_appropriate_sex = not person.is_opposite_sex
It's an implementation detail, you shouldn't worry about it.
--
Steven
More information about the Python-list
mailing list