How to get calling expression when tracing a Python function?
问题 When inside tracing function, debugging a function call, is it possible to somehow retrieve the calling expression? I can get calling line number from traceback object but if there are several function calls (possibly to the same function) on that line (eg. as subexpression in a bigger expression) then how could I learn where this call came from? I would be happy even with the offset from start of the source line. traceback.tb_lasti seems to give more granual context (index of last bytecode