mirror of
https://github.com/python/cpython.git
synced 2024-11-23 18:04:37 +08:00
test other name variable
This commit is contained in:
parent
f4ef7e6a0b
commit
f71c79bb85
@ -341,7 +341,7 @@ def whichmodule(cls):
|
||||
import sys
|
||||
clsname = cls.__name__
|
||||
for name, module in sys.modules.items():
|
||||
if module.__name__ != '__main__' and \
|
||||
if name != '__main__' and \
|
||||
hasattr(module, clsname) and \
|
||||
getattr(module, clsname) is cls:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user