如果要编写调试器,则需要大量使用该
inspect模块:
def show_callers_locals(): """Print the local variables in the caller's frame.""" import inspect frame = inspect.currentframe() try: print(frame.f_back.f_locals) finally: del frame
欢迎分享,转载请注明来源:内存溢出
如果要编写调试器,则需要大量使用该
inspect模块:
def show_callers_locals(): """Print the local variables in the caller's frame.""" import inspect frame = inspect.currentframe() try: print(frame.f_back.f_locals) finally: del frame
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)