mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Clarify that Set._from_iterable is not required to be a classmethod. (GH-23272) (GH-23450)
This commit is contained in:
parent
3b5b1c82a3
commit
89d74d0acd
2 changed files with 57 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue