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@python
components: Documentation
files: class-dict.patch
keywords: patch
messages: 285313
nosy: docs@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue29251>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to