diff --git a/Lib/pickle.py b/Lib/pickle.py index 876c81b70a1..1d14ed35c07 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -942,8 +942,7 @@ def whichmodule(func, funcname): for name, module in sys.modules.items(): if module is None: continue # skip dummy package entries - if name != '__main__' and \ - getattr(module, funcname, None) is func: + if name != '__main__' and getattr(module, funcname, None) is func: break else: name = '__main__'