1414# Bryan不可思议, 2023
1515# Nyuan Zhang, 2023
1616# Rafael Fontenelle <[email protected] >, 202417+ # Kevin Deng <[email protected] >, 20241718# Freesand Leo <[email protected] >, 20241819#
1920#, fuzzy
2021msgid ""
2122msgstr ""
2223"Project-Id-Version : Python 3.8\n "
2324"Report-Msgid-Bugs-To : \n "
24- "POT-Creation-Date : 2024-01-06 00:05 +0000\n "
25+ "POT-Creation-Date : 2024-01-13 00:12 +0000\n "
2526"PO-Revision-Date : 2020-05-30 11:51+0000\n "
2627"
Last-Translator :
Freesand Leo <[email protected] >, 2024\n "
2728"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -2590,7 +2591,7 @@ msgid ""
25902591":c:type:`PyGetSetDef` structures, declaring computed attributes of instances"
25912592" of this type."
25922593msgstr ""
2593- "一个可选的指向 :c:type:`PyGetSetDef` 结构体的以 ``NULL`` 结束的静态数组的指针,它声明了此类型的实例中被计算出的属性 。"
2594+ "一个可选的指向 :c:type:`PyGetSetDef` 结构体的以 ``NULL`` 结束的静态数组的指针,它声明了此类型的实例中的被计算属性 。"
25942595
25952596#: ../../c-api/typeobj.rst:1501
25962597msgid ""
@@ -2961,7 +2962,7 @@ msgstr ""
29612962
29622963#: ../../c-api/typeobj.rst:1809
29632964msgid "Tuple of base types."
2964- msgstr ""
2965+ msgstr "基类型的元组。 "
29652966
29662967#: ../../c-api/typeobj.rst:1811
29672968msgid ""
@@ -3005,17 +3006,17 @@ msgstr "弱引用列表头,用于指向该类型对象的弱引用。 不会
30053006msgid ""
30063007"This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` "
30073008"instead."
3008- msgstr ""
3009+ msgstr "该字段已被弃用。 请改用 :c:member:`~PyTypeObject.tp_finalize`。 "
30093010
30103011#: ../../c-api/typeobj.rst:1866
30113012msgid "Used to index into the method cache. Internal use only."
3012- msgstr ""
3013+ msgstr "用于索引至方法缓存。 仅限内部使用。 "
30133014
30143015#: ../../c-api/typeobj.rst:1875
30153016msgid ""
30163017"An optional pointer to an instance finalization function. Its signature "
30173018"is::"
3018- msgstr ""
3019+ msgstr "一个可选的指向实例最终化函数的指针。 函数的签名为:: "
30193020
30203021#: ../../c-api/typeobj.rst:1879
30213022msgid ""
@@ -3026,13 +3027,16 @@ msgid ""
30263027" before attempting to break reference cycles, ensuring that it finds the "
30273028"object in a sane state."
30283029msgstr ""
3030+ "如果设置了 :c:member:`~PyTypeObject.tp_finalize`,解释器将在最终化特定实例时调用它一次。 "
3031+ "它将由垃圾回收器调用(如果实例是单独循环引用的一部分)或是在对象被释放之前被调用。 "
3032+ "不论是哪种方式,它都肯定会在尝试打破循环引用之前被调用,以确保它所操作的对象处于正常状态。"
30293033
30303034#: ../../c-api/typeobj.rst:1886
30313035msgid ""
30323036":c:member:`~PyTypeObject.tp_finalize` should not mutate the current "
30333037"exception status; therefore, a recommended way to write a non-trivial "
30343038"finalizer is::"
3035- msgstr ""
3039+ msgstr ":c:member:`~PyTypeObject.tp_finalize` 不应改变当前异常状态;因此,编写非关键终结器的推荐做法:: "
30363040
30373041#: ../../c-api/typeobj.rst:1903
30383042msgid ""
@@ -3042,7 +3046,7 @@ msgstr ""
30423046
30433047#: ../../c-api/typeobj.rst:1912
30443048msgid "\" Safe object finalization\" (:pep:`442`)"
3045- msgstr ""
3049+ msgstr "\" 安全的对象最终化 \" (:pep:`442`) "
30463050
30473051#: ../../c-api/typeobj.rst:1915
30483052msgid ""
@@ -3089,6 +3093,10 @@ msgid ""
30893093" objects on the thread which called tp_dealloc will not violate any "
30903094"assumptions of the library."
30913095msgstr ""
3096+ "另外还需要注意,在应用垃圾回收机制的 Python 中,:c:member:`~PyTypeObject.tp_dealloc` 可以从任意 "
3097+ "Python 线程被调用,而不仅是创建该对象的线程(如果对象成为引用计数循环的一部分,则该循环可能会被任何线程上的垃圾回收操作所回收)。 这对 "
3098+ "Python API 调用来说不是问题,因为 tp_dealloc 调用所在的线程将持有全局解释器锁(GIL)。 但是,如果被销毁的对象又销毁了来自其他"
3099+ " C 或 C++ 库的对象,则应当小心确保在调用 tp_dealloc 的线程上销毁这些对象不会破坏这些库的任何资源。"
30923100
30933101#: ../../c-api/typeobj.rst:1954
30943102msgid "Heap Types"
@@ -3106,26 +3114,27 @@ msgstr ""
31063114#: ../../c-api/typeobj.rst:1960
31073115msgid ""
31083116"This results in types that are limited relative to types defined in Python:"
3109- msgstr ""
3117+ msgstr "这就导致了与在 Python 中定义的类型相关联的类型限制: "
31103118
31113119#: ../../c-api/typeobj.rst:1962
31123120msgid ""
31133121"Static types are limited to one base, i.e. they cannot use multiple "
31143122"inheritance."
3115- msgstr ""
3123+ msgstr "静态类型只能拥有一个基类;换句话说,他们不能使用多重继承。 "
31163124
31173125#: ../../c-api/typeobj.rst:1964
31183126msgid ""
31193127"Static type objects (but not necessarily their instances) are immutable. It "
31203128"is not possible to add or modify the type object's attributes from Python."
3121- msgstr ""
3129+ msgstr "静态类型对象(但并非它们的实例)是不可变对象。 不可能在 Python 中添加或修改类型对象的属性。 "
31223130
31233131#: ../../c-api/typeobj.rst:1966
31243132msgid ""
31253133"Static type objects are shared across :ref:`sub-interpreters <sub-"
31263134"interpreter-support>`, so they should not include any subinterpreter-"
31273135"specific state."
31283136msgstr ""
3137+ "静态类型对象是跨 :ref:`子解释器 <sub-interpreter-support>` 共享的,因此它们不应包括任何子解释器专属的状态。"
31293138
31303139#: ../../c-api/typeobj.rst:1970
31313140msgid ""
@@ -3149,18 +3158,18 @@ msgstr ""
31493158
31503159#: ../../c-api/typeobj.rst:1985
31513160msgid "Number Object Structures"
3152- msgstr ""
3161+ msgstr "数字对象结构体Number Object Structures "
31533162
31543163#: ../../c-api/typeobj.rst:1992
31553164msgid ""
31563165"This structure holds pointers to the functions which an object uses to "
31573166"implement the number protocol. Each function is used by the function of "
31583167"similar name documented in the :ref:`number` section."
3159- msgstr ""
3168+ msgstr "该结构体持有指向被对象用来实现数字协议的函数的指针。 每个函数都被 :ref:`number` 一节中记录的对应名称的函数所使用。 "
31603169
31613170#: ../../c-api/typeobj.rst:1998 ../../c-api/typeobj.rst:2322
31623171msgid "Here is the structure definition::"
3163- msgstr ""
3172+ msgstr "结构体定义如下:: "
31643173
31653174#: ../../c-api/typeobj.rst:2045
31663175msgid ""
@@ -3171,6 +3180,9 @@ msgid ""
31713180"``Py_NotImplemented``, if another error occurred they must return ``NULL`` "
31723181"and set an exception."
31733182msgstr ""
3183+ "双目和三目函数必须检查其所有操作数的类型,并实现必要的转换(至少有一个操作数是所定义类型的实例)。 "
3184+ "如果没有为所给出的操作数定义操作,则双目和三目函数必须返回 ``Py_NotImplemented``,如果发生了其他错误则它们必须返回 "
3185+ "``NULL`` 并设置一个异常。"
31743186
31753187#: ../../c-api/typeobj.rst:2054
31763188msgid ""
@@ -3180,20 +3192,22 @@ msgstr ""
31803192
31813193#: ../../c-api/typeobj.rst:2099
31823194msgid "Mapping Object Structures"
3183- msgstr ""
3195+ msgstr "映射对象结构体 "
31843196
31853197#: ../../c-api/typeobj.rst:2106
31863198msgid ""
31873199"This structure holds pointers to the functions which an object uses to "
31883200"implement the mapping protocol. It has three members:"
3189- msgstr ""
3201+ msgstr "该结构体持有指向对象用于实现映射协议的函数的指针。 它有三个成员: "
31903202
31913203#: ../../c-api/typeobj.rst:2111
31923204msgid ""
31933205"This function is used by :c:func:`PyMapping_Size` and "
31943206":c:func:`PyObject_Size`, and has the same signature. This slot may be set "
31953207"to ``NULL`` if the object has no defined length."
31963208msgstr ""
3209+ "该函数将被 :c:func:`PyMapping_Size` 和 :c:func:`PyObject_Size` 使用,并具有相同的签名。 "
3210+ "如果对象没有定义长度则此槽位可被设为 ``NULL``。"
31973211
31983212#: ../../c-api/typeobj.rst:2117
31993213msgid ""
@@ -3203,6 +3217,9 @@ msgid ""
32033217":c:func:`PyMapping_Check` function to return ``1``, it can be ``NULL`` "
32043218"otherwise."
32053219msgstr ""
3220+ "该函数将被 :c:func:`PyObject_GetItem` 和 :c:func:`PySequence_GetSlice` 使用,并具有与 "
3221+ ":c:func:`!PyObject_GetItem` 相同的签名。 此槽位必须被填充以便 :c:func:`PyMapping_Check` 函数返回"
3222+ " ``1``,否则它可以为 ``NULL``。"
32063223
32073224#: ../../c-api/typeobj.rst:2125
32083225msgid ""
@@ -3216,13 +3233,13 @@ msgstr ""
32163233
32173234#: ../../c-api/typeobj.rst:2136
32183235msgid "Sequence Object Structures"
3219- msgstr ""
3236+ msgstr "序列对象结构体 "
32203237
32213238#: ../../c-api/typeobj.rst:2143
32223239msgid ""
32233240"This structure holds pointers to the functions which an object uses to "
32243241"implement the sequence protocol."
3225- msgstr ""
3242+ msgstr "该结构体持有指向对象用于实现序列协议的函数的指针。 "
32263243
32273244#: ../../c-api/typeobj.rst:2148
32283245msgid ""
@@ -3432,17 +3449,18 @@ msgstr ""
34323449msgid ""
34333450":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this"
34343451" function."
3435- msgstr ""
3452+ msgstr ":c:func:`PyBuffer_Release` 是针对包装此函数的消费方的接口。 "
34363453
34373454#: ../../c-api/typeobj.rst:2311
34383455msgid "Async Object Structures"
3439- msgstr ""
3456+ msgstr "异步对象结构体 "
34403457
34413458#: ../../c-api/typeobj.rst:2319
34423459msgid ""
34433460"This structure holds pointers to the functions required to implement "
34443461":term:`awaitable` and :term:`asynchronous iterator` objects."
34453462msgstr ""
3463+ "此结构体将持有指向需要用来实现 :term:`awaitable` 和 :term:`asynchronous iterator` 对象的函数的指针。"
34463464
34473465#: ../../c-api/typeobj.rst:2336
34483466msgid ""
@@ -3474,7 +3492,7 @@ msgstr ""
34743492
34753493#: ../../c-api/typeobj.rst:2365
34763494msgid "Slot Type typedefs"
3477- msgstr ""
3495+ msgstr "槽位类型 typedef "
34783496
34793497#: ../../c-api/typeobj.rst:2369
34803498msgid ""
0 commit comments