Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> `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.

Technically, the underlying mapping is modifying itself.  That is allowed.

Also, there isn't really anything that the mapping proxy can do about it.  All 
MappingProxy can do it forward calls to methods that are usually non-mutating.

----------
assignee:  -> rhettinger
nosy: +rhettinger
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44867>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to