44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Freesand Leo <[email protected] >, 201987# Pandaaaa906 <[email protected] >, 201998# ppcfish <[email protected] >, 20199+ 10+ # Freesand Leo <[email protected] >, 20211011#
1112#, fuzzy
1213msgid ""
@@ -15,7 +16,7 @@ msgstr ""
1516"Report-Msgid-Bugs-To : \n "
1617"POT-Creation-Date : 2021-01-01 16:02+0000\n "
1718"PO-Revision-Date : 2019-09-01 03:38+0000\n "
18- "Last-Translator : ppcfish <ppcfish@gmail .com>, 2019 \n "
19+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2021 \n "
1920"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2021"MIME-Version : 1.0\n "
2122"Content-Type : text/plain; charset=UTF-8\n "
@@ -37,6 +38,9 @@ msgid ""
3738"behave, so they are very important to the interpreter itself and to any "
3839"extension module that implements new types."
3940msgstr ""
41+ "也许 Python 对象系统中最重要的结构之一就是定义新类型的结构: :c:type:`PyTypeObject` 结构。 类型对象可以使用任何 "
42+ ":c:func:`PyObject_\\ *` 或 :c:func:`PyType_\\ *` 函数来处理,但不能提供大多数 Python "
43+ "应用程序所感兴趣的内容。 这些对象是对象行为的基础,所以它们对解释器本身或任何实现新类型的扩展模块都非常重要。"
4044
4145#: ../../c-api/typeobj.rst:16
4246msgid ""
@@ -47,6 +51,7 @@ msgid ""
4751"detail in this section. The fields will be described in the order in which "
4852"they occur in the structure."
4953msgstr ""
54+ "与大多数标准类型相比,类型对象相当大。这么大的原因是每个类型对象存储了大量的值,大部分是C函数指针,每个指针实现了类型功能的一小部分。本节将详细描述类型对象的字段。这些字段将按照它们在结构中出现的顺序进行描述。"
5055
5156#: ../../c-api/typeobj.rst:23
5257msgid ""
@@ -62,6 +67,8 @@ msgid ""
6267":file:`Include/object.h`. For convenience of reference, this repeats the "
6368"definition found there:"
6469msgstr ""
70+ ":c:type:`PyTypeObject` 的结构定义可以在 :file:`Include/object.h` 中找到。 "
71+ "为了方便参考,此处复述了其中的定义:"
6572
6673#: ../../c-api/typeobj.rst:35
6774msgid ""
@@ -72,6 +79,10 @@ msgid ""
7279":c:member:`~PyTypeObject.tp_itemsize`, which means that its instances (i.e. "
7380"type objects) *must* have the :attr:`ob_size` field."
7481msgstr ""
82+ "type 对象结构扩展了 :c:type:`PyVarObject` 结构。 :attr:`ob_size` 字段用于动态类型 (由 "
83+ ":func:`type_new` 创建,通常通过 class 语句来调用)。 注意 :c:data:`PyType_Type` (元类型) 会初始化 "
84+ ":c:member:`~PyTypeObject.tp_itemsize`,这意味着它的实例 (即 type 对象) *必须* 具有 "
85+ ":attr:`ob_size` 字段。"
7586
7687#: ../../c-api/typeobj.rst:45
7788msgid ""
@@ -101,7 +112,7 @@ msgstr ""
101112#: ../../c-api/typeobj.rst:65 ../../c-api/typeobj.rst:94
102113#: ../../c-api/typeobj.rst:122
103114msgid "This field is not inherited by subtypes."
104- msgstr ""
115+ msgstr "子类型不继承此字段。 "
105116
106117#: ../../c-api/typeobj.rst:70
107118msgid ""
0 commit comments