reconstruct the source of a lambda from its func_code, func_name, etc

Phlip phlip2005 at
Fri Feb 5 23:19:36 CET 2010

Thy Pon:

Has anyone figured out how to reflect a passed function, such as a
lambda, all the way back to its source?

I am aware than func_code knows the file name and line number; I would
rather not use them to read the file because the lambda might not
start in the first column. I will go with this option until someone
suggests a better fix!


More information about the Python-list mailing list