How to do this in Python...
Erik Max Francis
max at alcyone.com
Thu Jan 23 22:22:36 EST 2003
Aahz wrote:
> That seems a bit odd to me. Why test against None, instead of simply
> "if not match"?
In this particular case, it doesn't much matter, since you're guaranteed
any non-None match object will evaluate to true. In general, though, if
you know that a value might be "something" or None, an explicit test
against None is warranted since that "something" may or may not evaluate
as false itself.
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ No man who needs a monument ever ought to have one.
\__/ Nathaniel Hawthorne
Crank Dot Net / http://www.crank.net/
Cranks, crackpots, kooks, & loons on the Net.
More information about the Python-list
mailing list