diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2012-04-19 23:41:36 (GMT) |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2012-04-19 23:41:36 (GMT) |
| commit | 7b17a4e117fa6ad9f0063aa2f039930f40d91820 (patch) | |
| tree | 5d758ba97229e6800244c956ac4ad32b5171a14c | |
| parent | 6fe20b3aee076850e390ef8bb2078b1cd09ddf88 (diff) | |
| download | cpython-7b17a4e117fa6ad9f0063aa2f039930f40d91820.zip cpython-7b17a4e117fa6ad9f0063aa2f039930f40d91820.tar.gz cpython-7b17a4e117fa6ad9f0063aa2f039930f40d91820.tar.bz2 | |
Close #14386: Register types.MappingProxyType as a Mapping
| -rw-r--r-- | Lib/collections/abc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/collections/abc.py b/Lib/collections/abc.py index 37a813a..d17cfdc 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): |
