Patrik Simons added the comment:
I cannot reproduce. In fact I cannot even get list(d.items())
to raise RuntimeError: dictionary changed size during iteration
for any dict d.
--
___
Python tracker
<https://bugs.python.org/issue13
Patrik Simons added the comment:
list(sys.modules.items()) still raises RuntimeError: dictionary changed size
during iteration when another thread imports a module.
I would assume dict.copy() is thread-safe so a working fix could use
sys.modules.copy().items()
I hit this bug when printing