mirror of
https://github.com/python/cpython.git
synced 2025-09-29 03:35:31 +00:00
bpo-42840: Document providing kwargs to type. (GH-24173)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 72fcd14a82
)
Co-authored-by: Erik Soma <stillusingirc@gmail.com>
This commit is contained in:
parent
fabdd25fe5
commit
b3c1e2c493
1 changed files with 8 additions and 1 deletions
|
@ -1675,7 +1675,7 @@ are always available. They are listed here in alphabetical order.
|
||||||
|
|
||||||
|
|
||||||
.. class:: type(object)
|
.. class:: type(object)
|
||||||
type(name, bases, dict)
|
type(name, bases, dict, **kwds)
|
||||||
|
|
||||||
.. index:: object: type
|
.. index:: object: type
|
||||||
|
|
||||||
|
@ -1704,6 +1704,13 @@ are always available. They are listed here in alphabetical order.
|
||||||
|
|
||||||
See also :ref:`bltin-type-objects`.
|
See also :ref:`bltin-type-objects`.
|
||||||
|
|
||||||
|
Keyword arguments provided to the three argument form are passed to the
|
||||||
|
appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`)
|
||||||
|
in the same way that keywords in a class
|
||||||
|
definition (besides *metaclass*) would.
|
||||||
|
|
||||||
|
See also :ref:`class-customization`.
|
||||||
|
|
||||||
.. versionchanged:: 3.6
|
.. versionchanged:: 3.6
|
||||||
Subclasses of :class:`type` which don't override ``type.__new__`` may no
|
Subclasses of :class:`type` which don't override ``type.__new__`` may no
|
||||||
longer use the one-argument form to get the type of an object.
|
longer use the one-argument form to get the type of an object.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue