Checking against NULL will be eliminated?
Tom Zych
freethinker at pobox.com
Wed Mar 2 10:15:33 EST 2011
On Wed, 02 Mar 2011 06:37 -0800, "Carl Banks" <pavlovevidence at gmail.com>
wrote:
> The larger reason is that boolean evaluation in Python tries to be too
> many things: for some types is means "not zero", for some types it
> means "empty", and for some types it means "this is a value of this
> type as opposed to None". That causes conflicts when more than one of
> those tests makes sense for a given type, as it does with Elements.
You're right.
PEP 4000:
Proposing a new, backwards-incompatible version of Python in which
boolean evaluation
is not so overloaded.
Hmm, no, I don't think that will fly. We're stuck with it :(
Fortunately there are work-arounds for the cases that matter, as we've
seen.
Yay Python :)
--
Tom Zych / freethinker at pobox.com
Quidquid latine dictum sit, altum viditur.
More information about the Python-list
mailing list