[Datetime-SIG] Another approach to 495's glitches

Tim Peters tim.peters at gmail.com
Sun Sep 6 03:38:47 CEST 2015


[Tim]
>> B. Comparison.
>> B1. __eq__.  If either operand has fold=1, return False.

[Alex]
> Congratulations, you've just reinvented a NAN.   Sorry, but I won't
> sacrifice the reflexivity of == for any other invariant.

Neither would I.  I suspect you read hastily and missed that this
quote, in context, is in the "interzone" section.  It only applies to
comparisons between _different_ zones.  Of course x == x would return
True for any datetime x.  That case was in the earlier "intrazone"
section, where it just said "do what the first stab at 495 did"
(ignore fold entirely for intrazone comparisons).


More information about the Datetime-SIG mailing list