[Python-ideas] bool(datetime.time(0, 0))

Ethan Furman ethan at stoneleaf.us
Tue May 8 20:46:25 CEST 2012


Terry Reedy wrote:
> If the stdlib had an Elevation class, we could have the same argument 
> about whether Elevation(0) should be True, like all others, or False.

I liked your explanation, Terry.

For me, it comes down to the something vs. nothing argument:  empty 
containers, the number 0 (when it represents Nothing), False, etc., are 
all instances of nothing.

I do not see midnight as a representation of nothing.

I would probably go with Something for an elevation of zero as well.

But not money.  ;)  positive is money I have, negative is money I owe, 
and zero is nothing.

~Ethan~



More information about the Python-ideas mailing list