Python Frequently Asked Questions, Release 3.9.5 35 2.7. Modules >>> import importlib >>> import cls >>> c =cls.C() # Create an instance of C >>> importlib.reload(cls) <module 'cls' from 'cls.py'> >>> isinstance(c,cls.C) # isinstance is false?!? False >>> hex(id(c.__class__ )) '0x7352a0' >>> hex(id(cls.C)) '0x4198d0' The nature of the problem is made clear if you print out the “identity” of the class objects: