<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 1, 2015 at 12:58 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And given that we already have total ordering problems, from that perspective I could live with declaring that two datetimes that differ only in the fold are unequal. (Hm, aren't they already unequal because their utcoffset() differs?)</blockquote></div><br>They are not unequal because their tzinfos are the same.  In this case __sub__ (and as a consequence __eq__) does not call utcoffset() to follow the rules of classic arithmetic.  My new suggestion is to use timeline arithmetic whenever fold=1 datetime instance is involved.  This should not break any programs that don't encounter fold=1 instances and in effect will make fold=1 instances behave similar to how their timezone.utc equivalents behave now.</div></div>