Clarify that Set._from_iterable is not required to be a classmethod. (GH-23272) (GH-23450)

This commit is contained in:
Miss Islington (bot) 2020-11-21 12:20:26 -08:00 committed by GitHub
parent 3b5b1c82a3
commit 89d74d0acd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 1 deletions

View file

@ -291,7 +291,7 @@ Notes on using :class:`Set` and :class:`MutableSet` as a mixin:
: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
constructor signature, you will need to override :meth:`_from_iterable`
with a classmethod that can construct new instances from
with a classmethod or regular method that can construct new instances from
an iterable argument.
(2)