[Python-ideas] Please reconsider the Boolean evaluation of midnight
Shai Berger
shai at platonix.com
Wed Mar 5 11:59:40 CET 2014
On Wednesday 05 March 2014 12:44:07 Paul Moore wrote:
>
> I actually find the idea of truth-testing a value that's expected to
> have a type that is always true *more* unintuitive than an explicit
> "is not None", so I'd fix the above code regardless of what the truth
> value of midnight is.
>
I can appreciate this point of view, but I think it is not the position
generally taken by Python (if it were, Boolean evaluation of an object of a
type that is always true would have raised an exception).
Shai.
More information about the Python-ideas
mailing list