Commit 7b17a4e1 authored by Victor Stinner's avatar Victor Stinner

Close #14386: Register types.MappingProxyType as a Mapping

parent 6fe20b3a
...@@ -43,7 +43,7 @@ dict_keys = type({}.keys()) ...@@ -43,7 +43,7 @@ dict_keys = type({}.keys())
dict_values = type({}.values()) dict_values = type({}.values())
dict_items = type({}.items()) dict_items = type({}.items())
## misc ## ## misc ##
dict_proxy = type(type.__dict__) mappingproxy = type(type.__dict__)
### ONE-TRICK PONIES ### ### ONE-TRICK PONIES ###
...@@ -405,6 +405,8 @@ class Mapping(Sized, Iterable, Container): ...@@ -405,6 +405,8 @@ class Mapping(Sized, Iterable, Container):
def __ne__(self, other): def __ne__(self, other):
return not (self == other) return not (self == other)
Mapping.register(mappingproxy)
class MappingView(Sized): class MappingView(Sized):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment