]> granicus.if.org Git - python/commitdiff
Fix guidance for subclassing collections.Set()
authorRaymond Hettinger <python@rcn.com>
Wed, 2 Jul 2014 23:30:52 +0000 (00:30 +0100)
committerRaymond Hettinger <python@rcn.com>
Wed, 2 Jul 2014 23:30:52 +0000 (00:30 +0100)
Doc/library/collections.rst
Lib/_abcoll.py

index 5bb3569dd2870dbce448dae60da3693edcc00cec..f00b870c91462d6b5676775d874278dc61cde9d9 100644 (file)
@@ -1028,7 +1028,7 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
 
 (2)
    To override the comparisons (presumably for speed, as the
-   semantics are fixed), redefine :meth:`__le__` and
+   semantics are fixed), redefine :meth:`__le__` and :meth:`__ge__`,
    then the other operations will automatically follow suit.
 
 (3)
index a943263320d2448257c7af83e6e81cdf4a479285..3d567e388e614a79cae7c88cbbf82da846c990d1 100644 (file)
@@ -143,7 +143,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.
     """