Close #14386: Register types.MappingProxyType as a Mapping

This commit is contained in:
Victor Stinner 2012-04-20 01:41:36 +02:00
parent 6fe20b3aee
commit 7b17a4e117
1 changed files with 3 additions and 1 deletions

View File

@ -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):