mirror of
https://github.com/python/cpython.git
synced 2025-10-08 16:11:51 +00:00
Merge 3.2
This commit is contained in:
commit
c8e032006a
11 changed files with 37 additions and 16 deletions
|
@ -482,7 +482,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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue