[issue45353] sys.modules: dictionary changed size during iteration

Terry J. Reedy report at bugs.python.org
Fri Oct 8 16:41:27 EDT 2021


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Do you have an example for which "for m in sys.modules: print(m, end=' ')" fails?  In particular, is there code in the stdlib that fails iterating over sys.modules?  If not the latter, this should be closed as 'Not a bug'.

Note that questions about using Python should go elsewhere, such as python-list or stackoverflow.

----------
nosy: +terry.reedy
stage:  -> test needed
type:  -> behavior
versions: +Python 3.11 -Python 3.8

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


More information about the Python-bugs-list mailing list