diff options
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index bb46ea6..4e17f1b 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -483,7 +483,7 @@ def getmodule(object, _filename=None): return sys.modules.get(modulesbyfile[file]) # Update the filename to module name cache and check yet again # Copy sys.modules in order to cope with changes while iterating - for modname, module in sys.modules.items(): + for modname, module in list(sys.modules.items()): if ismodule(module) and hasattr(module, '__file__'): f = module.__file__ if f == _filesbymodname.get(modname, None): |