@@ -139,7 +139,7 @@ msgstr "基类"
139139msgid ""
140140"The following exceptions are used mostly as base classes for other "
141141"exceptions."
142- msgstr ""
142+ msgstr "下列异常主要被用作其他异常的基类。 "
143143
144144#: ../../library/exceptions.rst:77
145145msgid ""
@@ -149,6 +149,8 @@ msgid ""
149149"the argument(s) to the instance are returned, or the empty string when there"
150150" were no arguments."
151151msgstr ""
152+ "所有内置异常的基类。 它不应该被用户自定义类直接继承 (这种情况请使用 :exc:`Exception`)。 如果在此类的实例上调用 "
153+ ":func:`str`,则会返回实例的参数表示,或者当没有参数时返回空字符串。"
152154
153155#: ../../library/exceptions.rst:85
154156msgid ""
@@ -157,58 +159,66 @@ msgid ""
157159"assign a special meaning to the elements of this tuple, while others are "
158160"usually called only with a single string giving an error message."
159161msgstr ""
162+ "传给异常构造器的参数元组。 某些内置异常 (例如 :exc:`OSError`) "
163+ "接受特定数量的参数并赋予此元组中的元素特殊的含义,而其他异常通常只接受一个给出错误信息的单独字符串。"
160164
161165#: ../../library/exceptions.rst:92
162166msgid ""
163167"This method sets *tb* as the new traceback for the exception and returns the"
164168" exception object. It is usually used in exception handling code like "
165169"this::"
166- msgstr ""
170+ msgstr "此方法将 *tb* 设为异常的新回溯信息并返回该异常对象。 它通常以如下的形式在异常处理程序中使用:: "
167171
168172#: ../../library/exceptions.rst:105
169173msgid ""
170174"All built-in, non-system-exiting exceptions are derived from this class. "
171175"All user-defined exceptions should also be derived from this class."
172- msgstr ""
176+ msgstr "所有内置的非系统退出类异常都派生自此类。 所有用户自定义异常也应当没打算自此类。 "
173177
174178#: ../../library/exceptions.rst:111
175179msgid ""
176180"The base class for those built-in exceptions that are raised for various "
177181"arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, "
178182":exc:`FloatingPointError`."
179183msgstr ""
184+ "此基类用于派生针对各种算术类错误而引发的内置异常: :exc:`OverflowError`, :exc:`ZeroDivisionError`, "
185+ ":exc:`FloatingPointError`。"
180186
181187#: ../../library/exceptions.rst:118
182188msgid ""
183189"Raised when a :ref:`buffer <bufferobjects>` related operation cannot be "
184190"performed."
185- msgstr ""
191+ msgstr "当与 :ref:`缓冲区 <bufferobjects>` 相关的操作无法执行时将被引发。 "
186192
187193#: ../../library/exceptions.rst:124
188194msgid ""
189195"The base class for the exceptions that are raised when a key or index used "
190196"on a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. "
191197"This can be raised directly by :func:`codecs.lookup`."
192198msgstr ""
199+ "此基类用于派生当映射或序列所使用的键或索引无效时引发的异常: :exc:`IndexError`, :exc:`KeyError`。 这可以通过 "
200+ ":func:`codecs.lookup` 来直接引发。"
193201
194202#: ../../library/exceptions.rst:130
195203msgid "Concrete exceptions"
196204msgstr "具体异常"
197205
198206#: ../../library/exceptions.rst:132
199207msgid "The following exceptions are the exceptions that are usually raised."
200- msgstr ""
208+ msgstr "以下异常属于经常被引发的异常。 "
201209
202210#: ../../library/exceptions.rst:138
203211msgid "Raised when an :keyword:`assert` statement fails."
204- msgstr ""
212+ msgstr "当 :keyword:`assert` 语句失败时将被引发。 "
205213
206214#: ../../library/exceptions.rst:143
207215msgid ""
208216"Raised when an attribute reference (see :ref:`attribute-references`) or "
209217"assignment fails. (When an object does not support attribute references or "
210218"attribute assignments at all, :exc:`TypeError` is raised.)"
211219msgstr ""
220+ "当属性引用 (参见 :ref:`attribute-references`) 或赋值失败时将被引发。 (当一个对象根本不支持属性引用或属性赋值时则将引发"
221+ " :exc:`TypeError`。)"
212222
213223#: ../../library/exceptions.rst:150
214224msgid ""
@@ -217,10 +227,12 @@ msgid ""
217227":meth:`io.IOBase.readline` methods return an empty string when they hit "
218228"EOF.)"
219229msgstr ""
230+ "当 :func:`input` 函数未读取任何数据即达到文件结束条件 (EOF) 时将被引发。 (另外,:meth:`io.IOBase.read` 和"
231+ " :meth:`io.IOBase.readline` 方法在遇到 EOF 则将返回一个空字符串。)"
220232
221233#: ../../library/exceptions.rst:157
222234msgid "Not currently used."
223- msgstr ""
235+ msgstr "目前未被使用。 "
224236
225237#: ../../library/exceptions.rst:162
226238msgid ""
0 commit comments