I recently asked a question with title "python find the type of a function" and got very helpful answers. Here is a related question.
Suppose I import *.py files written by me, and these imports result in f
being one of the functions defined by me. Now I write to my python interpreter x = f
. Later, I want to see the full definition of f
, preferably with comments still in place, knowing only x
. Is this possible? Does python remember which file the definition was imported from, which is, of course, not enough to give the full definition of f
, unless one can find the actual relevant definition?