Author: Ronan Lamy <[email protected]>
Branch: py3.6
Changeset: r97823:3f4502352ebe
Date: 2019-10-20 12:49 +0100
http://bitbucket.org/pypy/pypy/changeset/3f4502352ebe/
Log: Backport 3.7.5 changes to timedelta.__eq__ and time.__eq__
(bpo-37579)
diff --git a/lib-python/3/datetime.py b/lib-python/3/datetime.py
--- a/lib-python/3/datetime.py
+++ b/lib-python/3/datetime.py
@@ -609,7 +609,7 @@
if isinstance(other, timedelta):
return self._cmp(other) == 0
else:
- return False
+ return NotImplemented
def __le__(self, other):
if isinstance(other, timedelta):
@@ -1144,7 +1144,7 @@
if isinstance(other, time):
return self._cmp(other, allow_mixed=True) == 0
else:
- return False
+ return NotImplemented
def __le__(self, other):
if isinstance(other, time):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit