Message212738
| 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 |
<1393964057.99.0.814567478828.issue13936@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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? |
|