11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2022 , Python Software Foundation
2+ # Copyright (C) 2001-2023 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # CommonZ <[email protected] >, 20218- # Alpha Du <[email protected] >, 20219- # Freesand Leo <[email protected] >, 20217+ # Rafael Fontenelle <[email protected] >, 2023108#
119#, fuzzy
1210msgid ""
1311msgstr ""
14- "Project-Id-Version : Python 3.10 \n "
12+ "Project-Id-Version : Python 3.11 \n "
1513"Report-Msgid-Bugs-To : \n "
16- "POT-Creation-Date : 2022-11 -04 14:28 +0000\n "
17- "PO-Revision-Date : 2021-06-28 00:48 +0000\n "
18- "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2021 \n "
19- "Language-Team : Chinese (China) (https://www .transifex.com/python-doc/teams/5390/zh_CN/)\n "
14+ "POT-Creation-Date : 2023-08 -04 14:46 +0000\n "
15+ "PO-Revision-Date : 2023-05-24 02:08 +0000\n "
16+ "Last-Translator : Rafael Fontenelle <rffontenelle@gmail .com>, 2023 \n "
17+ "Language-Team : Chinese (China) (https://app .transifex.com/python-doc/teams/5390/zh_CN/)\n "
2018"MIME-Version : 1.0\n "
2119"Content-Type : text/plain; charset=UTF-8\n "
2220"Content-Transfer-Encoding : 8bit\n "
@@ -60,27 +58,41 @@ msgstr "返回 *co* 中的自由变量数。"
6058msgid ""
6159"Return a new code object. If you need a dummy code object to create a "
6260"frame, use :c:func:`PyCode_NewEmpty` instead. Calling :c:func:`PyCode_New` "
63- "directly can bind you to a precise Python version since the definition of "
64- "the bytecode changes often."
61+ "directly will bind you to a precise Python version since the definition of "
62+ "the bytecode changes often. The many arguments of this function are inter-"
63+ "dependent in complex ways, meaning that subtle changes to values are likely "
64+ "to result in incorrect execution or VM crashes. Use this function only with "
65+ "extreme care."
6566msgstr ""
66- "返回一个新的代码对象。 如果你需要一个虚拟代码对象来创建一个代码帧,请使用 :c:func:`PyCode_NewEmpty`。 调用 "
67- ":c:func:`PyCode_New` 直接可以绑定到准确的 Python 版本,因为字节码的定义经常变化。"
67+ "返回一个新的代码对象。 如果你需要用一个空白代码对象来创建帧,请改用 :c:func:`PyCode_NewEmpty`。 直接调用 "
68+ ":c:func:`PyCode_New` 将会绑定一个具体 Python 版本,因为字节码经常会变动。 "
69+ "此函数的各种参数存在复杂的相互依赖,这意味着对值的细微改变可能会导致不正确的执行或 VM 的崩溃。 必须非常小心地使用这个函数。"
6870
6971#: ../../c-api/code.rst:45
72+ msgid "Added ``qualname`` and ``exceptiontable`` parameters."
73+ msgstr ""
74+
75+ #: ../../c-api/code.rst:50
7076msgid ""
7177"Similar to :c:func:`PyCode_New`, but with an extra \" posonlyargcount\" for "
72- "positional-only arguments."
73- msgstr "类似于 :c:func:`PyCode_New`,但带有一个额外的 \" posonlyargcount\" 用于仅限位置参数。"
78+ "positional-only arguments. The same caveats that apply to ``PyCode_New`` "
79+ "also apply to this function."
80+ msgstr ""
81+ "与 :c:func:`PyCode_New` 类似,但还有一个针对仅限位置参数的额外的 \" posonlyargcount\" 。 适用于 "
82+ "``PyCode_New`` 的注意事项同样适用于这个函数。"
83+
84+ #: ../../c-api/code.rst:55
85+ msgid "Added ``qualname`` and ``exceptiontable`` parameters."
86+ msgstr ""
7487
75- #: ../../c-api/code.rst:51
88+ #: ../../c-api/code.rst:60
7689msgid ""
7790"Return a new empty code object with the specified filename, function name, "
78- "and first line number. It is illegal to :func:`exec` or :func:`eval` the "
79- "resulting code object."
80- msgstr ""
81- "返回具有指定文件名、函数名和第一行号的新空代码对象。 对于 :func:`exec` 或 :func:`eval` 生成的代码对象是非法的。"
91+ "and first line number. The resulting code object will raise an ``Exception``"
92+ " if executed."
93+ msgstr "返回一个具有指定用户名、函数名和首行行号的空代码对象。 结果代码对象如果被执行则将引发一个 ``Exception``。"
8294
83- #: ../../c-api/code.rst:57
95+ #: ../../c-api/code.rst:66
8496msgid ""
8597"Return the line number of the instruction that occurs on or before "
8698"``byte_offset`` and ends after it. If you just need the line number of a "
@@ -89,12 +101,82 @@ msgstr ""
89101"返回在 ``byte_offset`` 位置或之前以及之后发生的指令的行号。 如果你只需要一个帧的行号,请改用 "
90102":c:func:`PyFrame_GetLineNumber`。"
91103
92- #: ../../c-api/code.rst:60
104+ #: ../../c-api/code.rst:69
93105msgid ""
94106"For efficiently iterating over the line numbers in a code object, use `the "
95- "API described in PEP 626 <https://www .python.org/dev/peps/ pep-0626/#out-of-"
96- "process- debuggers-and-profilers>`_."
107+ "API described in PEP 626 <https://peps .python.org/pep-0626/#out-of-process -"
108+ "debuggers-and-profilers>`_."
97109msgstr ""
98- "要高效地迭代一个代码对象中的行号 ,请使用 `PEP 626 描述的 API "
99- "<https://www .python.org/dev/peps /pep-0626/#out-of-process-debuggers-and-"
110+ "要高效地对代码对象中的行号进行迭代 ,请使用 `在 PEP 626 中描述的 API "
111+ "<https://peps .python.org/pep-0626/#out-of-process-debuggers-and-"
100112"profilers>`_。"
113+
114+ #: ../../c-api/code.rst:74
115+ msgid ""
116+ "Sets the passed ``int`` pointers to the source code line and column numbers "
117+ "for the instruction at ``byte_offset``. Sets the value to ``0`` when "
118+ "information is not available for any particular element."
119+ msgstr ""
120+ "将传入的 ``int`` 指针设为 ``byte_offset`` 处的指令的源代码行编号和列编号。 当没有任何特定元素的信息时则将值设为 ``0``。"
121+
122+ #: ../../c-api/code.rst:78
123+ msgid "Returns ``1`` if the function succeeds and 0 otherwise."
124+ msgstr "如果函数执行成功则返回 ``1`` 否则返回 0。"
125+
126+ #: ../../c-api/code.rst:84
127+ msgid ""
128+ "Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong "
129+ "reference to a :c:type:`PyBytesObject` representing the bytecode in a code "
130+ "object. On error, ``NULL`` is returned and an exception is raised."
131+ msgstr ""
132+ "等价于 Python 代码 ``getattr(co, 'co_code')``。 返回一个指向表示代码对象中的字节码的 "
133+ ":c:type:`PyBytesObject` 的强引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
134+
135+ #: ../../c-api/code.rst:89
136+ msgid ""
137+ "This ``PyBytesObject`` may be created on-demand by the interpreter and does "
138+ "not necessarily represent the bytecode actually executed by CPython. The "
139+ "primary use case for this function is debuggers and profilers."
140+ msgstr ""
141+ "这个 ``PyBytesObject`` 可以由解释器按需创建并且不必代表 CPython 所实际执行的字节码。 "
142+ "此函数的主要用途是调试器和性能分析工具。"
143+
144+ #: ../../c-api/code.rst:97
145+ msgid ""
146+ "Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new "
147+ "reference to a :c:type:`PyTupleObject` containing the names of the local "
148+ "variables. On error, ``NULL`` is returned and an exception is raised."
149+ msgstr ""
150+ "等价于 Python 代码 ``getattr(co, 'co_varnames')``。 返回一个指向包含局部变量名称的 "
151+ ":c:type:`PyTupleObject` 的新引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
152+
153+ #: ../../c-api/code.rst:106
154+ msgid ""
155+ "Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new "
156+ "reference to a :c:type:`PyTupleObject` containing the names of the local "
157+ "variables that are referenced by nested functions. On error, ``NULL`` is "
158+ "returned and an exception is raised."
159+ msgstr ""
160+ "等价于 Python 代码 ``getattr(co, 'co_cellvars')``。 返回一个包含被嵌套的函数所引用的局部变量名称的 "
161+ ":c:type:`PyTupleObject` 的新引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
162+
163+ #: ../../c-api/code.rst:115
164+ msgid ""
165+ "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new "
166+ "reference to a :c:type:`PyTupleObject` containing the names of the free "
167+ "variables. On error, ``NULL`` is returned and an exception is raised."
168+ msgstr ""
169+ "等价于 Python 代码 ``getattr(co, 'co_freevars')``。 返回一个指向包含自由变量名称的 "
170+ ":c:type:`PyTupleObject` 的新引用。 当出错时,将返回 ``NULL`` 并引发一个异常。"
171+
172+ #: ../../c-api/code.rst:3
173+ msgid "object"
174+ msgstr "object -- 对象"
175+
176+ #: ../../c-api/code.rst:3
177+ msgid "code"
178+ msgstr "code"
179+
180+ #: ../../c-api/code.rst:3
181+ msgid "code object"
182+ msgstr "代码对象"
0 commit comments