异常


2020-05-07

[编程技术] 脱离苦海,从避免滥用try...except...开始

有不少人在写 Python 代码时,喜欢用 try...except Exception,更有甚者一层套一层,不管有没有用,先套了再说: def func(): try: "函数内部代码" except Exception as e: print('函数错误:', e) try: func() except Exception as e:

×