标签:traceback
-
如何在Python中获得完整的异常堆栈跟踪 - python
以下代码段: import traceback def a(): b() def b(): try: c() except: traceback.print_exc() def c(): assert False a() 产生以下输出: Traceback (most recent call last): File "test.py", […]
以下代码段: import traceback def a(): b() def b(): try: c() except: traceback.print_exc() def c(): assert False a() 产生以下输出: Traceback (most recent call last): File "test.py", […]