traceback.print_exc() python question

后端 未结 2 1881
一个人的身影
一个人的身影 2021-02-11 09:48

I am using the following line of code in IDLE to print out my traceback in an eception:

traceback.print_exc()

For some reason I get the red text error message, b

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-11 10:09

    print_exc() doesn't return anything, which in Python is actually returning None. Looks like IDLE is showing you the None it returned.

提交回复
热议问题