Dennis Sweeney <[email protected]> added the comment:
One standard way of preventing this is copying the dictionary whenever there's
risk of it changing out from under you, as in:
modules = sys.modules.copy()
for key, value in modules.items():
...
----------
nosy: +Dennis Sweeney
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45353>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com