Message371070
PR 20749 gives each dict view access to a mappingproxy for the original dict, although I don't know if that defeats the original purpose.
It might be hard to sensibly make MappingProxy(d).items() return something other than d.items(), since this is already the behavior for user-defined classes:
>>> class A:
def __getitem__(self, key):
return "value"
def items(self):
return 17
>>> from types import MappingProxyType
>>> MappingProxyType(A()).items()
17 |
|
Date |
User |
Action |
Args |
2020-06-09 00:36:03 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, rhettinger, methane, serhiy.storchaka, remi.lapeyre |
2020-06-09 00:36:03 | Dennis Sweeney | set | messageid: <1591662963.62.0.277349357299.issue40890@roundup.psfhosted.org> |
2020-06-09 00:36:03 | Dennis Sweeney | link | issue40890 messages |
2020-06-09 00:36:03 | Dennis Sweeney | create | |
|