diff options
author | Meador Inge <meadori@gmail.com> | 2012-03-05 04:02:17 (GMT) |
---|---|---|
committer | Meador Inge <meadori@gmail.com> | 2012-03-05 04:02:17 (GMT) |
commit | 104f18977fc23b7df415fda1bbb7125feece553f (patch) | |
tree | 2094f4c14262f2ae49016724a093ba8937028075 /Lib/_weakrefset.py | |
parent | 94c2d6df544abd9eb0601cb5387774599cf0cdf1 (diff) | |
download | cpython-104f18977fc23b7df415fda1bbb7125feece553f.zip cpython-104f18977fc23b7df415fda1bbb7125feece553f.tar.gz cpython-104f18977fc23b7df415fda1bbb7125feece553f.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 ff613e6..43f9a6e 100644 --- a/Lib/_weakrefset.py +++ b/Lib/_weakrefset.py @@ -154,17 +154,17 @@ class WeakSet(object): 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__): |