[Python-ideas] Please reconsider the Boolean evaluation of midnight

Antoine Pitrou solipsis at pitrou.net
Thu Mar 6 11:39:20 CET 2014


Le 06/03/2014 00:22, Alexander Belopolsky a écrit :
>
> No.  It is False because it equals False:
>
>  >>> 0 == False
> True

I think this is a misunderstanding on your part. Python considered 0 as 
false-y before the bool type was introduced in the language. Actually, 0 
was *the* spelling of "false" before "False" was introduced.

 > I think proponents of bool(time(0)) == True view it as a container of
 > hours, minutes and seconds.

No, they view it as an abstraction around the common concept of time.

Regards

Antoine.




More information about the Python-ideas mailing list