Your any help would be great. Thanks in advance!
I have 2 files, like below
file1:
import file2
class Foo():
pass
if __name__ == '__main__':
foo = file2.dummy()
print("right?", isinstance(foo, Foo))
print("right?", type(foo)==Foo)
file2:
import file1
def dummy():
foo = file1.Foo()
return foo
if __name__ == '__main__':
pass
Actually, I expect that isinstance(foo, Foo) is True, type(foo) == Foo is also True, but I get two False. How do I get my expectations?