【目标链接】:https://docs.python.org/3/tutorial/errors.html
【问题位置】:8.3 节
原文:
The use of the else clause is better than adding additional code to the try clause because it avoids accidentally catching an exception that wasn’t raised by the code being protected by the try … except statement.
【目标链接】:https://docs.python.org/3/tutorial/errors.html 【问题位置】:8.3 节 原文: The use of the else clause is better than adding additional code to the try clause because it avoids accidentally catching an exception that wasn’t raised by the code being protected by the try … except statement.
错误的译文翻译为: 使用 else 子句比向 try 子句添加额外的代码要好,因为它避免了意外捕获
由
try ... except 语句保护的代码未引发
的异常。译文应该翻译为: 使用 else 子句比向 try 子句添加额外的代码要好,因为它避免了意外捕获
非
try ... except 语句保护的代码引发
的异常。