Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:

Looks like a bug to me:

>>> datetime.strptime("1", "%d")
datetime.datetime(1900, 1, 1, 0, 0)

>>> datetime.strptime('1', '%m')
datetime.datetime(1900, 1, 1, 0, 0)

both %m and %d accept single digits but they should not.

>>> datetime.strptime('123', '%m%d')
datetime.datetime(1900, 12, 3, 0, 0)

>>> import this
..
In the face of ambiguity, refuse the temptation to guess.

----------
assignee:  -> belopolsky
nosy: +belopolsky
stage:  -> unit test needed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to