@@ -58,7 +58,7 @@ ABC Inherits Abstract Methods Mixin M
5858 ``insert ``, ``remove ``, and ``__iadd__ ``
5959 and ``__len__ ``
6060
61- :class:`Set` \(1) \(2) :class:`Sized`, ``__len__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``,
61+ :class:`Set` :class:`Sized`, ``__len__``, ``__le__``, ``__lt__``, ``__eq__``, ``__ne__``,
6262 :class: `Iterable `, ``__iter__ ``, and ``__gt__ ``, ``__ge__ ``, ``__and__ ``, ``__or__ ``
6363 :class: `Container ` ``__contains__ `` ``__sub__ ``, ``__xor__ ``, and ``isdisjoint ``
6464
@@ -118,6 +118,13 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
118118 semantics are fixed), redefine :meth: `__le__ ` and
119119 then the other operations will automatically follow suit.
120120
121+ (3)
122+ The :class: `Set ` mixin provides a :meth: `_hash ` method to compute a hash value
123+ for the set; however, :meth: `__hash__ ` is not defined because not all sets
124+ are hashable or immutable. To add set hashabilty using mixins,
125+ inherit from both :meth: `Set ` and :meth: `Hashable `, then define
126+ ``__hash__ = Set._hash ``.
127+
121128(For more about ABCs, see the :mod: `abc ` module and :pep: `3119 `.)
122129
123130
0 commit comments