@@ -128,7 +128,7 @@ class can define a method __getinitargs__, which should return a
128128I have no answers. Garbage Collection may also become a problem here.)
129129"""
130130
131- __version__ = "1.7 " # Code version
131+ __version__ = "1.8 " # Code version
132132
133133from types import *
134134from copy_reg import *
@@ -538,7 +538,8 @@ def whichmodule(cls, clsname):
538538 import sys
539539
540540 for name , module in sys .modules .items ():
541- if hasattr (module , clsname ) and \
541+ if name != '__main__' and \
542+ hasattr (module , clsname ) and \
542543 getattr (module , clsname ) is cls :
543544 break
544545 else :
@@ -677,9 +678,9 @@ def load_inst(self):
677678 module = self .readline ()[:- 1 ]
678679 name = self .readline ()[:- 1 ]
679680 klass = self .find_class (module , name )
680- if (type (klass ) is not ClassType ):
681- raise SystemError , "Imported object %s from module %s is " \
682- "not a class" % (name , module )
681+ ## if (type(klass) is not ClassType):
682+ ## raise SystemError, "Imported object %s from module %s is " \
683+ ## "not a class" % (name, module)
683684
684685 value = apply (klass , args )
685686 self .append (value )
0 commit comments