[Python-Dev] Got None. Maybe Some? (original) (raw)
Tim Peters tim.one at comcast.net
Mon Dec 22 12:50:24 EST 2003
- Previous message: [Python-Dev] Got None. Maybe Some?
- Next message: [Python-Dev] Got None. Maybe Some?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[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 . 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.
- Previous message: [Python-Dev] Got None. Maybe Some?
- Next message: [Python-Dev] Got None. Maybe Some?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]