@@ -972,6 +972,8 @@ msgid ""
972
972
"with a reference to :c:type:`PyList_Type`; it should be done later in the "
973
973
"module initialization function::"
974
974
msgstr ""
975
+ ":c:type:`PyTypeObject` 支持用 :c:member:`~PyTypeObject.tp_base` 指定类型的实体基类。 "
976
+ "由于跨平台编译器问题,你无法使用对 :c:type:`PyList_Type` 的引用来直接填充该字段;它应当随后在模块初始化函数中完成::"
975
977
976
978
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:881
977
979
msgid ""
@@ -981,12 +983,15 @@ msgid ""
981
983
":c:member:`~PyTypeObject.tp_alloc` slot with :c:func:`PyType_GenericNew` -- "
982
984
"the allocation function from the base type will be inherited."
983
985
msgstr ""
986
+ "在调用 :c:func:`PyType_Ready` 之前,类型结构体必须已经填充 :c:member:`~PyTypeObject.tp_base` "
987
+ "槽位。 当我们从现有类型派生时,它不需要将 :c:member:`~PyTypeObject.tp_alloc` 槽位填充为 "
988
+ ":c:func:`PyType_GenericNew` -- 来自基类型的分配函数将会被继承。"
984
989
985
990
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:887
986
991
msgid ""
987
992
"After that, calling :c:func:`PyType_Ready` and adding the type object to the"
988
993
" module is the same as with the basic :class:`Custom` examples."
989
- msgstr ""
994
+ msgstr "在那之后,调用 :c:func:`PyType_Ready` 并向模块添加类型对象是与基本的 :class:`Custom` 示例一样的。 "
990
995
991
996
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:892
992
997
msgid "Footnotes"
@@ -1003,6 +1008,7 @@ msgid ""
1003
1008
"We relied on this in the :c:member:`~PyTypeObject.tp_dealloc` handler in "
1004
1009
"this example, because our type doesn't support garbage collection."
1005
1010
msgstr ""
1011
+ "在本示例中我们需要 :c:member:`~PyTypeObject.tp_dealloc` 处理句柄中的这一机制,因为我们的类型不支持垃圾回收。"
1006
1012
1007
1013
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/extending/newtypes_tutorial.rst:899
1008
1014
msgid ""
0 commit comments