summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2016-07-31 02:42:49 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2016-07-31 02:42:49 (GMT)
commit607e1c4c44131fd77e714620d127151149152345 (patch)
tree5a41f9db24f87a95c28c8f74f91f4870566b1dc9 /Doc/reference
parent07e2a0aba9683d22e5df54a7159bd366b8da3908 (diff)
downloadcpython-607e1c4c44131fd77e714620d127151149152345.zip
cpython-607e1c4c44131fd77e714620d127151149152345.tar.gz
cpython-607e1c4c44131fd77e714620d127151149152345.tar.bz2
Issue 27366: PEP 487 docs updates
- Porting note for type keyword arg handling - __init_subclass__ note regarding metaclass hint
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 075f096..1b70345 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1672,6 +1672,13 @@ class defining the method.
The default implementation ``object.__init_subclass__`` does
nothing, but raises an error if it is called with any arguments.
+ .. note::
+
+ The metaclass hint ``metaclass`` is consumed by the rest of the type
+ machinery, and is never passed to ``__init_subclass__`` implementations.
+ The actual metaclass (rather than the explicit hint) can be accessed as
+ ``type(cls)``.
+
.. versionadded:: 3.6