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

Skip to content

Commit caa3941

Browse files
[po] auto sync
1 parent 6b4bcac commit caa3941

File tree

6 files changed

+232
-201
lines changed

6 files changed

+232
-201
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.04%", "updated_at": "2025-03-21T16:58:16Z"}
1+
{"translation": "81.06%", "updated_at": "2025-03-22T10:55:45Z"}

c-api/typeobj.po

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,6 +1605,10 @@ msgid ""
16051605
":c:member:`!tp_basicsize`. (Exceptions to this rule can be made using "
16061606
":c:func:`PyUnstable_Object_GC_NewWithExtraData`.)"
16071607
msgstr ""
1608+
"类型可分为两种:实例为固定长度且 :c:member:`!tp_itemsize` 字段值为零的类型;实例为可变长度且 "
1609+
":c:member:`!tp_itemsize` 字段值不为零的类型。 对于实例为固定长度的类型,所有实例都具有相同的由 "
1610+
":c:member:`!tp_basicsize` 给出的大小。 (这条规则的例外情况可通过使用 "
1611+
":c:func:`PyUnstable_Object_GC_NewWithExtraData` 来实现。)"
16081612

16091613
#: ../../c-api/typeobj.rst:604
16101614
msgid ""
@@ -1613,6 +1617,8 @@ msgid ""
16131617
":c:member:`!tp_basicsize` plus N times :c:member:`!tp_itemsize`, where N is "
16141618
"the \"length\" of the object."
16151619
msgstr ""
1620+
"对于实例为可变长度的类型,其实例必须具有 :c:member:`~PyVarObject.ob_size` 字段,且实例大小为 "
1621+
":c:member:`!tp_basicsize` 加 N 乘以 :c:member:`!tp_itemsize`,其中 N 为对象的“长度”。"
16161622

16171623
#: ../../c-api/typeobj.rst:609
16181624
msgid ""
@@ -1624,12 +1630,19 @@ msgid ""
16241630
"underlying storage and its size should be acessed using "
16251631
":c:func:`PyLong_Expo 8000 rt`."
16261632
msgstr ""
1633+
":c:func:`PyObject_NewVar` 等函数接受 N 值作为参数,并将其保存在实例的 "
1634+
":c:member:`~PyVarObject.ob_size` 字段中。 请注意在此之后 "
1635+
":c:member:`~PyVarObject.ob_size` 字段可能还有其他用处。 例如,:py:type:`int` "
1636+
"实例会以具体实现所定义的方式来使用 :c:member:`~PyVarObject.ob_size` 的比特位;下层的存储及其大小应当使用 "
1637+
":c:func:`PyLong_Export` 来访问。"
16271638

16281639
#: ../../c-api/typeobj.rst:619
16291640
msgid ""
16301641
"The :c:member:`~PyVarObject.ob_size` field should be accessed using the "
16311642
":c:func:`Py_SIZE()` and :c:func:`Py_SET_SIZE()` macros."
16321643
msgstr ""
1644+
":c:member:`~PyVarObject.ob_size` 字段应当使用 :c:func:`Py_SIZE()` 和 "
1645+
":c:func:`Py_SET_SIZE()` 宏来访问。"
16331646

16341647
#: ../../c-api/typeobj.rst:622
16351648
msgid ""
@@ -1640,6 +1653,10 @@ msgid ""
16401653
":py:type:`int`, avoid reading lists' :c:member:`!ob_size` directly. Call "
16411654
":c:func:`PyList_Size` instead.)"
16421655
msgstr ""
1656+
"此外,实例布局中存在 :c:member:`~PyVarObject.ob_size` 字段并不意味着该实例结构体是可变长度的。 "
1657+
"例如,:py:type:`list` 类型实例即为固定长度,虽然其实例具有 :c:member:`~PyVarObject.ob_size` 字段。 "
1658+
"(和 :py:type:`int` 一样,请避免直接读取 list 的 :c:member:`!ob_size`。 要改为调用 "
1659+
":c:func:`PyList_Size` 函数。)"
16431660

16441661
#: ../../c-api/typeobj.rst:629
16451662
msgid ""

0 commit comments

Comments
 (0)
0