@@ -241,13 +241,18 @@ msgid ""
241241"from :exc:`BaseException` instead of :exc:`Exception` since it is "
242242"technically not an error."
243243msgstr ""
244+ "当一个 :term:`generator` 或 :term:`coroutine` 被关闭时将被引发;参见 "
245+ ":meth:`generator.close` 和 :meth:`coroutine.close`。 它直接继承自 "
246+ ":exc:`BaseException` 而不是 :exc:`Exception`,因为从技术上来说它并不是一个错误。"
244247
245248#: ../../library/exceptions.rst:170
246249msgid ""
247250"Raised when the :keyword:`import` statement has troubles trying to load a "
248251"module. Also raised when the \" from list\" in ``from ... import`` has a "
249252"name that cannot be found."
250253msgstr ""
254+ "当 :keyword:`import` 语句尝试加载模块遇到麻烦时将被引发。 并且当 ``from ... import`` 中的 \" from "
255+ "list\" 存在无法找到的名称时也会被引发。"
251256
252257#: ../../library/exceptions.rst:174
253258msgid ""
@@ -256,30 +261,34 @@ msgid ""
256261" that was attempted to be imported and the path to any file which triggered "
257262"the exception, respectively."
258263msgstr ""
264+ ":attr:`name` 与 :attr:`path` 属性可通过对构造器使用仅关键字参数来设定。 "
265+ "设定后它们将分别表示被尝试导入的模块名称与触发异常的任意文件所在路径。"
259266
260267#: ../../library/exceptions.rst:179
261268msgid "Added the :attr:`name` and :attr:`path` attributes."
262- msgstr ""
269+ msgstr "添加了 :attr:`name` 与 :attr:`path` 属性。 "
263270
264271#: ../../library/exceptions.rst:184
265272msgid ""
266273"A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a"
267274" module could not be located. It is also raised when ``None`` is found in "
268275":data:`sys.modules`."
269276msgstr ""
277+ ":exc:`ImportError` 的子类,当一个模块无法被定位时将由 :keyword:`import` 引发。 当在 "
278+ ":data:`sys.modules` 中找到 ``None`` 时也会被引发。"
270279
271280#: ../../library/exceptions.rst:193
272281msgid ""
273282"Raised when a sequence subscript is out of range. (Slice indices are "
274283"silently truncated to fall in the allowed range; if an index is not an "
275284"integer, :exc:`TypeError` is raised.)"
276- msgstr ""
285+ msgstr "当序列抽取超出范围时将被引发。 (切片索引会被静默截短到允许的范围;如果指定索引不是整数则 :exc:`TypeError` 会被引发。) "
277286
278287#: ../../library/exceptions.rst:202
279288msgid ""
280289"Raised when a mapping (dictionary) key is not found in the set of existing "
281290"keys."
282- msgstr ""
291+ msgstr "当在现有键集合中找不到指定的映射(字典)键时将被引发。 "
283292
284293#: ../../library/exceptions.rst:209
285294msgid ""
@@ -289,6 +298,8 @@ msgid ""
289298"accidentally caught by code that catches :exc:`Exception` and thus prevent "
290299"the interpreter from exiting."
291300msgstr ""
301+ "当用户按下中断键 (通常为 :kbd:`Control-C` 或 :kbd:`Delete`) 时将被引发。 在执行期间,会定期检测中断信号。 "
302+ "该异常继承自 :exc:`BaseException` 以确保不会被处理 :exc:`Exception` 的代码意外捕获,这样可以避免退出解释器。"
292303
293304#: ../../library/exceptions.rst:218
294305msgid ""
0 commit comments