1515# Bryan不可思议, 2023
1616# Nyuan Zhang, 2023
1717# Rafael Fontenelle <[email protected] >, 202418+ # Kevin Deng <[email protected] >, 20241819# Freesand Leo <[email protected] >, 20241920#
2021#, fuzzy
2122msgid ""
2223msgstr ""
2324"Project-Id-Version : Python 3.9\n "
2425"Report-Msgid-Bugs-To : \n "
25- "POT-Creation-Date : 2024-01-05 21:52 +0000\n "
26+ "POT-Creation-Date : 2024-01-12 22:01 +0000\n "
2627"PO-Revision-Date : 2017-02-16 17:39+0000\n "
2728"
Last-Translator :
Freesand Leo <[email protected] >, 2024\n "
2829"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -2600,7 +2601,7 @@ msgid ""
26002601":c:type:`PyGetSetDef` structures, declaring computed attributes of instances"
26012602" of this type."
26022603msgstr ""
2603- "一个可选的指向 :c:type:`PyGetSetDef` 结构体的以 ``NULL`` 结束的静态数组的指针,它声明了此类型的实例中被计算出的属性 。"
2604+ "一个可选的指向 :c:type:`PyGetSetDef` 结构体的以 ``NULL`` 结束的静态数组的指针,它声明了此类型的实例中的被计算属性 。"
26042605
26052606#: ../../c-api/typeobj.rst:1507
26062607msgid ""
@@ -2974,7 +2975,7 @@ msgstr ""
29742975
29752976#: ../../c-api/typeobj.rst:1815
29762977msgid "Tuple of base types."
2977- msgstr ""
2978+ msgstr "基类型的元组。 "
29782979
29792980#: ../../c-api/typeobj.rst:1817
29802981msgid ""
@@ -3018,17 +3019,17 @@ msgstr "弱引用列表头,用于指向该类型对象的弱引用。 不会
30183019msgid ""
30193020"This field is deprecated. Use :c:member:`~PyTypeObject.tp_finalize` "
30203021"instead."
3021- msgstr ""
3022+ msgstr "该字段已被弃用。 请改用 :c:member:`~PyTypeObject.tp_finalize`。 "
30223023
30233024#: ../../c-api/typeobj.rst:1872
30243025msgid "Used to index into the method cache. Internal use only."
3025- msgstr ""
3026+ msgstr "用于索引至方法缓存。 仅限内部使用。 "
30263027
30273028#: ../../c-api/typeobj.rst:1881
30283029msgid ""
30293030"An optional pointer to an instance finalization function. Its signature "
30303031"is::"
3031- msgstr ""
3032+ msgstr "一个可选的指向实例最终化函数的指针。 函数的签名为:: "
30323033
30333034#: ../../c-api/typeobj.rst:1885
30343035msgid ""
@@ -3039,13 +3040,16 @@ msgid ""
30393040" before attempting to break reference cycles, ensuring that it finds the "
30403041"object in a sane state."
30413042msgstr ""
3043+ "如果设置了 :c:member:`~PyTypeObject.tp_finalize`,解释器将在最终化特定实例时调用它一次。 "
3044+ "它将由垃圾回收器调用(如果实例是单独循环引用的一部分)或是在对象被释放之前被调用。 "
3045+ "不论是哪种方式,它都肯定会在尝试打破循环引用之前被调用,以确保它所操作的对象处于正常状态。"
30423046
30433047#: ../../c-api/typeobj.rst:1892
30443048msgid ""
30453049":c:member:`~PyTypeObject.tp_finalize` should not mutate the current "
30463050"exception status; therefore, a recommended way to write a non-trivial "
30473051"finalizer is::"
3048- msgstr ""
3052+ msgstr ":c:member:`~PyTypeObject.tp_finalize` 不应改变当前异常状态;因此,编写非关键终结器的推荐做法:: "
30493053
30503054#: ../../c-api/typeobj.rst:1909
30513055msgid ""
@@ -3066,10 +3070,14 @@ msgid ""
30663070" objects on the thread which called tp_dealloc will not violate any "
30673071"assumptions of the library."
30683072msgstr ""
3073+ "另外还需要注意,在应用垃圾回收机制的 Python 中,:c:member:`~PyTypeObject.tp_dealloc` 可以从任意 "
3074+ "Python 线程被调用,而不仅是创建该对象的线程(如果对象成为引用计数循环的一部分,则该循环可能会被任何线程上的垃圾回收操作所回收)。 这对 "
3075+ "Python API 调用来说不是问题,因为 tp_dealloc 调用所在的线程将持有全局解释器锁(GIL)。 但是,如果被销毁的对象又销毁了来自其他"
3076+ " C 或 C++ 库的对象,则应当小心确保在调用 tp_dealloc 的线程上销毁这些对象不会破坏这些库的任何资源。"
30693077
30703078#: ../../c-api/typeobj.rst:1929
30713079msgid "\" Safe object finalization\" (:pep:`442`)"
3072- msgstr ""
3080+ msgstr "\" 安全的对象最终化 \" (:pep:`442`) "
30733081
30743082#: ../../c-api/typeobj.rst:1934
30753083msgid ""
@@ -3103,26 +3111,27 @@ msgstr ""
31033111#: ../../c-api/typeobj.rst:1956
31043112msgid ""
31053113"This results in types that are limited relative to types defined in Python:"
3106- msgstr ""
3114+ msgstr "这就导致了与在 Python 中定义的类型相关联的类型限制: "
31073115
31083116#: ../../c-api/typeobj.rst:1958
31093117msgid ""
31103118"Static types are limited to one base, i.e. they cannot use multiple "
31113119"inheritance."
3112- msgstr ""
3120+ msgstr "静态类型只能拥有一个基类;换句话说,他们不能使用多重继承。 "
31133121
31143122#: ../../c-api/typeobj.rst:1960
31153123msgid ""
31163124"Static type objects (but not necessarily their instances) are immutable. It "
31173125"is not possible to add or modify the type object's attributes from Python."
3118- msgstr ""
3126+ msgstr "静态类型对象(但并非它们的实例)是不可变对象。 不可能在 Python 中添加或修改类型对象的属性。 "
31193127
31203128#: ../../c-api/typeobj.rst:1962
31213129msgid ""
31223130"Static type objects are shared across :ref:`sub-interpreters <sub-"
31233131"interpreter-support>`, so they should not include any subinterpreter-"
31243132"specific state."
31253133msgstr ""
3134+ "静态类型对象是跨 :ref:`子解释器 <sub-interpreter-support>` 共享的,因此它们不应包括任何子解释器专属的状态。"
31263135
31273136#: ../../c-api/typeobj.rst:1966
31283137msgid ""
@@ -3146,18 +3155,18 @@ msgstr ""
31463155
31473156#: ../../c-api/typeobj.rst:1981
31483157msgid "Number Object Structures"
3149- msgstr ""
3158+ msgstr "数字对象结构体Number Object Structures "
31503159
31513160#: ../../c-api/typeobj.rst:1988
31523161msgid ""
31533162"This structure holds pointers to the functions which an object uses to "
31543163"implement the number protocol. Each function is used by the function of "
31553164"similar name documented in the :ref:`number` section."
3156- msgstr ""
3165+ msgstr "该结构体持有指向被对象用来实现数字协议的函数的指针。 每个函数都被 :ref:`number` 一节中记录的对应名称的函数所使用。 "
31573166
31583167#: ../../c-api/typeobj.rst:1994 ../../c-api/typeobj.rst:2318
31593168msgid "Here is the structure definition::"
3160- msgstr ""
3169+ msgstr "结构体定义如下:: "
31613170
31623171#: ../../c-api/typeobj.rst:2041
31633172msgid ""
@@ -3168,6 +3177,9 @@ msgid ""
31683177"``Py_NotImplemented``, if another error occurred they must return ``NULL`` "
31693178"and set an exception."
31703179msgstr ""
3180+ "双目和三目函数必须检查其所有操作数的类型,并实现必要的转换(至少有一个操作数是所定义类型的实例)。 "
3181+ "如果没有为所给出的操作数定义操作,则双目和三目函数必须返回 ``Py_NotImplemented``,如果发生了其他错误则它们必须返回 "
3182+ "``NULL`` 并设置一个异常。"
31713183
31723184#: ../../c-api/typeobj.rst:2050
31733185msgid ""
@@ -3177,20 +3189,22 @@ msgstr ""
31773189
31783190#: ../../c-api/typeobj.rst:2095
31793191msgid "Mapping Object Structures"
3180- msgstr ""
3192+ msgstr "映射对象结构体 "
31813193
31823194#: ../../c-api/typeobj.rst:2102
31833195msgid ""
31843196"This structure holds pointers to the functions which an object uses to "
31853197"implement the mapping protocol. It has three members:"
3186- msgstr ""
3198+ msgstr "该结构体持有指向对象用于实现映射协议的函数的指针。 它有三个成员: "
31873199
31883200#: ../../c-api/typeobj.rst:2107
31893201msgid ""
31903202"This function is used by :c:func:`PyMapping_Size` and "
31913203":c:func:`PyObject_Size`, and has the same signature. This slot may be set "
31923204"to ``NULL`` if the object has no defined length."
31933205msgstr ""
3206+ "该函数将被 :c:func:`PyMapping_Size` 和 :c:func:`PyObject_Size` 使用,并具有相同的签名。 "
3207+ "如果对象没有定义长度则此槽位可被设为 ``NULL``。"
31943208
31953209#: ../../c-api/typeobj.rst:2113
31963210msgid ""
@@ -3200,6 +3214,9 @@ msgid ""
32003214":c:func:`PyMapping_Check` function to return ``1``, it can be ``NULL`` "
32013215"otherwise."
32023216msgstr ""
3217+ "该函数将被 :c:func:`PyObject_GetItem` 和 :c:func:`PySequence_GetSlice` 使用,并具有与 "
3218+ ":c:func:`!PyObject_GetItem` 相同的签名。 此槽位必须被填充以便 :c:func:`PyMapping_Check` 函数返回"
3219+ " ``1``,否则它可以为 ``NULL``。"
32033220
32043221#: ../../c-api/typeobj.rst:2121
32053222msgid ""
@@ -3213,13 +3230,13 @@ msgstr ""
32133230
32143231#: ../../c-api/typeobj.rst:2132
32153232msgid "Sequence Object Structures"
3216- msgstr ""
3233+ msgstr "序列对象结构体 "
32173234
32183235#: ../../c-api/typeobj.rst:2139
32193236msgid ""
32203237"This structure holds pointers to the functions which an object uses to "
32213238"implement the sequence protocol."
3222- msgstr ""
3239+ msgstr "该结构体持有指向对象用于实现序列协议的函数的指针。 "
32233240
32243241#: ../../c-api/typeobj.rst:2144
32253242msgid ""
@@ -3429,17 +3446,18 @@ msgstr ""
34293446msgid ""
34303447":c:func:`PyBuffer_Release` is the interface for the consumer that wraps this"
34313448" function."
3432- msgstr ""
3449+ msgstr ":c:func:`PyBuffer_Release` 是针对包装此函数的消费方的接口。 "
34333450
34343451#: ../../c-api/typeobj.rst:2307
34353452msgid "Async Object Structures"
3436- msgstr ""
3453+ msgstr "异步对象结构体 "
34373454
34383455#: ../../c-api/typeobj.rst:2315
34393456msgid ""
34403457"This structure holds pointers to the functions required to implement "
34413458":term:`awaitable` and :term:`asynchronous iterator` objects."
34423459msgstr ""
3460+ "此结构体将持有指向需要用来实现 :term:`awaitable` 和 :term:`asynchronous iterator` 对象的函数的指针。"
34433461
34443462#: ../../c-api/typeobj.rst:2332
34453463msgid ""
@@ -3472,7 +3490,7 @@ msgstr ""
34723490
34733491#: ../../c-api/typeobj.rst:2362
34743492msgid "Slot Type typedefs"
3475- msgstr ""
3493+ msgstr "槽位类型 typedef "
34763494
34773495#: ../../c-api/typeobj.rst:2366
34783496msgid ""
0 commit comments