On 9/11/2015 2:36 PM, Alexander Belopolsky wrote:

On Tue, Sep 8, 2015 at 8:27 PM, Guido van Rossum <gu...@python.org
<mailto:gu...@python.org>> wrote:

    Now if only PEP 495 could be as easy... :-)


I think we nailed the hard issues there.   The next update will have a
restored hash invariant and == that satisfies all three axioms of
equivalency.

You are trying to sanely deal with politically mandated insanity.
I think it essential that you not introduce mathematical insanity, but whatever you do will be less than completely satisfactory.

 I am not making a better progress because I am debating
with myself about the fate of < and > comparisons.

Both should not be true for the same pair ;-)

> Cross-zone
comparisons strike in full force there as well because two times ordered
in UTC may appear in the opposite order in the local timezone where the
clock is moved back.

Comparison of absolute Newtonion time, represented by UTC, and local 'clock face' relative time with political hacks, are different concepts. If I get up at 8:00 AM (in Delaware, USA) and you get up at 8:01 wherever you are, which of us got up earlier? It depends on what 'earlier' means in the context and purpose of the question. Are we asking about wakeup discipline, or email exchange?

Pick whichever you and whoever consider to be most useful. Presuming that one can convert to UTC before comparision, I suspect the local version.

 Note that I saved the hash invariant and the
transitivity of == at the expense of the loss of trichotomy in
comparisons (we will have pairs of aware datetimes that are neither
equal nor < nor >).

That is the nature of partial orders.

 I don't think we need to change anything with < and
 > comparisons,

I am guessing that the comparisons are currently local.

but I am trying to come up with the arguments that will
at least be convincing to myself.  (I suspect that if I am not the only
one who worries about this, the other such people can be counted by the
values of the fold flag. :-)

Good luck ;-)

--
Terry Jan Reedy

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to