Donald Stufft added the comment: Infact I would argue that ``if dt.time() != datetime.time(0):`` *would* be an improvement to that code because it is more accurately describing what you actually intend in the same way that ``if time_or_none is None`` would be an improvement to that code because it is more accurately describing what you actually intend.
The difference being here that of the two examples I would argue that yours is more wrong because it's nonsensical for a time, especially one that you're considering to be the last of some set and not the first, to be a False value. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13936> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com