This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Andreas.Pelme
Recipients Andreas.Pelme, Lakin.Wecker, belopolsky, eric.araujo, georg.brandl, gwrtheyrn, lemburg, r.david.murray, shai, tim.peters
Date 2014-03-04.20:14:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I agree with Danilo and Shai -- this behavior very surprising. I deal with datetimes a lot, and this bug has bitten me a number of times.

I cannot really think of a single case where "if timeobj:" is useful with the current behavior. It results in a check for "is timeobj midnight or false?"

Would that ever be useful in practice? If you are indeed checking for midnight, surely "if timeobj == time(0, 0):" would be the most explicit and obvious way to do it?
Date User Action Args
2014-03-04 20:14:18Andreas.Pelmesetrecipients: + Andreas.Pelme, lemburg, tim.peters, georg.brandl, belopolsky, eric.araujo, r.david.murray, gwrtheyrn, Lakin.Wecker, shai
2014-03-04 20:14:17Andreas.Pelmesetmessageid: <>
2014-03-04 20:14:17Andreas.Pelmelinkissue13936 messages
2014-03-04 20:14:17Andreas.Pelmecreate