class A: pass assert isinstance(A(), int | str)