On Thu, Nov 3, 2016 at 2:09 PM, Paul G <[email protected]> wrote:

> I don't understand why it must be the case that something is considered an
> "inter-zone" comparison whenever `t.tzinfo is not s.tzinfo`. What is the
> objection to using `t.tzinfo != s.tzinfo` as the criterion? In general
> these will be equivalent, but using __eq__ allows time zone providers to
> determine what is considered an "inter-zone" comparison.


This was probably the case of premature optimization.  I cannot think of
any valid reason, but datetime comparisons have always compared tzinfos
using "is" rather than "==" operator.   We can probably still make a
change, but it should be implemented and thoroughly tested first.  Please
open a bug report.
_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to