'collections' has no attribute 'MutableMapping'
文章目录
AttributeError: module 'collections' has no attribute 'MutableMapping'
那原因是什么呢?
DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working也就是说,from collections import Mapping, MutableMapping 这种用法在 python3.10 上已经被移除了
从 python3.3 开始,就应该使用 from collections.abc import MutableMapping 替代 from collections import Mapping, MutableMapping
在 python3.10 上,彻底移除了 from collections import Mapping, MutableMapping 这种用法
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论