#26829: Clarify that namespace is copied to a new __dict__ in instance creation.

Patch by Emily Morehouse.
This commit is contained in:
R David Murray 2016-06-02 20:05:43 -04:00
parent a32c738ad7
commit dd4fcf52f4
3 changed files with 9 additions and 2 deletions

View file

@ -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