diff options
author | R David Murray <rdmurray@bitdance.com> | 2016-06-03 00:06:13 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2016-06-03 00:06:13 (GMT) |
commit | 3bad04ca62bba6d2a83f1c1f42d8840103aef015 (patch) | |
tree | 6cc6fba8823258399d68964810c70413d90c043a /Doc/reference | |
parent | 1b50c4d6978f0414b2b2111d1c3b4bfb10fffadb (diff) | |
parent | dd4fcf52f41116479c8d337b0dcfae2287d6ae4d (diff) | |
download | cpython-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.rst | 5 |
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 |