Kaydet (Commit) f71c79bb authored tarafından Guido van Rossum's avatar Guido van Rossum

test other name variable

üst f4ef7e6a
...@@ -341,7 +341,7 @@ def whichmodule(cls): ...@@ -341,7 +341,7 @@ def whichmodule(cls):
import sys import sys
clsname = cls.__name__ clsname = cls.__name__
for name, module in sys.modules.items(): for name, module in sys.modules.items():
if module.__name__ != '__main__' and \ if name != '__main__' and \
hasattr(module, clsname) and \ hasattr(module, clsname) and \
getattr(module, clsname) is cls: getattr(module, clsname) is cls:
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment