3 Nov
2016
3 Nov
'16
6:24 p.m.
On Thu, Nov 3, 2016 at 2:09 PM, Paul G
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.