6 ms·
MappingProxyType is another handy one. It wraps a regular dict/Mapping to create a read-only live view of the underlying dict. You can use it to expose a dict t
by h4l 2y ago
MappingProxyType is another handy one. It wraps a regular dict/Mapping to create a read-only live view of the underlying dict. You can use it to expose a dict that can't be modified, but doesn't need copying.
https://docs.python.org/3/library/types.html#types.MappingProxyType https://docs.python.org/3/library/types.html#types.MappingPr...