This topic created in 3451 days ago, the information mentioned may be changed or developed.
大大们,就是我在用一个库,继承了一个类后重写了一个方法,有两个参数我想看看是怎么传进来的,所以我想看一下函数调用的顺序,就是往上找,看可以从哪里改,把自己想要的东西传进去,这个应该怎么做?有简单的方法吗?
2 replies • 2017-05-28 10:43:50 +08:00
 |
|
可以试试 inspect
``` import inspect
def a(): print "a" b()
def b(): frame = inspect.currentframe() print frame.f_back.f_code
a() ```
|
 |
|
難道不是直接 debug 嗎?
|