11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2022 , Python Software Foundation
2+ # Copyright (C) 2001-2023 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Freesand Leo <[email protected] >, 20218- 9- 10- # Naisen Xu <[email protected] >, 20217+ # Rafael Fontenelle <[email protected] >, 2023118#
129#, fuzzy
1310msgid ""
1411msgstr ""
15- "Project-Id-Version : Python 3.10 \n "
12+ "Project-Id-Version : Python 3.11 \n "
1613"Report-Msgid-Bugs-To : \n "
17- "POT-Creation-Date : 2022-11-04 14:28 +0000\n "
18- "PO-Revision-Date : 2021-06-28 00:47 +0000\n "
19- "Last-Translator : Naisen Xu <723648649@qq .com>, 2021 \n "
20- "Language-Team : Chinese (China) (https://www .transifex.com/python-doc/teams/5390/zh_CN/)\n "
14+ "POT-Creation-Date : 2023-08-11 14:43 +0000\n "
15+ "PO-Revision-Date : 2023-05-24 02:08 +0000\n "
16+ "Last-Translator : Rafael Fontenelle <rffontenelle@gmail .com>, 2023 \n "
17+ "Language-Team : Chinese (China) (https://app .transifex.com/python-doc/teams/5390/zh_CN/)\n "
2118"MIME-Version : 1.0\n "
2219"Content-Type : text/plain; charset=UTF-8\n "
2320"Content-Transfer-Encoding : 8bit\n "
@@ -36,6 +33,8 @@ msgid ""
3633"detector's set of observed objects. Other fields of the object are not "
3734"affected."
3835msgstr ""
36+ "用它的类型和初始引用来初始化新分配对象 *op*。返回已初始化的对象。如果 *type* 明该对象参与循环垃圾检测器,则将其添加到检测器的观察对象集中。"
37+ " 对象的其他字段不受影响。"
3938
4039#: ../../c-api/allocation.rst:26
4140msgid ""
@@ -46,56 +45,54 @@ msgstr "它的功能和 :c:func:`PyObject_Init` 一样,并且会初始化变
4645#: ../../c-api/allocation.rst:32
4746msgid ""
4847"Allocate a new Python object using the C structure type *TYPE* and the "
49- "Python type object *type*. Fields not defined by the Python object header "
50- "are not initialized; the object's reference count will be one. The size of "
48+ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
49+ "Python object header are not initialized. The caller will own the only "
50+ "reference to the object (i.e. its reference count will be one). The size of "
5151"the memory allocation is determined from the "
5252":c:member:`~PyTypeObject.tp_basicsize` field of the type object."
5353msgstr ""
54- "使用 C 结构类型 *TYPE* 和 Python 类型对象 *type* 分配一个新的 Python 对象。 未在该 Python "
55- "对象标头中定义的字段不会被初始化;对象的引用计数将为一。 内存分配大小由 type 对象的 "
56- ":c:member:`~PyTypeObject.tp_basicsize` 字段来确定。"
5754
58- #: ../../c-api/allocation.rst:41
55+ #: ../../c-api/allocation.rst:43
5956msgid ""
6057"Allocate a new Python object using the C structure type *TYPE* and the "
61- "Python type object *type*. Fields not defined by the Python object header "
62- "are not initialized. The allocated memory allows for the *TYPE* structure "
63- "plus *size* fields of the size given by the "
64- ":c:member:`~PyTypeObject.tp_itemsize` field of *type *. This is useful for "
65- "implementing objects like tuples, which are able to determine their size at "
66- "construction time. Embedding the array of fields into the same allocation "
67- "decreases the number of allocations, improving the memory management "
68- "efficiency."
58+ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
59+ "Python object header are not initialized. The allocated memory allows for "
60+ "the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
61+ "by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj *. This is "
62+ "useful for implementing objects like tuples, which are able to determine "
63+ "their size at construction time. Embedding the array of fields into the "
64+ "same allocation decreases the number of allocations, improving the memory "
65+ "management efficiency."
6966msgstr ""
70- "使用C的数据结构类型 *TYPE* 和Python的类型对象 *type* "
71- "分配一个新的Python对象。Python对象头文件中没有定义的字段不会被初始化。被分配的内存空间预留了 *TYPE* 结构加 *type* 对象中 "
72- ":c:member:`~PyTypeObject.tp_itemsize` 字段提供的 *size* "
73- "字段的值。这对于实现类似元组这种能够在构造期决定自己大小的对象是很实用的。将字段的数组嵌入到相同的内存分配中可以减少内存分配的次数,这提高了内存分配的效率 。"
67+ "使用 C 结构类型 *TYPE* 和 Python 类型对象 *typeobj* (``PyTypeObject*``) 分配一个新的 Python "
68+ "对象。 未在该 Python 对象标头中定义的字段不会被初始化。 被分配的内存允许 *TYPE* 结构加 *typeobj* 的 "
69+ ":c:member:`~PyTypeObject.tp_itemsize` 字段所给出的 *size* (``Py_ssize_t``) 个字段。 "
70+ "这对于实现像元组这样能够在构造时确定其大小的对象来说很有用。 将字段数组嵌入到相同的内在分配中可减少内存分配的次数,这提高了内存管理效率 。"
7471
75- #: ../../c-api/allocation.rst:53
72+ #: ../../c-api/allocation.rst:57
7673msgid ""
77- "Releases memory allocated to an object using :c:func :`PyObject_New` or "
78- ":c:func :`PyObject_NewVar`. This is normally called from the "
74+ "Releases memory allocated to an object using :c:macro :`PyObject_New` or "
75+ ":c:macro :`PyObject_NewVar`. This is normally called from the "
7976":c:member:`~PyTypeObject.tp_dealloc` handler specified in the object's type."
8077" The fields of the object should not be accessed after this call as the "
8178"memory is no longer a valid Python object."
8279msgstr ""
83- "释放由 :c:func :`PyObject_New` 或者 :c:func :`PyObject_NewVar` "
84- "分配内存的对象。这通常由对象的type字段定义的 :c:member:`~PyTypeObject.tp_dealloc` "
85- "处理函数来调用。调用这个函数以后op对象中的字段都不可以被访问,因为原分配的内存空间已不再是一个有效的Python对象 。"
80+ "释放使用 :c:macro :`PyObject_New` 或 :c:macro :`PyObject_NewVar` 分配给一个对象的内存。 "
81+ "这通常由在对象的类型中指定的 :c:member:`~PyTypeObject.tp_dealloc` 处理句柄来调用。 "
82+ "在此调用之后该对象中的字段不应再被访问因为原来的内存已不再是一个有效的 Python 对象 。"
8683
87- #: ../../c-api/allocation.rst:62
84+ #: ../../c-api/allocation.rst:66
8885msgid ""
8986"Object which is visible in Python as ``None``. This should only be accessed"
9087" using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
9188"object."
9289msgstr ""
9390"这个对象是像 ``None`` 一样的 Python 对象。它可以使用 :c:macro:`Py_None` 宏访问,该宏的拿到指向该对象的指针。"
9491
95- #: ../../c-api/allocation.rst:69
92+ #: ../../c-api/allocation.rst:73
9693msgid ":c:func:`PyModule_Create`"
9794msgstr ":c:func:`PyModule_Create`"
9895
99- #: ../../c-api/allocation.rst:70
96+ #: ../../c-api/allocation.rst:74
10097msgid "To allocate and create extension modules."
10198msgstr "分配内存和创建扩展模块"
0 commit comments