summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2016-06-03 00:06:13 (GMT)
committerR David Murray <rdmurray@bitdance.com>2016-06-03 00:06:13 (GMT)
commit3bad04ca62bba6d2a83f1c1f42d8840103aef015 (patch)
tree6cc6fba8823258399d68964810c70413d90c043a /Doc/reference
parent1b50c4d6978f0414b2b2111d1c3b4bfb10fffadb (diff)
parentdd4fcf52f41116479c8d337b0dcfae2287d6ae4d (diff)
downloadcpython-3bad04ca62bba6d2a83f1c1f42d8840103aef015.zip
cpython-3bad04ca62bba6d2a83f1c1f42d8840103aef015.tar.gz
cpython-3bad04ca62bba6d2a83f1c1f42d8840103aef015.tar.bz2
Merge: #26829: Clarify that namespace is copied to a new __dict__ in instance creation.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/datamodel.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index c0b4930..c22c8ad 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1735,6 +1735,11 @@ After the class object is created, it is passed to the class decorators
included in the class definition (if any) and the resulting object is bound
in the local namespace as the defined class.
+When a new class is created by ``type.__new__``, the object provided as the
+namespace parameter is copied to a standard Python dictionary and the original
+object is discarded. The new copy becomes the :attr:`~object.__dict__` attribute
+of the class object.
+
.. seealso::
:pep:`3135` - New super