File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- {"translation" : " 90.66 %" , "updated_at" : " 2023-09-08T01:19:40Z " }
1+ {"translation" : " 90.67 %" , "updated_at" : " 2023-09-08T02:05:42Z " }
Original file line number Diff line number Diff line change @@ -1397,6 +1397,11 @@ msgid ""
13971397":mod:`!Q` in package :mod:`!P` should have the "
13981398":c:member:`~PyTypeObject.tp_name` initializer ``\" P.Q.M.T\" ``."
13991399msgstr ""
1400+ "指向包含类型名称的以 NUL 结尾的字符串的指针。 "
1401+ "对于可作为模块全局访问的类型,该字符串应为模块全名,后面跟一个点号,然后再加类型名称;对于内置类型,它应当只是类型名称。 "
1402+ "如果模块是包的子模块,则包的全名将是模块的全名的一部分。 例如,在包 :mod:`!P` 的子包 :mod:`!Q` 中的模块 :mod:`!M` "
1403+ "中定义的名为 :class:`!T` 的类型应当具有 :c:member:`~PyTypeObject.tp_name` 初始化器 "
1404+ "``\" P.Q.M.T\" ``。"
14001405
14011406#: ../../c-api/typeobj.rst:585
14021407msgid ""
@@ -1414,6 +1419,9 @@ msgid ""
14141419"accessible as the :attr:`__module__` attribute, and everything after the "
14151420"last dot is made accessible as the :attr:`~definition.__name__` attribute."
14161421msgstr ""
1422+ "对于 :ref:`静态分配的类型对象 <static-types>`,*tp_name* 字段应当包含一个点号。 最后一个点号之前的所有内容都可作为 "
1423+ ":attr:`__module__` 属性访问,而最后一个点号之后的所有内容都可作为 :attr:`~definition.__name__` "
1424+ "属性访问。"
14171425
14181426#: ../../c-api/typeobj.rst:596
14191427msgid ""
@@ -1424,6 +1432,10 @@ msgid ""
14241432" pickle. Additionally, it will not be listed in module documentations "
14251433"created with pydoc."
14261434msgstr ""
1435+ "如果不存在点号,则整个 :c:member:`~PyTypeObject.tp_name` 字段将作为 "
1436+ ":attr:`~definition.__name__` 属性访问,而 :attr:`__module__` "
1437+ "属性则将是未定义的(除非在字典中显式地设置,如上文所述)。 这意味着你的类型将无法执行 pickle。 此外,用 pydoc "
1438+ "创建的模块文档中也不会列出该类型。"
14271439
14281440#: ../../c-api/typeobj.rst:602
14291441msgid ""
You can’t perform that action at this time.
0 commit comments