Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b17a4e

Browse files
committed
Close #14386: Register types.MappingProxyType as a Mapping
1 parent 6fe20b3 commit 7b17a4e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/collections/abc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
dict_values = type({}.values())
4444
dict_items = type({}.items())
4545
## misc ##
46-
dict_proxy = type(type.__dict__)
46+
mappingproxy = type(type.__dict__)
4747

4848

4949
### ONE-TRICK PONIES ###
@@ -405,6 +405,8 @@ def __eq__(self, other):
405405
def __ne__(self, other):
406406
return not (self == other)
407407

408+
Mapping.register(mappingproxy)
409+
408410

409411
class MappingView(Sized):
410412

0 commit comments

Comments
 (0)