A newbie question about class

Joshua Muskovitz joshm at taconic.net
Mon Feb 11 05:39:35 CET 2002

Heh, I knew I'd get someone's hackles up about this with my comment.  :-)

I was simply playing the strawman here.  I see nothing wrong with comparing
to None by using "is [not]".  I was merely responding to the previous
poster's comments which said basically "do it this way because unexpected
things can occur if you don't".  While I agree with this practice
(wholeheartedly!), I have a problem with the justification.  I would have
preferred "if you don't do it this way, and you get this sort of result,
look for this type of cause".  The distinction is that in the former, the
*reason* for doing it will not propagate.  This means that nobody will learn
from this lesson.

[ObTangent]  A friend was being interviewed for a programming job and was
asked this question (about code in C):


static int x;
void foo()
    printf("%i", x);

Will the call to foo produce 0, 1, -1, or Unknown?  (Choose one.)

The *right* answer should be "Always initialize your damn variables, and
don't count on the compiler being compliant, even if the language spec
explicitly defines the behavior.  Oh, and fire those on your staff who
don't."  But that wasn't one of the choices.

# Joshua Muskovitz
# joshm at taconic.net
def lyyrs(sig): return '-'.join(sig.split()+["ly y'rs"])
lyyrs('If you clean your gun without unloading it, will you be (a) ok, (b)
dead, or (c) Unknown?')

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

More information about the Python-list mailing list