[Python-Dev] Got None. Maybe Some?
Tim Peters
tim.one at comcast.net
Mon Dec 22 12:50:24 EST 2003
[Guido]
> None inherits most of its semantics from C's NULL -- that's where None
> being false comes from.
I know that's where it came from, but Python adds its own twists. If it
really wanted to act like C's NULL, then
print >> None, "oops"
should segfault <wink>. There's nothing "wrong" about None evaluating to
false in a Boolean context, it's simply one choice that *could* have made --
and better than most.
More information about the Python-Dev
mailing list