开发 Tips(7)
· ☕ 2 分钟
主要记录最近遇到的一些开发问题,解决方法。 1. Python2 和 Python3 中的异常处理 Python2,Python3 都支持的两种方式: 带参数 1 2 except (ExceptionType) as Argument: # 访问 Argument 不带参数 1 except ExceptionType: 仅 Python2 支持的方式: 1 2 except ExceptionType, Argument: # 访问 Argument 2.