Guido van Rossum <gu...@python.org> added the comment:

I'd like to bikeshed a little on the name. I think it should be
MappingProxy. (We don't use "view" much but the place where we do use
it, for keys/values/items views, is very different I think. Also
collections.abc already defines MappingView as the base class for
KeysView and friends.)

Also make sure there's no way for someone who has access to the proxy
to get to the underlying mapping; preventing that access is the
explicit purpose of the original dict_proxy type. You might even add a
comment to this effect to the code, so someone doesn't accidentally
add it in the future. Perhaps in the proxy_methods structure or in the
type structure just before tp_members.

----------

_______________________________________
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

Reply via email to