[Python-checkins] cpython: Close #14386: Register types.MappingProxyType as a Mapping
victor.stinner
python-checkins at python.org
Fri Apr 20 01:42:54 CEST 2012
http://hg.python.org/cpython/rev/34af3e74292d
changeset: 76424:34af3e74292d
user: Victor Stinner <victor.stinner at gmail.com>
date: Fri Apr 20 01:41:36 2012 +0200
summary:
Close #14386: Register types.MappingProxyType as a Mapping
files:
Lib/collections/abc.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/collections/abc.py b/Lib/collections/abc.py
--- a/Lib/collections/abc.py
+++ b/Lib/collections/abc.py
@@ -43,7 +43,7 @@
dict_values = type({}.values())
dict_items = type({}.items())
## misc ##
-dict_proxy = type(type.__dict__)
+mappingproxy = type(type.__dict__)
### ONE-TRICK PONIES ###
@@ -405,6 +405,8 @@
def __ne__(self, other):
return not (self == other)
+Mapping.register(mappingproxy)
+
class MappingView(Sized):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list