[issue26460] datetime.strptime without a year fails on Feb 29

Gregory P. Smith report at bugs.python.org
Mon Mar 2 18:33:48 EST 2020


Gregory P. Smith <greg at krypto.org> added the comment:

I _doubt_ there is code expecting the default year when unspecified to actually be 1900.

Change that default to any old year with a leap year (1904?) and it'll still (a) stand out as a special year that can be looked up should it wind up being _used_ as the year in code somewhere and (b) not fail every four years for people just parsing to extract Month + Day values.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26460>
_______________________________________


More information about the Python-bugs-list mailing list