Message399022
[Serhiy]
> In particularly it allows to modify __dict__ of builtin types.
This doesn't look like something that would happen accidentally. We've never had any bug reports about this occurring in the wild.
[GvR]
> Maybe we should not fix this then?
That seems reasonable. In general, it is hard to completely wall-off instances against deliberate efforts to pry them open:
>>> from types import MappingProxyType
>>> import gc
>>> orig = {1: 2}
>>> proxy = MappingProxyType(orig)
>>> refs = gc.get_referents(proxy)
>>> refs
[{1: 2}]
>>> refs[0][1] = 3
>>> orig
{1: 3} |
|
Date |
User |
Action |
Args |
2021-08-05 18:10:08 | rhettinger | set | recipients:
+ rhettinger, gvanrossum, ncoghlan, serhiy.storchaka, brandtbucher, domdfcoding |
2021-08-05 18:10:07 | rhettinger | set | messageid: <1628187007.94.0.922145146512.issue43838@roundup.psfhosted.org> |
2021-08-05 18:10:07 | rhettinger | link | issue43838 messages |
2021-08-05 18:10:07 | rhettinger | create | |
|