Chris Wilcox <pyt...@crwilcox.com> added the comment:
As %m and %d denote zero padded forms of month and day it seems to me this shouldn't match. Executing a small c program `char* ret = strptime("181223", "%Y%m%d", &tm);` confirms that this is considered invalid to c. The datetime docs indicate that the behavior should match C89 so I would expect python to return ValueError here as well. https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior ---------- components: +Library (Lib) -Tests nosy: +crwilcox versions: +Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33941> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com