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 guoci
Recipients guoci
Date 2021-08-08.19:16:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628450175.86.0.732506438572.issue44867@roundup.psfhosted.org>
In-reply-to
Content
`types.MappingProxyType` is documented as 'Read-only proxy of a mapping'.
But if used with a `collections.defaultdict` mapping, it can modify the underlying mapping.
```
import collections, types
dd = collections.defaultdict(set)
mpt = types.MappingProxyType(dd)
mpt['__getitem__'] # key inserted
mpt.get('get') # key not inserted
print(dd.items()) # dict_items([('__getitem__', set())])
```
History
Date User Action Args
2021-08-08 19:16:15guocisetrecipients: + guoci
2021-08-08 19:16:15guocisetmessageid: <1628450175.86.0.732506438572.issue44867@roundup.psfhosted.org>
2021-08-08 19:16:15guocilinkissue44867 messages
2021-08-08 19:16:15guocicreate