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!
--
Phlip
http://penbird.tumblr.com/
> Thy Pon:
>
> Has anyone figured out how to reflect a passed function, such as a
> lambda, all the way back to its source?
Use the dis module to disassemble the byte code to human readable form,
then write some sort of decompiler to translate it back to Python.
The second half is the difficult part...
--
Steven