[Python-ideas] Expose a child factory using MappingProxyType in builtins

Ivan Levkivskyi levkivskyi at gmail.com
Wed Mar 1 03:40:09 EST 2017


On 28 February 2017 at 23:19, Victor Stinner <victor.stinner at gmail.com>
wrote:

> 2017-02-28 13:17 GMT+01:00 Michel Desmoulin <desmoulinmichel at gmail.com>:
> > We have the immutable frozenset for sets and and tuples for lists.
> >
> > But we also have something to manipulate dict as immutable
> datastructures:
>
> ... Sorry, I don't understand your proposition.
>

My interpretation of the idea is to reconsider
https://www.python.org/dev/peps/pep-0416/
but put frozendict in collections, not in builtins.

MappingProxyType could be a possible implementation
(plus copying in constructor and hashing, as proposed above by Matt),
but not necessarily.

--
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170301/6661c8d2/attachment.html>


More information about the Python-ideas mailing list