44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Freesand Leo <[email protected] >, 201887# Pandaaaa906 <[email protected] >, 201998# stone jing <[email protected] >, 2019109# Iterator <[email protected] >, 201911101211# ruoyu zhang <[email protected] >, 20191312# ppcfish <[email protected] >, 201913+ 14+ # Freesand Leo <[email protected] >, 20211415#
1516#, fuzzy
1617msgid ""
@@ -19,7 +20,7 @@ msgstr ""
1920"Report-Msgid-Bugs-To : \n "
2021"POT-Creation-Date : 2021-08-05 07:09+0000\n "
2122"PO-Revision-Date : 2017-02-16 17:39+0000\n "
22- "Last-Translator : ppcfish <ppcfish@gmail .com>, 2019 \n "
23+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2021 \n "
2324"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2425"MIME-Version : 1.0\n "
2526"Content-Type : text/plain; charset=UTF-8\n "
@@ -41,6 +42,9 @@ msgid ""
4142"behave, so they are very important to the interpreter itself and to any "
4243"extension module that implements new types."
4344msgstr ""
45+ "也许 Python 对象系统中最重要的结构之一就是定义新类型的结构: :c:type:`PyTypeObject` 结构。 类型对象可以使用任何 "
46+ ":c:func:`PyObject_\\ *` 或 :c:func:`PyType_\\ *` 函数来处理,但不能提供大多数 Python "
47+ "应用程序所感兴趣的内容。 这些对象是对象行为的基础,所以它们对解释器本身或任何实现新类型的扩展模块都非常重要。"
4448
4549#: ../../c-api/typeobj.rst:16
4650msgid ""
@@ -51,13 +55,16 @@ msgid ""
5155"detail in this section. The fields will be described in the order in which "
5256"they occur in the structure."
5357msgstr ""
58+ "与大多数标准类型相比,类型对象相当大。这么大的原因是每个类型对象存储了大量的值,大部分是C函数指针,每个指针实现了类型功能的一小部分。本节将详细描述类型对象的字段。这些字段将按照它们在结构中出现的顺序进行描述。"
5459
5560#: ../../c-api/typeobj.rst:23
5661msgid ""
5762"In addition to the following quick reference, the :ref:`typedef-examples` "
5863"section provides at-a-glance insight into the meaning and use of "
5964":c:type:`PyTypeObject`."
6065msgstr ""
66+ "除了下面的快速参考,:ref:`typedef-examples` 小节提供了快速了解 :c:type:`PyTypeObject` "
67+ "的含义和用法的例子。"
6168
6269#: ../../c-api/typeobj.rst:29
6370msgid "Quick Reference"
@@ -617,36 +624,37 @@ msgid ""
617624"are for internal use only. \" <R>\" (as a prefix) means the field is required"
618625" (must be non-``NULL``)."
619626msgstr ""
627+ "小括号中的槽名表示它(实际上)已弃用。尖括号中的名称应该被视为只读的。方括号中的名称仅供内部使用。\" <R>\" (作为前缀)表示该字段是必需的(必须是非null)。"
620628
621629#: ../../c-api/typeobj.rst:156
622630msgid "Columns:"
623631msgstr "列:"
624632
625633#: ../../c-api/typeobj.rst:158
626634msgid "**\" O\" **: set on :c:type:`PyBaseObject_Type`"
627- msgstr ""
635+ msgstr "** \" O \" **: :c:type:`PyBaseObject_Type` 必须设置 "
628636
629637#: ../../c-api/typeobj.rst:160
630638msgid "**\" T\" **: set on :c:type:`PyType_Type`"
631- msgstr ""
639+ msgstr "** \" T \" **: :c:type:`PyType_Type` 必须设置 "
632640
633641#: ../../c-api/typeobj.rst:162
634642msgid "**\" D\" **: default (if slot is set to ``NULL``)"
635- msgstr ""
643+ msgstr "** \" D \" **: 默认设置(如果方法槽被设置为NULL) "
636644
637645#: ../../c-api/typeobj.rst:172
638646msgid "**\" I\" **: inheritance"
639- msgstr ""
647+ msgstr "** \" I \" **: 继承 "
640648
641649#: ../../c-api/typeobj.rst:181
642650msgid ""
643651"Note that some slots are effectively inherited through the normal attribute "
644652"lookup chain."
645- msgstr ""
653+ msgstr "注意,有些方法槽是通过普通属性查找链有效继承的。 "
646654
647655#: ../../c-api/typeobj.rst:187
648656msgid "sub-slots"
649- msgstr ""
657+ msgstr "子方法槽(方法域) "
650658
651659#: ../../c-api/typeobj.rst:193
652660msgid "Slot"
@@ -1163,6 +1171,8 @@ msgid ""
11631171":file:`Include/object.h`. For convenience of reference, this repeats the "
11641172"definition found there:"
11651173msgstr ""
1174+ ":c:type:`PyTypeObject` 的结构定义可以在 :file:`Include/object.h` 中找到。 "
1175+ "为了方便参考,此处复述了其中的定义:"
11661176
11671177#: ../../c-api/typeobj.rst:474
11681178msgid "PyObject Slots"
@@ -1177,6 +1187,10 @@ msgid ""
11771187":c:member:`~PyTypeObject.tp_itemsize`, which means that its instances (i.e. "
11781188"type objects) *must* have the :attr:`ob_size` field."
11791189msgstr ""
1190+ "type 对象结构扩展了 :c:type:`PyVarObject` 结构。 :attr:`ob_size` 字段用于动态类型 (由 "
1191+ ":func:`type_new` 创建,通常通过 class 语句来调用)。 注意 :c:data:`PyType_Type` (元类型) 会初始化 "
1192+ ":c:member:`~PyTypeObject.tp_itemsize`,这意味着它的实例 (即 type 对象) *必须* 具有 "
1193+ ":attr:`ob_size` 字段。"
11801194
11811195#: ../../c-api/typeobj.rst:486
11821196msgid ""
@@ -1234,11 +1248,13 @@ msgid ""
12341248"the type) do *not* count as references. But for dynamically allocated type "
12351249"objects, the instances *do* count as references."
12361250msgstr ""
1251+ "这是类型对象的引用计数,由 ``PyObject_HEAD_INIT`` 宏初始化为 ``1``。 请注意对于静态分配的类型对象 (对象的 "
1252+ ":attr:`ob_type` 指回该类型) *不会* 被加入引用计数。 但对于动态分配的类型对象,实例 *确实* 会被算作引用。"
12371253
12381254#: ../../c-api/typeobj.rst:510 ../../c-api/typeobj.rst:546
12391255#: ../../c-api/typeobj.rst:588
12401256msgid "This field is not inherited by subtypes."
1241- msgstr ""
1257+ msgstr "子类型不继承此字段。 "
12421258
12431259#: ../../c-api/typeobj.rst:515
12441260msgid ""
0 commit comments