dict继承关系

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

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

 

posted @ 2019-08-10 22:50  下路派出所  阅读(272)  评论(0编辑  收藏  举报