This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author reed
Recipients docs@python, reed
Date 2019-09-11.06:21:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568182871.44.0.335247784266.issue38099@roundup.psfhosted.org>
In-reply-to
Content
The documentation in this section (https://docs.python.org/3/library/stdtypes.html#special-attributes) states that the __dict__ attribute, and several others, are read-only. In particular, it states:

"The implementation adds a few special read-only attributes to several object types, where they are relevant."

Then it lists several attributes, including __dict__. However, __dict__ is writable. For example:

    class A: pass 
    A().__dict__ = {'x': 1}

Most other listed attributes, such as __class__ and __name__, are writable as well. They should not be documented as read-only.

(Also, I'm not sure why the documentation lists object.__dict__ and instance.__class__. What is the difference between an object and an instance?)
History
Date User Action Args
2019-09-11 06:21:11reedsetrecipients: + reed, docs@python
2019-09-11 06:21:11reedsetmessageid: <1568182871.44.0.335247784266.issue38099@roundup.psfhosted.org>
2019-09-11 06:21:11reedlinkissue38099 messages
2019-09-11 06:21:11reedcreate