8000 [po] auto sync · python/python-docs-zh-cn@83f987a · GitHub
[go: up one dir, main page]

Skip to content

Commit 83f987a

Browse files
[po] auto sync
1 parent c22a448 commit 83f987a

File tree

2 files changed

+29
-5
lines changed

2 files changed

+29
-5
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "80.77%", "updated_at": "2025-01-07T05:55:51Z"}
1+
{"translation": "80.78%", "updated_at": "2025-01-07T06:56:03Z"}

reference/datamodel.po

Lines changed: 28 additions & 4 deletions
4942
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ msgstr ""
16051605
msgid ""
16061606
"The :class:`tuple` of classes that are considered when looking for base "
16071607
"classes during method resolution."
1608-
msgstr ""
1608+
msgstr "由在方法解析期间当查找基类时将被纳入考虑的类组成的 :class:`tuple`。"
16091609

16101610
#: ../../reference/datamodel.rst:1238
16111611
msgid "Special methods"
@@ -1814,10 +1814,13 @@ msgid ""
18141814
"<closure variable>` that a :term:`nested scope` references in an outer "
18151815
"scope. See also :attr:`function.__closure__`."
18161816
msgstr ""
1817+
"一个 :class:`tuple`,其中包含某个 :term:`nested scope` 引用在外部作用域中引用的 containing the "
1818+
"names of :term:`自由(闭包)变量 <closure variable>` 的名称。 另请参阅 "
1819+
":attr:`function.__closure__`。"
18171820

18181821
#: ../../reference/datamodel.rst:1437
18191822
msgid "Note: references to global and builtin names are *not* included."
1820-
msgstr ""
1823+
msgstr "注意:对全局和内置名称的引用 *不会* 被包括在内。"
18211824

18221825
#: ../../reference/datamodel.rst:1440
18231826
msgid ""
@@ -1855,7 +1858,7 @@ msgstr "一个编码了从 :term:`bytecode` 偏移量到行号的映射的字符
18551858
msgid ""
18561859
"This attribute of code objects is deprecated, and may be removed in Python "
18571860
"3.15."
1858-
msgstr ""
1861+
msgstr "代码对象的这个属性已被弃用,并可能在 Python 3.15 中移除。"
18591862

18601863
#: ../../reference/datamodel.rst:1466
18611864
msgid "The required stack size of the code object"
@@ -4923,6 +4926,27 @@ msgid ""
49234926
">>> len(c) # Implicit lookup\n"
49244927
"10"
49254928
msgstr ""
4929+
">>> class Meta(type):\n"
4930+
"... def __getattribute__(*args):\n"
4931+
"... print(\"Metaclass getattribute invoked\")\n"
4932+
"... return type.__getattribute__(*args)\n"
4933+
"...\n"
4934+
">>> class C(object, metaclass=Meta):\n"
4935+
"... def __len__(self):\n"
4936+
"... return 10\n"
4937+
"... def __getattribute__(*args):\n"
4938+
"... print(\"Class getattribute invoked\")\n"
4939+
"... return object.__getattribute__(*args)\n"
4940+
"...\n"
4941+
">>> c = C()\n"
+
">>> c.__len__() # 通过实例的显式查找\n"
4943+
"Class getattribute invoked\n"
4944+
"10\n"
4945+
">>> type(c).__len__(c) # 通过类型的显式查找\n"
4946+
"Metaclass getattribute invoked\n"
4947+
"10\n"
4948+
">>> len(c) # 隐式查找\n"
4949+
"10"
49264950

49274951
#: ../../reference/datamodel.rst:3606
49284952
msgid ""
@@ -5726,7 +5750,7 @@ msgstr "__file__ (模块属性)"
57265750

57275751
#: ../../reference/datamodel.rst:879
57285752
msgid "__cached__ (module attribute)"
5729-
msgstr ""
5753+
msgstr "__cached__ (模块属性)"
57305754

57315755
#: ../../reference/datamodel.rst:879
57325756
msgid "__doc__ (module attribute)"

0 commit comments

Comments
 (0)
0