Discuss / Python / from collections import Iterable要改成from collections.abc import Iterable

from collections import Iterable要改成from collections.abc import Iterable

Topic source

XDBruce

#1 Created at ... [Delete] [Delete and Lock User]

python 3.8后,from collections import Iterable这种用法将会不可用,因为3.7已经弃用了,要改用from collections.abc import Iterable才可以。


  • 1

Reply