diff options
author | Meador Inge <meadori@gmail.com> | 2012-03-05 04:15:38 (GMT) |
---|---|---|
committer | Meador Inge <meadori@gmail.com> | 2012-03-05 04:15:38 (GMT) |
commit | 653f932eff642065061f36693d59e10507523a6f (patch) | |
tree | 5184960fd4830276a5fdeca31af7acb449ccf6d3 /Lib/_weakrefset.py | |
parent | 9c47ac05d13971d1e6ee2d74afad8d1b57e5b2ac (diff) | |
download | cpython-653f932eff642065061f36693d59e10507523a6f.zip cpython-653f932eff642065061f36693d59e10507523a6f.tar.gz cpython-653f932eff642065061f36693d59e10507523a6f.tar.bz2 |
Issue #14195: Make WeakSet.__lt__ and WeakSet.__gt__ irreflexive.
Diffstat (limited to 'Lib/_weakrefset.py')
-rw-r--r-- | Lib/_weakrefset.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/_weakrefset.py b/Lib/_weakrefset.py index 1f41841..6a98b88 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -152,17 +152,17 @@ class WeakSet: def issubset(self, other): return self.data.issubset(ref(item) for item in other) - __lt__ = issubset + __le__ = issubset - def __le__(self, other): - return self.data <= set(ref(item) for item in other) + def __lt__(self, other): + return self.data < set(ref(item) for item in other) def issuperset(self, other): return self.data.issuperset(ref(item) for item in other) - __gt__ = issuperset + __ge__ = issuperset - def __ge__(self, other): - return self.data >= set(ref(item) for item in other) + def __gt__(self, other): + return self.data > set(ref(item) for item in other) def __eq__(self, other): if not isinstance(other, self.__class__): |