summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-08-08 05:42:54 (GMT)
committerGitHub <noreply@github.com>2019-08-08 05:42:54 (GMT)
commit662db125cddbca1db68116c547c290eb3943d98e (patch)
tree06151487dbe4493ef173dd8cc378f4b6cf5c0e4a /Misc
parent4c69be22df3852f17873a74d015528d9a8ae92d6 (diff)
downloadcpython-662db125cddbca1db68116c547c290eb3943d98e.zip
cpython-662db125cddbca1db68116c547c290eb3943d98e.tar.gz
cpython-662db125cddbca1db68116c547c290eb3943d98e.tar.bz2
bpo-37685: Fixed __eq__, __lt__ etc implementations in some classes. (GH-14952)
They now return NotImplemented for unsupported type of the other operand.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2019-07-26-00-12-29.bpo-37685.TqckMZ.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-07-26-00-12-29.bpo-37685.TqckMZ.rst b/Misc/NEWS.d/next/Library/2019-07-26-00-12-29.bpo-37685.TqckMZ.rst
new file mode 100644
index 0000000..d1179a6
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-07-26-00-12-29.bpo-37685.TqckMZ.rst
@@ -0,0 +1,4 @@
+Fixed ``__eq__``, ``__lt__`` etc implementations in some classes. They now
+return :data:`NotImplemented` for unsupported type of the other operand.
+This allows the other operand to play role (for example the equality
+comparison with :data:`~unittest.mock.ANY` will return ``True``).