From: Victor Stinner Date: Thu, 19 Apr 2012 23:41:36 +0000 (+0200) Subject: Close #14386: Register types.MappingProxyType as a Mapping X-Git-Tag: v3.3.0a3~148 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7b17a4e117fa6ad9f0063aa2f039930f40d91820;p=python Close #14386: Register types.MappingProxyType as a Mapping --- diff --git a/Lib/collections/abc.py b/Lib/collections/abc.py index 37a813abda..d17cfdcd9b 100644 --- a/Lib/collections/abc.py +++ b/Lib/collections/abc.py @@ -43,7 +43,7 @@ dict_keys = type({}.keys()) 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 @@ class Mapping(Sized, Iterable, Container): def __ne__(self, other): return not (self == other) +Mapping.register(mappingproxy) + class MappingView(Sized):