[Python-Dev] PEP 495 accepted

Victor Stinner victor.stinner at gmail.com
Tue Sep 22 01:16:46 CEST 2015


More context ;-)

PEP 0495 -- Local Time Disambiguation

Abstract

This PEP adds a new attribute fold to instances of the datetime.time
and datetime.datetime classes that can be used to differentiate
between two moments in time for which local times are the same. The
allowed values for the fold attribute will be 0 and 1 with 0
corresponding to the earlier and 1 to the later of the two possible
readings of an ambiguous local time.

https://www.python.org/dev/peps/pep-0495/

Victor

2015-09-22 0:03 GMT+02:00 Guido van Rossum <guido at python.org>:
> Just so people know, over at the datetime-sig I've accepted PEP 495, which
> adds a fold flag to datetime objects to distinguish ambiguous times. This
> enables roundripping of conversions for those times where the local clock is
> moved backward (creating ambiguous times that could not be distinguished
> before).
>
> I would like to thank Alexander and Tim for their unrelenting work on this.
> The idea seems simple, but the details were excruciatingly hard to get
> right, given the strict backwards compatibility requirements.
>
> There may well be additional beneficial changes to the datetime module. The
> datetime-sig is now open for their discussion. However, proposals that break
> backwards compatibility are a waste of everybody's time, so be prepared to
> explain how your proposal does not break existing code that works under
> Python 3.5.
>
> --
> --Guido van Rossum (python.org/~guido)
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com
>


More information about the Python-Dev mailing list