[Python-ideas] Backward-incompatible changes for Python 4

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Tue Apr 2 03:23:12 EDT 2019


Greg Ewing writes:

 > In light of that, I propose that the datetime module in Python 4
 > be changed so that April 1 does not exist:
 > 
 >  >>> m31 = date(2019, 3, 31)
 >  >>> m31 + timedelta(days = 1)
 > datetime.date(2019, 4, 2)
 > 
 > This would remove a large amount of confusion from the world, and
 > ensure that Python never receives any more backwards incompatible
 > changes.
 > 
 > Obviously, removing a whole day from the year will create problems

It's much simpler to rename April 1 to February 29.  (Bikeshed that 29
is already taken, and make it February 30 if you like.  And note that
February will maintain its uniqueness in an even more prominent way,
as the only temporally disconnected month!)




More information about the Python-ideas mailing list