mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Issue #16373: Prevent infinite recursion for ABC Set class operations.
This commit is contained in:
parent
eda1f4cf07
commit
bcac6ad1f3
2 changed files with 35 additions and 2 deletions
|
@ -184,12 +184,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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue