For a recursive function we can do: def f(i): if i<0: return print i f(i-1) f(10) However is there a way to do the following thing? class A: # do something some_func(A) # ... Continue reading...