Happy Christmas Pythoneers

P

Paddy

After quite enjoying participating in the group in 2007, I'd like to
wish you all a Merry Xmas.

- Paddy.
 
S

Steven D'Aprano

And if you're not a Christian it would be Type Error bug.


Not at all: if you inherit from any of the many pagan (that is, non-
Christian) religions that celebrated midwinter festivals, or the old
Roman Saturnalia festival that Christianity itself inherited Christmas
from, you shouldn't raise an exception.

Alternatively, you can delegate to any object that understands about
holidays, parties, celebrations and gift-giving.

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):
kiss(person)
else:
shake(person.hand)
 
M

mensanator

Not at all: if you inherit from any of the many pagan (that is, non-
Christian) religions that celebrated midwinter festivals, or the old
Roman Saturnalia festival that Christianity itself inherited Christmas
from, you shouldn't raise an exception.

Alternatively, you can delegate to any object that understands about
holidays, parties, celebrations and gift-giving.


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?
 
H

Hendrik van Rooyen

Zentrader said:
And if you're not a Christian it would be Type Error bug. Anyway,
happy New Years as well to all in the group.

Followers of Shushla celebrate the new year at the time of the spring
equinox.

This has been the cause of bloody wars between the Northern and
Southern sects, as She was born in Equador.

- Hendrik
 
S

Steven D'Aprano

Followers of Shushla celebrate the new year at the time of the spring
equinox.

This has been the cause of bloody wars between the Northern and
Southern sects, as She was born in Equador.


I wish you were taking the mickey, but I suspect you're not...

Got any more information? Googling doesn't come up with anything that
looks promising.
 
S

Steven D'Aprano

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.
 
G

Gabriel Genellina

En Thu, 27 Dec 2007 02:32:54 -0300, (e-mail address removed)
On Dec 26, 9:43 pm, Steven D'Aprano


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.
 
R

Robert Kern

Gabriel said:
En Thu, 27 Dec 2007 02:32:54 -0300, (e-mail address removed)


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.

Although the coding standards in most shops prevent you from querying the
is_appropriate_sex interface if you create that particular person instance.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
 
A

Aahz

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.

Then again, some instances define it as

person.is_appropriate_sex = True
 
H

Hendrik van Rooyen

I wish you were taking the mickey, but I suspect you're not...

Got any more information? Googling doesn't come up with anything that
looks promising.

The reason Google does not show anything is because I have not allowed
them a link into my cerebral cortex - yet.

Compliments of the season to A/all on the group.

- Hendrik
 
M

Marc 'BlackJack' Rintsch

Then again, some instances define it as

person.is_appropriate_sex = True

And sometimes it's not that simple but a property and connected with the
caller's history of `champagne.drink()` calls. The `person.is_pretty`
property is most definitely linked to that call history in many instances.

Ciao,
Marc 'BlackJack' Rintsch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top