Compromise on test in find_class(): a user-defined function is okay,

but a built-in function is not.
This commit is contained in:
Guido van Rossum 1996-10-07 14:34:20 +00:00
parent cab3c3b8d4
commit 36fc11e894
1 changed files with 1 additions and 3 deletions

View File

@ -473,9 +473,7 @@ class Unpickler:
"Failed to import class %s from module %s" % \
(name, module)
klass = env[name]
# if type(klass) != ClassType:
if (type(klass) is FunctionType or
type(klass) is BuiltinFunctionType):
if type(klass) is BuiltinFunctionType:
raise SystemError, \
"Imported object %s from module %s is not a class" % \
(name, module)