Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa86022

Browse files
[po] auto sync
1 parent a4c888e commit fa86022

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

extending/newtypes.po

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ msgid ""
293293
":c:member:`~PyTypeObject.tp_setattro` fields ``NULL`` as well, allowing the "
294294
"base type to handle attributes."
295295
msgstr ""
296+
"当 :c:func:`PyType_Ready` 被调用时,它会使用由类型对象所引用的三个表来创建要放置到类型对象的字典中的 "
297+
":term:`descriptor`。 每个描述器控制对实例对象的一个属性的访问。 每个表都是可选的;如果三个表全都为 "
298+
"``NULL``,则该类型的实例将只有从它们的基础类型继承来的属性,并且还应当让 "
299+
":c:member:`~PyTypeObject.tp_getattro` 和 "
300+
":c:member:`~PyTypeObject.tp_setattro` 字段保持为 ``NULL``,以允许由基础类型处理这些属性。"
296301

297302
#: ../../extending/newtypes.rst:241
298303
msgid "The tables are declared as three fields of the type object::"
@@ -304,6 +309,8 @@ msgid ""
304309
" array of :c:type:`PyMethodDef` structures. Each entry in the table is an "
305310
"instance of this structure::"
306311
msgstr ""
312+
"如果 :c:member:`~PyTypeObject.tp_methods` 不为 ``NULL``,则它必须指向一个由 "
313+
":c:type:`PyMethodDef` 结构体组成的数组。 表中的每个条目都是该结构体的一个实例::"
307314

308315
#: ../../extending/newtypes.rst:258
309316
msgid ""
@@ -312,14 +319,16 @@ msgid ""
312319
" needed at the end; it is a sentinel that marks the end of the array. The "
313320
":attr:`ml_name` field of the sentinel must be ``NULL``."
314321
msgstr ""
322+
"应当为该类型所提供的每个方法都定义一个条目;从基础类型继承来的方法不需要条目。 还需要在末尾加一个额外的条目;它是一个标记数组结束的哨兵条目。 "
323+
"该哨兵条目的 :attr:`ml_name` 字段必须为 ``NULL``。"
315324

316325
#: ../../extending/newtypes.rst:263
317326
msgid ""
318327
"The second table is used to define attributes which map directly to data "
319328
"stored in the instance. A variety of primitive C types are supported, and "
320329
"access may be read-only or read-write. The structures in the table are "
321330
"defined as::"
322-
msgstr ""
331+
msgstr "第二个表被用来定义要直接映射到实例中的数据的属性。 各种原始 C 类型均受到支持,并且访问方式可以为只读或读写。 表中的结构体被定义为::"
323332

324333
#: ../../extending/newtypes.rst:275
325334
msgid ""
@@ -331,6 +340,9 @@ msgid ""
331340
":attr:`flags` field is used to store flags which control how the attribute "
332341
"can be accessed."
333342
msgstr ""
343+
"对于表中的每个条目,将构建一个 :term:`descriptor` 并添加到类型中使其能够从实例结构体中提取值。 :attr:`type` "
344+
"字段应当包含在 :file:`structmember.h` 头文件中定义的某个类型的代码;该值将被用来确定如何将 Python 值转换为 C "
345+
"值或者反之。 :attr:`flags` 字段将被用来储存控制属性可以如何被访问的旗标。"
334346

335347
#: ../../extending/newtypes.rst:282
336348
msgid ""

0 commit comments

Comments
 (0)