Josh Rosenberg added the comment: Is this worth fixing? Delve into the innards and you get weird behaviors. If you really need to iterate sys.modules (the example clearly doesn't, but that doesn't mean no one would), you could just copy the parts you need beforehand to get a consistent view, e.g.
for name, mod in tuple(sys.modules.items()): Lazy module imports aren't always a bad thing if the module in question isn't needed for the common functionality, only specific subsets that may never be used. ---------- nosy: +josh.r _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20703> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com