I wonder why a class __dict__ is a mappingproxy, but an instance __dict__ is just a plain dict
>>&g
A mappingproxy is simply a dict with no __setattr__ method.
You can check out and refer to this code.
from types import MappingProxyType
d={'key': "value"}
m = MappingProxyType(d)
print(type(m)) #
m['key']='new' #TypeError: 'mappingproxy' object does not support item assignment
mappingproxy is since Python 3.3. The following code shows dict types:
class C:pass
ci=C()
print(type(C.__dict__)) #
print(type(ci.__dict__)) #