<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 14, 2015 at 4:08 PM, Random832 <span dir="ltr"><<a href="mailto:random832@fastmail.com" target="_blank">random832@fastmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Mon, Sep 14, 2015, at 15:48, Alexander Belopolsky wrote:<br>
> On Mon, Sep 14, 2015 at 3:44 PM, Random832 <<a href="mailto:random832@fastmail.com">random832@fastmail.com</a>><br>
> wrote:<br>
><br>
> > It is an<br>
> > invariant that is true today, and therefore which you can't rely on any<br>
> > of the consumers of this 12 years old widely deployed code not to assume<br>
> > will remain true.<br>
> ><br>
><br>
> Sorry, this sentence does not parse.  You are missing a "not" somewhere.<br>
<br>
</div></div>Nope. I am asserting that:<br>
<br>
This invariant is true today.<br></blockquote><div><br></div><div>You've never specified "this invariant", but I'll assume you are talking about "a < b implies a.astimezone(UTC) < b.astimezone(UTC)."  This is *not* true today:</div><div><br></div><div><div>>>> from datetime import *</div><div>>>> from datetimetester import Eastern</div><div>>>> UTC = timezone.utc</div><div>>>> a = datetime(2002, 4, 7, 1, 40, tzinfo=Eastern)</div><div>>>> b = datetime(2002, 4, 7, 2, 20, tzinfo=Eastern)</div><div>>>> a < b</div><div>True</div><div>>>> a.astimezone(UTC) < b.astimezone(UTC)</div><div>False</div></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Therefore, it is likely that at least some consumers of datetime will<br>
assume it is true.<br></blockquote><div><br></div><div>Obviously, if Random832 is a real person, the last statement is true.  This does not make the assumption true, just proves that at least one user is confused about the current behavior. :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Therefore, you cannot rely on there not being any consumers which assume<br>
it will remain true.<br></blockquote><div><br></div><div>That's where we are now.  Some users make baseless assumptions.  This will probably remain true. :-(</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
It's awkward, since when I go back to analyze it it turns out that the<br>
"not" after 'code' actually technically modifies "any" earlier in the<br>
sentence, but the number of negatives is correct.</blockquote><div><br></div><div>Writing in shorter sentences may help.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> (Though, it actually<br>
works out even without that change, since the question of *which*<br>
consumers rely on the invariant is unknown.)<br>
</blockquote></div><br></div><div class="gmail_extra">True.  We will never know how many users rely on false assumptions.</div></div>