📜  带有行号的 python 异常 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:01.076000             🧑  作者: Mango

代码示例2
import traceback

try:
    print(4/0)
except ZeroDivisionError:
    print(traceback.format_exc())