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/library/functions.rst | |
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/library/functions.rst')
-rw-r--r-- | Doc/library/functions.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 89b2ac6..c3563f3 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1449,8 +1449,9 @@ are always available. They are listed here in alphabetical order. class name and becomes the :attr:`~class.__name__` attribute; the *bases* tuple itemizes the base classes and becomes the :attr:`~class.__bases__` attribute; and the *dict* dictionary is the namespace containing definitions - for class body and becomes the :attr:`~object.__dict__` attribute. For - example, the following two statements create identical :class:`type` objects: + for class body and is copied to a standard dictionary to become the + :attr:`~object.__dict__` attribute. For example, the following two + statements create identical :class:`type` objects: >>> class X: ... a = 1 |