-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathdescriptor.po
More file actions
276 lines (241 loc) · 10.6 KB
/
descriptor.po
File metadata and controls
276 lines (241 loc) · 10.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001 Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# 99 <wh2099@pm.me>, 2026
# Freesand Leo <yuqinju@163.com>, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-13 16:14+0000\n"
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2026\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../c-api/descriptor.rst:6
msgid "Descriptor Objects"
msgstr "描述器对象"
#: ../../c-api/descriptor.rst:8
msgid ""
"\"Descriptors\" are objects that describe some attribute of an object. They "
"are found in the dictionary of type objects."
msgstr "“描述器”是描述对象的某些属性的对象。它们存在于类型对象的字典中。"
#: ../../c-api/descriptor.rst:13
msgid ""
"Create a new get-set descriptor for extension type *type* from the "
":c:type:`PyGetSetDef` structure *getset*."
msgstr ""
"根据 :c:type:`PyGetSetDef` 结构体 *getset* 为扩展类型 *type* 创建一个新的 get-set 描述器。"
#: ../../c-api/descriptor.rst:16
msgid ""
"Get-set descriptors expose attributes implemented by C getter and setter "
"functions rather than stored directly in the instance. This is the same kind"
" of descriptor created for entries in :c:member:`~PyTypeObject.tp_getset`, "
"and it appears in Python as a :class:`types.GetSetDescriptorType` object."
msgstr ""
"get-set 描述器将暴露由 C getter 和 setter 函数实现的属性而不是直接存储在实例中。 这与为 "
":c:member:`~PyTypeObject.tp_getset` 中条目创建的描述器种类相同,它将作为一个 "
":class:`types.GetSetDescriptorType` 对象出现在 Python 中。"
#: ../../c-api/descriptor.rst:21 ../../c-api/descriptor.rst:34
#: ../../c-api/descriptor.rst:65 ../../c-api/descriptor.rst:96
#: ../../c-api/descriptor.rst:118
msgid ""
"On success, return a :term:`strong reference` to the descriptor. Return "
"``NULL`` with an exception set on failure."
msgstr ""
#: ../../c-api/descriptor.rst:26
msgid ""
"Create a new member descriptor for extension type *type* from the "
":c:type:`PyMemberDef` structure *member*."
msgstr ""
#: ../../c-api/descriptor.rst:29
msgid ""
"Member descriptors expose fields in the type's C struct as Python "
"attributes. This is the same kind of descriptor created for entries in "
":c:member:`~PyTypeObject.tp_members`, and it appears in Python as a "
":class:`types.MemberDescriptorType` object."
msgstr ""
#: ../../c-api/descriptor.rst:39
msgid ""
"The type object for member descriptor objects created from "
":c:type:`PyMemberDef` structures. These descriptors expose fields of a C "
"struct as attributes on a type, and correspond to "
":class:`types.MemberDescriptorType` objects in Python."
msgstr ""
"基于 :c:type:`PyMemberDef` 结构体创建的成员描述器对象的类型对象。这种描述器将 C 结构的字段暴露为类型的属性,对应 Python"
" 中的 :class:`types.MemberDescriptorType` 对象。"
#: ../../c-api/descriptor.rst:48
msgid ""
"The type object for get/set descriptor objects created from "
":c:type:`PyGetSetDef` structures. These descriptors implement attributes "
"whose value is computed by C getter and setter functions, and are used for "
"many built-in type attributes. They correspond to "
":class:`types.GetSetDescriptorType` objects in Python."
msgstr ""
#: ../../c-api/descriptor.rst:57
msgid ""
"Create a new method descriptor for extension type *type* from the "
":c:type:`PyMethodDef` structure *meth*."
msgstr ""
#: ../../c-api/descriptor.rst:60
msgid ""
"Method descriptors expose C functions as methods on a type. This is the same"
" kind of descriptor created for entries in "
":c:member:`~PyTypeObject.tp_methods`, and it appears in Python as a "
":class:`types.MethodDescriptorType` object."
msgstr ""
#: ../../c-api/descriptor.rst:70
msgid ""
"The type object for method descriptor objects created from "
":c:type:`PyMethodDef` structures. These descriptors expose C functions as "
"methods on a type, and correspond to :class:`types.MethodDescriptorType` "
"objects in Python."
msgstr ""
#: ../../c-api/descriptor.rst:78
msgid "Describes a slot wrapper used by :c:func:`PyDescr_NewWrapper`."
msgstr ""
#: ../../c-api/descriptor.rst:80
msgid ""
"Each ``wrapperbase`` record stores the Python-visible name and metadata for "
"a special method implemented by a type slot, together with the wrapper "
"function used to adapt that slot to Python's calling convention."
msgstr ""
#: ../../c-api/descriptor.rst:86
msgid ""
"Create a new wrapper descriptor for extension type *type* from the "
":c:struct:`wrapperbase` structure *base* and the wrapped slot function "
"pointer *wrapped*."
msgstr ""
#: ../../c-api/descriptor.rst:91
msgid ""
"Wrapper descriptors expose special methods implemented by type slots. This "
"is the same kind of descriptor that CPython creates for slot-based special "
"methods such as ``__repr__`` or ``__add__``, and it appears in Python as a "
":class:`types.WrapperDescriptorType` object."
msgstr ""
#: ../../c-api/descriptor.rst:101
msgid ""
"The type object for wrapper descriptor objects created by "
":c:func:`PyDescr_NewWrapper` and :c:func:`PyWrapper_New`. Wrapper "
"descriptors are used internally to expose special methods implemented via "
"wrapper structures, and appear in Python as "
":class:`types.WrapperDescriptorType` objects."
msgstr ""
"由 :c:func:`PyDescr_NewWrapper` 和 :c:func:`PyWrapper_New` 创建的包装器描述器对象的类型对象。 "
"包装器描述器在内部被用于暴露通过包装器结构体实现的特殊方法,对应 Python 中的 "
":class:`types.WrapperDescriptorType` 对象。"
#: ../../c-api/descriptor.rst:110
msgid ""
"Create a new class method descriptor for extension type *type* from the "
":c:type:`PyMethodDef` structure *method*."
msgstr ""
#: ../../c-api/descriptor.rst:113
msgid ""
"Class method descriptors expose C methods that receive the class rather than"
" an instance when accessed. This is the same kind of descriptor created for "
"``METH_CLASS`` entries in :c:member:`~PyTypeObject.tp_methods`, and it "
"appears in Python as a :class:`types.ClassMethodDescriptorType` object."
msgstr ""
#: ../../c-api/descriptor.rst:123
msgid ""
"Return non-zero if the descriptor object *descr* describes a data attribute,"
" or ``0`` if it describes a method. *descr* must be a descriptor object; "
"there is no error checking."
msgstr ""
"如果描述器对象 *descr* 描述的是一个数据属性则返回非零值,或者如果它描述的是一个方法则返回 ``0``。 *descr* "
"必须是一个描述器对象;不会进行错误检查。"
#: ../../c-api/descriptor.rst:130
msgid ""
"Create a new bound wrapper object from the wrapper descriptor *d* and the "
"instance *self*."
msgstr ""
#: ../../c-api/descriptor.rst:133
msgid ""
"This is the bound form of a wrapper descriptor created by "
":c:func:`PyDescr_NewWrapper`. CPython creates these objects when a slot "
"wrapper is accessed through an instance, and they appear in Python as "
":class:`types.MethodWrapperType` objects."
msgstr ""
#: ../../c-api/descriptor.rst:138
msgid ""
"On success, return a :term:`strong reference` to the wrapper object. Return "
"``NULL`` with an exception set on failure."
msgstr ""
#: ../../c-api/descriptor.rst:143
msgid "This is a macro including the common fields for a descriptor object."
msgstr ""
#: ../../c-api/descriptor.rst:146
msgid ""
"This was included in Python's C API by mistake; do not use it in extensions."
" For creating custom descriptor objects, create a class implementing the "
"descriptor protocol (:c:member:`~PyTypeObject.tp_descr_get` and "
":c:member:`~PyTypeObject.tp_descr_set`)."
msgstr ""
#: ../../c-api/descriptor.rst:155
msgid "Built-in descriptors"
msgstr "内置描述器"
#: ../../c-api/descriptor.rst:159
msgid ""
"The type object for property objects. This is the same object as "
":class:`property` in the Python layer."
msgstr ""
#: ../../c-api/descriptor.rst:165
msgid ""
"The type object for super objects. This is the same object as :class:`super`"
" in the Python layer."
msgstr "super 对象的类型对象。它与 Python 层面的 :class:`super` 是相同的对象。"
#: ../../c-api/descriptor.rst:171
msgid ""
"The type of class method objects. This is the same object as "
":class:`classmethod` in the Python layer."
msgstr "类方法对象的类型。它与 Python 层面的 :class:`classmethod` 是相同的对象。"
#: ../../c-api/descriptor.rst:177
msgid ""
"The type object for C-level class method descriptor objects. This is the "
"type of the descriptors created for :func:`classmethod` defined in C "
"extension types, and corresponds to :class:`types.ClassMethodDescriptorType`"
" objects in Python."
msgstr ""
#: ../../c-api/descriptor.rst:185
msgid ""
"Create a new :class:`classmethod` object wrapping *callable*. *callable* "
"must be a callable object and must not be ``NULL``."
msgstr ""
"新建一个包裹 *callable* 的 :class:`classmethod` 对象。*callable* 必须是一个可调用对象,并且不可为 "
"``NULL`` 值。"
#: ../../c-api/descriptor.rst:188
msgid ""
"On success, this function returns a :term:`strong reference` to a new class "
"method descriptor. On failure, this function returns ``NULL`` with an "
"exception set."
msgstr ""
"成功时,此函数将返回一个指向新类方法描述器的 :term:`strong reference`。失败时,此函数将返回 ``NULL`` 并设置一个异常。"
#: ../../c-api/descriptor.rst:195
msgid ""
"The type of static method objects. This is the same object as "
":class:`staticmethod` in the Python layer."
msgstr "静态方法对象的类型。它与 Python 层面的 :class:`staticmethod` 是相同的对象。"
#: ../../c-api/descriptor.rst:201
msgid ""
"Create a new :class:`staticmethod` object wrapping *callable*. *callable* "
"must be a callable object and must not be ``NULL``."
msgstr ""
"新建一个包裹 *callable* 的 :class:`staticmethod` 对象。*callable* 必须是一个可调用对象,并且不可为 "
"``NULL`` 值。"
#: ../../c-api/descriptor.rst:204
msgid ""
"On success, this function returns a :term:`strong reference` to a new static"
" method descriptor. On failure, this function returns ``NULL`` with an "
"exception set."
msgstr ""
"成功时,此函数将返回一个指向新静态方法描述器的 :term:`strong reference`。失败时,此函数将返回 ``NULL`` "
"并设置一个异常。"