]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42840: Document providing kwargs to type. (#24173)
authorErik Soma <stillusingirc@gmail.com>
Mon, 1 Mar 2021 23:21:04 +0000 (18:21 -0500)
committerGitHub <noreply@github.com>
Mon, 1 Mar 2021 23:21:04 +0000 (15:21 -0800)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Doc/library/functions.rst

index 370decc51087f2b3583b23862c1c7efbb67369a0..2a6af95cdf9efa615ef954c3f8b609270077e39a 100644 (file)
@@ -1713,7 +1713,7 @@ are always available.  They are listed here in alphabetical order.
 
 
 .. class:: type(object)
-           type(name, bases, dict)
+           type(name, bases, dict, **kwds)
 
    .. index:: object: type
 
@@ -1742,6 +1742,13 @@ are always available.  They are listed here in alphabetical order.
 
    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
       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.