Skip to content

Commit 72fcd14

Browse files
bpo-42840: Document providing kwargs to type. (#24173)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
1 parent dbfabcc commit 72fcd14

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Doc/library/functions.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ are always available. They are listed here in alphabetical order.
17131713

17141714

17151715
.. class:: type(object)
1716-
type(name, bases, dict)
1716+
type(name, bases, dict, **kwds)
17171717
17181718
.. index:: object: type
17191719

@@ -1742,6 +1742,13 @@ are always available. They are listed here in alphabetical order.
17421742

17431743
See also :ref:`bltin-type-objects`.
17441744

1745+
Keyword arguments provided to the three argument form are passed to the
1746+
appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`)
1747+
in the same way that keywords in a class
1748+
definition (besides *metaclass*) would.
1749+
1750+
See also :ref:`class-customization`.
1751+
17451752
.. versionchanged:: 3.6
17461753
Subclasses of :class:`type` which don't override ``type.__new__`` may no
17471754
longer use the one-argument form to get the type of an object.

0 commit comments

Comments
 (0)