[issue13936] RFE: change bool(datetime.time(0, 0, 0)) to evaluate as True

Donald Stufft report at bugs.python.org
Thu Mar 6 03:02:39 CET 2014


Donald Stufft added the comment:

If Midnight is considered the last moment of the day then it evaluating to false makes even less sense since the rationale given is "time is seconds since midnight". However if you're considering it the last moment then time would be "seconds since 12:01".

So in that case your example using midnight as false is even more confusing and even more wrong than not using ``is None`` on the conditional check. So maybe what you're attempting to do isn't contrived, but it doesn't actually help your position at all.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13936>
_______________________________________


More information about the Python-bugs-list mailing list