[Python-Dev] PEP 495 Was: PEP 498: Literal String Interpolation is ready for pronouncement

Terry Reedy tjreedy at udel.edu
Sat Sep 12 00:45:29 CEST 2015


On 9/11/2015 2:36 PM, Alexander Belopolsky wrote:
>
> On Tue, Sep 8, 2015 at 8:27 PM, Guido van Rossum <guido at python.org
> <mailto:guido at 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



More information about the Python-Dev mailing list