New submission from STINNER Victor <victor.stin...@gmail.com>: Attached patch makes the dictproxy type public. Example:
$ ./python Python 3.3.0a1+ (default:059489cec7b9+, Mar 22 2012, 02:45:36) >>> d=dictproxy({1:2}) >>> d dict_proxy({1: 2}) >>> d[1] 2 >>> d[1]=3 TypeError: 'dictproxy' object does not support item assignment >>> del d[1] TypeError: 'dictproxy' object doesn't support item deletion >>> d.copy() {1: 2} >>> dir(d) [..., '__getitem__', 'copy', 'get', 'items', 'keys', 'values'] The patch doesn't have any test or documentation yet. See also the (now rejected) PEP 416 (frozendict). ---------- components: Interpreter Core files: dictproxy.patch keywords: patch messages: 156536 nosy: gvanrossum, haypo priority: normal severity: normal status: open title: Expose dictproxy as a public type versions: Python 3.3 Added file: http://bugs.python.org/file24990/dictproxy.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14386> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com