import fanshe1 as obj1 hasattr(obj1,'x') import sys sys.modules[__name__] print('++==+>',hasattr(obj1,'x'))