[Datetime-SIG] PEP 495 (Local Time Disambiguation) is ready for pronouncement

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Aug 18 20:16:17 CEST 2015

On Tue, Aug 18, 2015 at 1:35 PM, Carl Meyer <carl at oddbird.net> wrote:

> One problem with both `fold` and `repeat` is that this flag (per the
> PEP) also influences resolution of "missing" times, in which case there
> is no fold (there's a gap) and no time is repeated.

I thought about this and my answer is that a "gap" is a negative "fold", so
in the fold you have t.replace(fold=True) - t.replace(fold=False) > 0 and
in the gap - the opposite t.replace(fold=True) - t.replace(fold=False) <
0.  While admittedly, this is an a posteriori justification, it makes
perfect sense to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150818/192abaa5/attachment-0001.html>

More information about the Datetime-SIG mailing list