Say I have a custom class:
class MyClass():
pass
and I want to test if this is an instance of MyClass. Can this be accomplished without the ugly mess of converting to a string?
str(type(MyClass())) == "<class '__main__.MyClass'>"
Say I have a custom class:
class MyClass():
pass
and I want to test if this is an instance of MyClass. Can this be accomplished without the ugly mess of converting to a string?
str(type(MyClass())) == "<class '__main__.MyClass'>"