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

Felipe Ochoa felipe.nospam.ochoa at gmail.com
Tue Aug 18 18:43:06 CEST 2015

To me the problem is that in my mind both of the repeated times are part of “the
fold” so `fold=True` intuitively to me means the same as `is_ambiguous=True`.
What if we merge the proposals and set the attribute to `last_fold`? Then the
timeline looks like:
+--+ (time flows counter-
\ | clockwise in the
\| loop)
---------------->+-----------------> last_fold=False last_fold=False

Separately, the glossary can be found at:
https://github.com/felipeochoa/dt2/blob/master/glossary.md (where there is also
a WIP Duration object)

On 18 August 2015 at 12:30, Tim Peters < tim.peters at gmail.com > wrote:
>> Proposal: name the flag ‘fold’, reverse it’s sense, and be done with it
>> (then move on to PEP 500). So fold defaults to False.

> I like “fold”. It is short, uses the word from the problem domain

I suppose I’m being dense, but what does fold=True mean? Clearly it
means “this is an ambiguous time” - but _which_ one is intended? The
earlier or the later?

> and I think the ascii-art below can serve as the mnemonic:
> fold=True
> +---+
> \ |
> \ |
> fold=False \| fold=False
> ------------->+-----------

Same question, alas - I don’t see what the diagram is trying to tell
me, apart from that there’s some kind of 2-to-1 relationship.

>From Guido’s “reverse its sense” I’m guessing fold=True means “this is
the later of two ambiguous times”, but there’s nothing in the word
“fold” on its own to suggest that. It’s only a deduction from knowing
what first=True meant before (the earlier of two ambiguous times)
coupled with “reverse its sense”.

Or does fold=True mean something else?

Related: would people have been happier with the obvious “first” if
it had been named “_first” instead? For the most part it’s an
attribute intended to be set “by magic” by various timezone
operations, not something most users need to know anything about
(indeed, for most users it would qualify as an “attractive nuisance”).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150818/9704786b/attachment-0001.html>

More information about the Datetime-SIG mailing list