@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.12\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2024-05-11 19:07 +0000\n "
14+ "POT-Creation-Date : 2024-06-20 07:11 +0000\n "
1515"PO-Revision-Date : 2024-05-11 00:33+0000\n "
1616"
Last-Translator :
Rafael Fontenelle <[email protected] >, 2024\n "
1717"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -23,7 +23,7 @@ msgstr ""
2323
2424#: ../../library/symtable.rst:2
2525msgid ":mod:`!symtable` --- Access to the compiler's symbol tables"
26- msgstr ""
26+ msgstr ":mod:`!symtable` --- 访问编译器的符号表 "
2727
2828#: ../../library/symtable.rst:7
2929msgid "**Source code:** :source:`Lib/symtable.py`"
@@ -165,77 +165,101 @@ msgid ""
165165msgstr "类的命名空间。 该类继承自 :class:`SymbolTable`。"
166166
167167#: ../../library/symtable.rst:130
168- msgid "Return a tuple containing the names of methods declared in the class."
169- msgstr "返回类中声明的方法名组成的元组。"
168+ msgid ""
169+ "Return a tuple containing the names of method-like functions declared in the"
170+ " class."
171+ msgstr ""
170172
171- #: ../../library/symtable.rst:135
173+ #: ../../library/symtable.rst:133
174+ msgid ""
175+ "Here, the term 'method' designates *any* function defined in the class body "
176+ "via :keyword:`def` or :keyword:`async def`."
177+ msgstr ""
178+
179+ #: ../../library/symtable.rst:136
180+ msgid ""
181+ "Functions defined in a deeper scope (e.g., in an inner class) are not picked"
182+ " up by :meth:`get_methods`."
183+ msgstr ""
184+
185+ #: ../../library/symtable.rst:139
186+ msgid "For example:"
187+ msgstr "例如:"
188+
189+ #: ../../library/symtable.rst:161
190+ msgid ""
191+ "Although ``A().f()`` raises :exc:`TypeError` at runtime, ``A.f`` is still "
192+ "considered as a method-like function."
193+ msgstr ""
194+
195+ #: ../../library/symtable.rst:166
172196msgid ""
173197"An entry in a :class:`SymbolTable` corresponding to an identifier in the "
174198"source. The constructor is not public."
175199msgstr ":class:`SymbolTable` 中的数据项,对应于源码中的某个标识符。构造函数不公开。"
176200
177- #: ../../library/symtable.rst:140
201+ #: ../../library/symtable.rst:171
178202msgid "Return the symbol's name."
179203msgstr "返回符号名"
180204
181- #: ../../library/symtable.rst:144
205+ #: ../../library/symtable.rst:175
182206msgid "Return ``True`` if the symbol is used in its block."
183207msgstr "如果符号在代码块中被引用了,则返回 ``True``。"
184208
185- #: ../../library/symtable.rst:148
209+ #: ../../library/symtable.rst:179
186210msgid "Return ``True`` if the symbol is created from an import statement."
187211msgstr "如果符号是由导入语句创建的,则返回 ``True``。"
188212
189- #: ../../library/symtable.rst:152
213+ #: ../../library/symtable.rst:183
190214msgid "Return ``True`` if the symbol is a parameter."
191215msgstr "如果符号是参数,返回 ``True``。"
192216
193- #: ../../library/symtable.rst:156
217+ #: ../../library/symtable.rst:187
194218msgid "Return ``True`` if the symbol is global."
195219msgstr "如果符号是全局变量,则返回 ``True``。"
196220
197- #: ../../library/symtable.rst:160
221+ #: ../../library/symtable.rst:191
198222msgid "Return ``True`` if the symbol is nonlocal."
199223msgstr "如果符号为非局部变量,则返回 ``True``。"
200224
201- #: ../../library/symtable.rst:164
225+ #: ../../library/symtable.rst:195
202226msgid ""
203227"Return ``True`` if the symbol is declared global with a global statement."
204228msgstr "如果符号用 global 声明为全局变量,则返回 ``True``。"
205229
206- #: ../../library/symtable.rst:168
230+ #: ../../library/symtable.rst:199
207231msgid "Return ``True`` if the symbol is local to its block."
208232msgstr "如果符号是代码块内的局部变量,则返回 ``True``。"
209233
210- #: ../../library/symtable.rst:172
234+ #: ../../library/symtable.rst:203
211235msgid "Return ``True`` if the symbol is annotated."
212236msgstr "如果符号带有注解,则返回 ``True``。"
213237
214- #: ../../library/symtable.rst:178
238+ #: ../../library/symtable.rst:209
215239msgid ""
216240"Return ``True`` if the symbol is referenced in its block, but not assigned "
217241"to."
218242msgstr "如果符号在代码块中被引用,但未赋值,则返回 ``True``。"
219243
220- #: ../../library/symtable.rst:183
244+ #: ../../library/symtable.rst:214
221245msgid "Return ``True`` if the symbol is assigned to in its block."
222246msgstr "如果符号在代码块中赋值,则返回 ``True``。"
223247
224- #: ../../library/symtable.rst:187
248+ #: ../../library/symtable.rst:218
225249msgid "Return ``True`` if name binding introduces new namespace."
226250msgstr "如果符号名绑定引入了新的命名空间,则返回 ``True``。"
227251
228- #: ../../library/symtable.rst:189
252+ #: ../../library/symtable.rst:220
229253msgid ""
230254"If the name is used as the target of a function or class statement, this "
231255"will be true."
232256msgstr "如果符号名用于函数或类定义语句,则为 True。"
233257
234- #: ../../library/symtable.rst:192
258+ #: ../../library/symtable.rst:223
235259msgid "For example::"
236260msgstr "例如:"
237261
238- #: ../../library/symtable.rst:198
262+ #: ../../library/symtable.rst:229
239263msgid ""
240264"Note that a single name can be bound to multiple objects. If the result is "
241265"``True``, the name may also be bound to other objects, like an int or list, "
@@ -244,11 +268,11 @@ msgstr ""
244268"注意,一个符号名可以与多个对象绑定。如果结果为 ``True``,则该符号名还可以绑定到其他对象上,比如 int 或 list "
245269",且不会引入新的命名空间。"
246270
247- #: ../../library/symtable.rst:204
271+ #: ../../library/symtable.rst:235
248272msgid "Return a list of namespaces bound to this name."
249273msgstr "返回与符号名绑定的命名空间的列表。"
250274
251- #: ../../library/symtable.rst:208
275+ #: ../../library/symtable.rst:239
252276msgid ""
253277"Return the namespace bound to this name. If more than one or no namespace is"
254278" bound to this name, a :exc:`ValueError` is raised."
0 commit comments