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

Alexander Belopolsky report at bugs.python.org
Thu Mar 6 03:33:52 CET 2014


Alexander Belopolsky added the comment:

> 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.

I should have added that dt is a datetime instance and therefore dt.time() is None is always false.

----------

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


More information about the Python-bugs-list mailing list