[New-bugs-announce] [issue29251] Class __dict__ is only a mapping proxy

Martin Panter report at bugs.python.org
Thu Jan 12 07:04:20 EST 2017


New submission from Martin Panter:

The __dict__ attribute of class objects is documented as being a (standard) dictionary, but implemented with a proxy object. I propose to clarify the documentation in “Custom classes” under <https://docs.python.org/3.5/reference/datamodel.html#the-standard-type-hierarchy>, and in <https://docs.python.org/3.5/library/functions.html#type>.

I believe my changes are also applicable to Python 2, as long as I point out the proxy is specific to “new-style” classes.

----------
assignee: docs at python
components: Documentation
files: class-dict.patch
keywords: patch
messages: 285313
nosy: docs at python, martin.panter
priority: normal
severity: normal
stage: patch review
status: open
title: Class __dict__ is only a mapping proxy
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46268/class-dict.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29251>
_______________________________________


More information about the New-bugs-announce mailing list