In my case I call a funcion and I would like to get the line where the function returned. for instance: def my_function(): return 3 So I would like to get line 2(in C) somehow.