summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-03-01 23:30:42 (GMT)
committerGitHub <noreply@github.com>2021-03-01 23:30:42 (GMT)
commit7101d152f9789ad243912c00349d5da657b217fd (patch)
tree83af50c36a24c5e9e91d07a84a30eecb7ddfb717 /Doc/library/functions.rst
parent6900a515c8410795f9a8ef2ad38740847a919b6d (diff)
downloadcpython-7101d152f9789ad243912c00349d5da657b217fd.zip
cpython-7101d152f9789ad243912c00349d5da657b217fd.tar.gz
cpython-7101d152f9789ad243912c00349d5da657b217fd.tar.bz2
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 72fcd14a82369ed32a5846d76f50e3026cf4eec2) Co-authored-by: Erik Soma <stillusingirc@gmail.com>
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 9d67d80..00d40d6 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1671,7 +1671,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
@@ -1700,6 +1700,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.