loading
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class Animal:
  pass

def my_init(self):
  print("Meow!")

Cat = type("Cat", (Animal, ), {"__init__": my_init})

def fun2(val):
  if isinstance(val, int):
    print("It is an int!")
  elif isinstance(val, Animal):
    print("It is an animal!")
  else:
    print("Unknown type :(")

fun2(Cat())