[Python-ideas] Please reconsider the Boolean evaluation of midnight
Terry Reedy
tjreedy at udel.edu
Thu Mar 6 00:20:45 CET 2014
On 3/5/2014 4:10 PM, Alex Gaynor wrote:
> First, I'd like to dispense with the notion that ``if foo`` is somehow a bad
> practice.
It is when one means 'if foo is not None' as it is as fragile, and in
the same way, in the same way as using 'a and b or c' as a conditional
expression.
> This is an EXTREMELY common practice as a shorthand for checking for
> None, a great many people consider it more idiomatic,
In what universe. I was originally for changing datetime, but seems the
issue being used as a vehicle to justify and promote buggy programming
has changed my mind.
--
Terry Jan Reedy
More information about the Python-ideas
mailing list