When developing my program, I was faced with this problem, as different types of classes after inheritance.
For example:
class MyClass: pass
class MyClass2(MyClass): pass
A = MyClass()
B = MyClass2()
print(type(A) == type(B))
Result will be False
, and that's not what I need. I tried to search some info in typing
Python module, but I didn't really understand nature of types. What should I do for True
result?