diff options
author | Erik Soma <stillusingirc@gmail.com> | 2021-03-01 23:21:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-01 23:21:04 (GMT) |
commit | 72fcd14a82369ed32a5846d76f50e3026cf4eec2 (patch) | |
tree | 32d5e38176769fb55e166d4fdb1ac36c15f09699 | |
parent | dbfabcc0c306742e34b9b0e162c63ccebe9d2b05 (diff) | |
download | cpython-72fcd14a82369ed32a5846d76f50e3026cf4eec2.zip cpython-72fcd14a82369ed32a5846d76f50e3026cf4eec2.tar.gz cpython-72fcd14a82369ed32a5846d76f50e3026cf4eec2.tar.bz2 |
bpo-42840: Document providing kwargs to type. (#24173)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
-rw-r--r-- | Doc/library/functions.rst | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 370decc..2a6af95 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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. |