homepage

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 belopolsky
Recipients Sriram Rajagopalan, belopolsky, gregory.p.smith
Date 2016年02月29日.22:51:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1456786290.35.0.954487768559.issue26460@psf.upfronthosting.co.za>
In-reply-to
Content
This is not no more bug than
>>> from datetime import *
>>> datetime.strptime('0228', '%m%d')
datetime.datetime(1900, 2, 28, 0, 0)
Naturally, as long as datetime.strptime('0228', '%m%d') is the same as datetime.strptime('19000228', '%Y%m%d'), datetime.strptime('0229', '%m%d') should raise a ValueError as long as datetime.strptime('19000229', '%m%d') does.
The only improvement, I can think of in this situation is to point the user to time.strptime() in the error message. The time.strptime method works just fine in the recent versions (see issue 14157.)
>>> time.strptime('0229', '%m%d')[1:3]
(2, 29)
History
Date User Action Args
2016年02月29日 22:51:30belopolskysetrecipients: + belopolsky, gregory.p.smith, Sriram Rajagopalan
2016年02月29日 22:51:30belopolskysetmessageid: <1456786290.35.0.954487768559.issue26460@psf.upfronthosting.co.za>
2016年02月29日 22:51:30belopolskylinkissue26460 messages
2016年02月29日 22:51:30belopolskycreate

AltStyle によって変換されたページ (->オリジナル) /