Re: [Python-Dev] Issue 14417: consequences of new dict runtime error

2012年3月31日 04:45:49 -0700

The frozendict builtin type was rejected, but we are going to add
types.MappingProxyType: see issue #14386.
types.MappingProxyType(mydict.copy()) is very close to the frozendict
builtin type.
Victor
Thanks, Victor. :)
Will this mean the new dict subclass for CPython will not expose dictproxy to favorize a new types.MappingProxyType type to emulate immutable-like types ? What could be then consequences for code still expecting a non-mutable dict() type ? Therefore I guess this ticket provides more than just speculating points to reconsider such aliased types in cpython. I also found this article quite useful: http://www.cs.toronto.edu/~tijmen/programming/immutableDictionaries.html Yet I might miss how this "new dict" type could potentially induce a RuntimeError unless in python 3.3 a new dict proxy alias is introduced to perform invariant operations in non thread-safe code.
Regards,
Etienne
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to