@@ -58,7 +58,7 @@ msgid ""
5858"colon (``':'``) is missing before it. File name and line number are printed"
5959" so you know where to look in case the input came from a script."
6060msgstr ""
61- "解析器会输出出现语法错误的那一行,并显示一个“箭头”,指向这行里面检测到第一个错误 。 错误是由箭头指示的位置 *上面* 的 token "
61+ "解析器会输出出现语法错误的那一行,并显示一个“箭头”,指向这行里面检测到的第一个错误 。 错误是由箭头指示的位置 *上面* 的 token "
6262"引起的(或者至少是在这里被检测出的):在示例中,在 :func:`print` 这个函数中检测到了错误,因为在它前面少了个冒号 (``':'``) "
6363"。文件名和行号也会被输出,以便输入来自脚本文件时你能知道去哪检查。"
6464
@@ -131,7 +131,7 @@ msgstr ""
131131
132132#: ../../tutorial/errors.rst:96
133133msgid "The :keyword:`try` statement works as follows."
134- msgstr ":keyword:`try` 语句的工作原理如下。 "
134+ msgstr ":keyword:`try` 语句的工作原理如下: "
135135
136136#: ../../tutorial/errors.rst:98
137137msgid ""
@@ -152,8 +152,8 @@ msgid ""
152152":keyword:`except` keyword, the except clause is executed, and then execution"
153153" continues after the :keyword:`try` statement."
154154msgstr ""
155- "如果在执行try 子句时发生了异常,则跳过该子句中剩下的部分。然后,如果异常的类型和 :keyword:`except` 关键字后面的异常匹配,则执行 "
156- "except 子句 ,然后继续执行 :keyword:`try` 语句之后的代码。"
155+ "如果在执行 try 子句时发生了异常,则跳过该子句中剩下的部分。 然后,如果异常的类型和 :keyword:`except` "
156+ "关键字后面的异常匹配,则执行 except 子句,然后继续执行 :keyword:`try` 语句之后的代码。"
157157
158158#: ../../tutorial/errors.rst:109
159159msgid ""
@@ -193,7 +193,7 @@ msgid ""
193193"would have printed B, B, B --- the first matching except clause is "
194194"triggered."
195195msgstr ""
196- "请注意如果 except 子句被颠倒(把 ``except B`` 放到第一个),它将打印 B,B,B --- 即第一个匹配的 except "
196+ "请注意如果 except 子句被颠倒(把 ``except B`` 放到第一个),它将打印 B,B,B --- 即第一个匹配的 except "
197197"子句被触发。"
198198
199199#: ../../tutorial/errors.rst:150
@@ -215,7 +215,7 @@ msgid ""
215215"exception. For example::"
216216msgstr ""
217217":keyword:`try` ... :keyword:`except` 语句有一个可选的 *else 子句*,在使用时必须放在所有的 except "
218- "子句后面。对于在try 子句不引发异常时必须执行的代码来说很有用。例如::"
218+ "子句后面。对于在 try 子句不引发异常时必须执行的代码来说很有用。 例如::"
219219
220220#: ../../tutorial/errors.rst:183
221221msgid ""
@@ -339,7 +339,8 @@ msgid ""
339339"module, and subclass that to create specific exception classes for different"
340340" error conditions::"
341341msgstr ""
342- "可以定义异常类,它可以执行任何其他类可以执行的任何操作,但通常保持简单,通常只提供许多属性,这些属性允许处理程序为异常提取有关错误的信息。在创建可能引发多个不同错误的模块时,通常的做法是为该模块定义的异常创建基类,并为不同错误条件创建特定异常类的子类::"
342+ "可以定义异常类,它可以执行任何其他类可以执行的任何操作,但通常保持简单,只提供一些属性,这些属性允许处理程序为异常提取有关错误的信息。 "
343+ "在创建可能引发多个不同错误的模块时,通常的做法是为该模块定义的异常创建基类,并为不同错误条件创建特定异常类的子类::"
343344
344345#: ../../tutorial/errors.rst:364
345346msgid ""
@@ -455,7 +456,8 @@ msgid ""
455456" the object succeeded or failed. Look at the following example, which tries "
456457"to open a file and print its contents to the screen. ::"
457458msgstr ""
458- "某些对象定义了在不再需要该对象时要执行的标准清理操作,无论使用该对象的操作是成功还是失败。请查看下面的示例,它尝试打开一个文件并把其内容打印到屏幕上。::"
459+ "某些对象定义了在不再需要该对象时要执行的标准清理操作,无论使用该对象的操作是成功还是失败,清理操作都会被执行。 "
460+ "请查看下面的示例,它尝试打开一个文件并把其内容打印到屏幕上。::"
459461
460462#: ../../tutorial/errors.rst:478
461463msgid ""
0 commit comments