summaryrefslogtreecommitdiff
path: root/Lib/collections
diff options
context:
space:
mode:
authorAndrew Svetlov <andrew.svetlov@gmail.com>2012-11-01 13:31:12 +0200
committerAndrew Svetlov <andrew.svetlov@gmail.com>2012-11-01 13:31:12 +0200
commitb904e4256e739ccd40b634842a248fe6a9971ad9 (patch)
tree22c87700b83ab3c4617f06ffd625d8711835af2c /Lib/collections
parent5e5bbfb69b5c0eb2f72c3e1ec702f9363defe05f (diff)
parentbcac6ad1f3776fed63ce5de57b6182352efcb2ca (diff)
downloadcpython-git-b904e4256e739ccd40b634842a248fe6a9971ad9.tar.gz
Merge issue #16373: Prevent infinite recursion for ABC Set class operations.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/collections')
-rw-r--r--Lib/collections/abc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/collections/abc.py b/Lib/collections/abc.py
index d17cfdcd9b..c23b7ddef0 100644
--- a/Lib/collections/abc.py
+++ b/Lib/collections/abc.py
@@ -200,12 +200,12 @@ class Set(Sized, Iterable, Container):
def __gt__(self, other):
if not isinstance(other, Set):
return NotImplemented
- return other < self
+ return other.__lt__(self)
def __ge__(self, other):
if not isinstance(other, Set):
return NotImplemented
- return other <= self
+ return other.__le__(self)
def __eq__(self, other):
if not isinstance(other, Set):