From f71c79bb851169f6a24f7c5333674f3e81790a87 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 22 Jun 1995 18:51:23 +0000 Subject: [PATCH] test other name variable --- Lib/pickle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/pickle.py b/Lib/pickle.py index 2895237d438..f7b1d296835 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -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