mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Removed < <= > >= from the API. Implemented as comparisons of the
underlying dictionaries, there were no reasonable use cases (lexicographic sorting of a list of sets is somewhat esoteric). Frees the operators for other uses (such as strict subset and superset comparisons). Updated documentation and test suite accordingly.
This commit is contained in:
parent
bf935fde15
commit
e87ab3fefe
3 changed files with 5 additions and 23 deletions
|
@ -419,12 +419,12 @@ class TestOnlySetsInBinaryOps(unittest.TestCase):
|
|||
|
||||
def test_cmp(self):
|
||||
try:
|
||||
self.other < self.set
|
||||
self.other == self.set
|
||||
assert 0, "Comparison with non-set on left"
|
||||
except TypeError:
|
||||
pass
|
||||
try:
|
||||
self.set >= self.other
|
||||
self.set != self.other
|
||||
assert 0, "Comparison with non-set on right"
|
||||
except TypeError:
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue