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

Carl Meyer carl at oddbird.net
Tue Aug 18 20:22:49 CEST 2015

On 08/18/2015 12:16 PM, Alexander Belopolsky wrote:
> On Tue, Aug 18, 2015 at 1:35 PM, Carl Meyer <carl at oddbird.net
> <mailto: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.

That's lovely :-)

But I still think I could figure out whether to use later=True or
later=False more easily than I could figure out whether to use fold=True
or fold=False (in both cases really, but especially in the gap case).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150818/fcbadd34/attachment.sig>

More information about the Datetime-SIG mailing list