[issue45776] abc submodule not an attribute of collections on Python 3.10.0 on Windows

Steve Dower report at bugs.python.org
Wed Nov 10 08:34:50 EST 2021


Steve Dower <steve.dower at python.org> added the comment:

Since collections.abc is a module, it should work if you import it:

>>> import collections.abc
>>> collections.abc.Container
<class 'collections.abc.Container'>

Submodules being implicitly imported is not part of any API guarantee, which will be why somebody changed it without considering this impact.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45776>
_______________________________________


More information about the Python-bugs-list mailing list