mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
test other name variable
This commit is contained in:
parent
f4ef7e6a0b
commit
f71c79bb85
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue