This commit is contained in:
Raymond Hettinger 2008-05-23 17:34:34 +00:00
parent f6901e909f
commit 96b424062b
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
Since some set operations create new sets, the default mixin methods need Since some set operations create new sets, the default mixin methods need
a way to create new instances from an iterable. The class constructor is a way to create new instances from an iterable. The class constructor is
assumed to have a signature in the form ``ClassName(iterable)``. assumed to have a signature in the form ``ClassName(iterable)``.
That assumption is factored-out to a singleinternal classmethod called That assumption is factored-out to an internal classmethod called
:meth:`_from_iterable` which calls ``cls(iterable)`` to produce a new set. :meth:`_from_iterable` which calls ``cls(iterable)`` to produce a new set.
If the :class:`Set` mixin is being used in a class with a different If the :class:`Set` mixin is being used in a class with a different
constructor signature, you will need to override :meth:`from_iterable` constructor signature, you will need to override :meth:`from_iterable`