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 779f0d5 commit 6d4068eCopy full SHA for 6d4068e
1 file changed
c-api/intro.po
@@ -665,6 +665,10 @@ msgid ""
665
"also reduces the often unwanted lifetime extension for objects that are "
666
"referenced by the stack frames in the traceback."
667
msgstr ""
668
+"请注意自 Python 1.5 开始,从 Python 代码访问异常状态的首选的、线程安全的方式是调用函数 "
669
+":func:`sys.exc_info`,它将返回 Python 代码的分线程异常状态。 "
670
+"此外,这两种访问异常状态的方式的语义都发生了变化因而捕获到异常的函数将保存并恢复其线程的异常状态以保留其调用方的异常状态。 "
671
+"这将防止异常处理代码中由一个看起来很无辜的函数覆盖了正在处理的异常所造成的常见错误;它还减少了在回溯由栈帧所引用的对象的往往不被需要的生命其延长。"
672
673
#: ../../c-api/intro.rst:554
674
msgid ""
0 commit comments