Skip to content

Commit b3c1e2c

Browse files
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 72fcd14) Co-authored-by: Erik Soma <stillusingirc@gmail.com>
1 parent fabdd25 commit b3c1e2c

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
@@ -1675,7 +1675,7 @@ are always available. They are listed here in alphabetical order.
16751675

16761676

16771677
.. class:: type(object)
1678-
type(name, bases, dict)
1678+
type(name, bases, dict, **kwds)
16791679
16801680
.. index:: object: type
16811681

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

17051705
See also :ref:`bltin-type-objects`.
17061706

1707+
Keyword arguments provided to the three argument form are passed to the
1708+
appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`)
1709+
in the same way that keywords in a class
1710+
definition (besides *metaclass*) would.
1711+
1712+
See also :ref:`class-customization`.
1713+
17071714
.. versionchanged:: 3.6
17081715
Subclasses of :class:`type` which don't override ``type.__new__`` may no
17091716
longer use the one-argument form to get the type of an object.

0 commit comments

Comments
 (0)