[Python-ideas] Make types.MappingProxyType hashable
Victor Stinner
victor.stinner at gmail.com
Fri Jul 29 08:57:14 EDT 2016
2016-07-29 0:06 GMT+02:00 Guido van Rossum <guido at python.org>:
> I think you misunderstand the distinction between immutable and
> read-only. MappingProxyType is read-only -- you cannot modify the
> underlying dict through the proxy. But it's not immutable -- if the
> underlying dict is changed directly (e.g. by assignment to a class
> attribute) the proxy is changed too.
Oh right. That's why I'm not a big fan of MappingProxyType :-)
--
It reminds me that I wrote a frozendict PEP which was rejected :-)
https://www.python.org/dev/peps/pep-0416/
Victor
More information about the Python-ideas
mailing list