mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix guidance for subclassing collections.Set()
This commit is contained in:
parent
2dba23af71
commit
11cda47661
2 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ class Set(Sized, Iterable, Container):
|
|||
methods except for __contains__, __iter__ and __len__.
|
||||
|
||||
To override the comparisons (presumably for speed, as the
|
||||
semantics are fixed), all you have to do is redefine __le__ and
|
||||
semantics are fixed), redefine __le__ and __ge__,
|
||||
then the other operations will automatically follow suit.
|
||||
"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue