dict继承挂心

2019-08-10

dict继承挂心

from collections.abc import Mapping, MutableMapping
#dict属于mapping类型, MutalbelMapping继承Mapping

a = {}
print(isinstance(a, Mapping))
print (isinstance(a, MutableMapping))

 

dict继承挂心

dict继承挂心

原文地址:https://www.cnblogs.com/callyblog/p/11333342.html