Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 207bedc commit 69a49ceCopy full SHA for 69a49ce
1 file changed
tutorial/errors.po
@@ -230,7 +230,7 @@ msgid ""
230
"When an exception occurs, it may have an associated value, also known as the"
231
" exception's *argument*. The presence and type of the argument depend on the"
232
" exception type."
233
-msgstr ""
+msgstr "发生异常时,它可能具有关联值,也称为异常 *参数* 。参数的存在和类型取决于异常类型。"
234
235
#: ../../tutorial/errors.rst:192
236
msgid ""
@@ -241,6 +241,9 @@ msgid ""
241
"reference ``.args``. One may also instantiate an exception first before "
242
"raising it and add any attributes to it as desired. ::"
243
msgstr ""
244
+"except 子句可以在异常名称后面指定一个变量。这个变量和一个异常实例绑定,它的参数存储在 ``instance.args`` "
245
+"中。为了方便起见,异常实例定义了 :meth:`__str__` ,因此可以直接打印参数而无需引用 ``.args`` "
246
+"。也可以在抛出之前首先实例化异常,并根据需要向其添加任何属性。::"
247
248
#: ../../tutorial/errors.rst:216
249
0 commit comments