[pypy-issue] [issue1662] 'is' should be '==' in datetime.py

Brian Kearns tracker at bugs.pypy.org
Wed Dec 18 02:07:17 CET 2013


Brian Kearns <bdkearns at gmail.com> added the comment:

CPython _does_ have the equivalent of mytz is ottz, look at 
classify_two_utcoffsets (called from time_richcompare). Seems to do pointer 
compare on get_tzinfo_member(o1) and get_tzinfo_member(o2) before calling 
utcoffset.

In these cases, what is "more correct" is "what CPython does". If you have an 
issue with what CPython does, you should take it up with them. If you can 
demonstrate a test that passes on CPython and fails on PyPy, that would be a bug 
and a justification for modifying PyPy behavior.

The tests in the newest patch pass on both CPython and current PyPy, and so do 
not represent a bug.

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1662>
________________________________________


More information about the pypy-issue mailing list