diff options
author | R David Murray <rdmurray@bitdance.com> | 2016-06-03 00:05:43 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2016-06-03 00:05:43 (GMT) |
commit | dd4fcf52f41116479c8d337b0dcfae2287d6ae4d (patch) | |
tree | f7513f21dd1fc32b0382ca1bc3f603a6146ea3e5 /Doc/reference | |
parent | a32c738ad700386c9c1ff6f528009106f7268c1f (diff) | |
download | cpython-dd4fcf52f41116479c8d337b0dcfae2287d6ae4d.zip cpython-dd4fcf52f41116479c8d337b0dcfae2287d6ae4d.tar.gz cpython-dd4fcf52f41116479c8d337b0dcfae2287d6ae4d.tar.bz2 |
#26829: Clarify that namespace is copied to a new __dict__ in instance creation.
Patch by Emily Morehouse.
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 2b59ce1..3ddbd62 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1734,6 +1734,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 |