- Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathsequence.po
243 lines (216 loc) · 11.3 KB
/
sequence.po
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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2021, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# jacky <jackylvm@foxmail.com>, 2019
# Freesand Leo <yuqinju@163.com>, 2020
#
#,fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.7\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-01 16:02+0000\n"
"PO-Revision-Date: 2019-09-01 03:41+0000\n"
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2020\n"
"Language-Team: Chinese (China) (https://www.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/sequence.rst:6
msgid"Sequence Protocol"
msgstr"序列协议"
#:../../c-api/sequence.rst:11
msgid""
"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. "
"Note that it returns ``1`` for Python classes with a :meth:`__getitem__` "
"method unless they are :class:`dict` subclasses since in general case it is "
"impossible to determine what the type of keys it supports. This function "
"always succeeds."
msgstr""
"如果对象提供序列协议,函数返回 ``1``,否则返回 ``0``。 请注意它将为具有 :meth:`__getitem__` 方法的 Python "
"类返回 ``1``,除非它们是 :class:`dict` 的子类,因为在一般情况下无法确定它所支持键类型。 此函数总是会成功执行。"
#:../../c-api/sequence.rst:23
msgid""
"Returns the number of objects in sequence *o* on success, and ``-1`` on "
"failure. This is equivalent to the Python expression ``len(o)``."
msgstr"成功时返回序列中*o*的对象数,失败时返回``-1``. 相当于Python的``len(o)``表达式."
#:../../c-api/sequence.rst:29
msgid""
"Return the concatenation of *o1* and *o2* on success, and ``NULL`` on "
"failure. This is the equivalent of the Python expression ``o1 + o2``."
msgstr"成功时返回 *o1* 和 *o2* 的拼接,失败时返回 ``NULL``。 这等价于 Python 表达式 ``o1 + o2``。"
#:../../c-api/sequence.rst:35
msgid""
"Return the result of repeating sequence object *o* *count* times, or "
"``NULL`` on failure. This is the equivalent of the Python expression ``o * "
"count``."
msgstr""
"返回序列对象 *o* 重复 *count* 次的结果,失败时返回 ``NULL``。 这等价于 Python 表达式 ``o * count``。"
#:../../c-api/sequence.rst:41
msgid""
"Return the concatenation of *o1* and *o2* on success, and ``NULL`` on "
"failure. The operation is done *in-place* when *o1* supports it. This is "
"the equivalent of the Python expression ``o1 += o2``."
msgstr""
"成功时返回 *o1* 和 *o2* 的拼接,失败时返回 ``NULL``。 在 *o1* 支持的情况下操作将 *原地* 完成。 这等价于 Python "
"表达式 ``o1 += o2``。"
#:../../c-api/sequence.rst:48
msgid""
"Return the result of repeating sequence object *o* *count* times, or "
"``NULL`` on failure. The operation is done *in-place* when *o* supports it."
" This is the equivalent of the Python expression ``o *= count``."
msgstr""
"Return the result of repeating sequence object返回序列对象 *o* 重复 *count* "
"次的结果,失败时返回 ``NULL``。 在 *o* 支持的情况下该操作会 *原地* 完成。 这等价于 Python 表达式 ``o *= "
"count``。"
#:../../c-api/sequence.rst:55
msgid""
"Return the *i*\\ th element of *o*, or ``NULL`` on failure. This is the "
"equivalent of the Python expression ``o[i]``."
msgstr"返回 *o* 中的第 *i* 号元素,失败时返回 ``NULL``。 这等价于 Python 表达式 ``o[i]``。"
#:../../c-api/sequence.rst:61
msgid""
"Return the slice of sequence object *o* between *i1* and *i2*, or ``NULL`` "
"on failure. This is the equivalent of the Python expression ``o[i1:i2]``."
msgstr""
"返回序列对象 *o* 的 *i1* 到 *i2* 的切片,失败时返回 ``NULL``。 这等价于 Python 表达式 ``o[i1:i2]``。"
#:../../c-api/sequence.rst:67
msgid""
"Assign object *v* to the *i*\\ th element of *o*. Raise an exception and "
"return ``-1`` on failure; return ``0`` on success. This is the equivalent "
"of the Python statement ``o[i] = v``. This function *does not* steal a "
"reference to *v*."
msgstr""
"将对象 *v* 赋值给 *o* 的第 *i* 号元素。 失败时会引发异常并返回 ``-1``;成功时返回 ``0``。 这相当于 Python 语句 "
"``o[i] = v``。 此函数 *不会* 改变对 *v* 的引用。"
#:../../c-api/sequence.rst:72
msgid""
"If *v* is ``NULL``, the element is deleted, however this feature is "
"deprecated in favour of using :c:func:`PySequence_DelItem`."
msgstr"如果 *v* 为 ``NULL``,元素将被删除,但是此特性已被弃用,应当改用 :c:func:`PySequence_DelItem`。"
#:../../c-api/sequence.rst:78
msgid""
"Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This"
" is the equivalent of the Python statement ``del o[i]``."
msgstr"删除对象 *o* 的第 *i* 号元素。 失败时返回 ``-1``。 这相当于 Python 语句 ``del o[i]``。"
#:../../c-api/sequence.rst:84
msgid""
"Assign the sequence object *v* to the slice in sequence object *o* from *i1*"
" to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``."
msgstr""
"将序列对象 *v* 赋值给序列对象 *o* 的从 *i1* 到 *i2* 切片。 这相当于 Python 语句 ``o[i1:i2] = v``。"
#:../../c-api/sequence.rst:90
msgid""
"Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` "
"on failure. This is the equivalent of the Python statement ``del "
"o[i1:i2]``."
msgstr""
"删除序列对象 *o* 的从 *i1* 到 *i2* 的切片。 失败时返回 ``-1``。 这相当于 Python 语句 ``del "
"o[i1:i2]``。"
#:../../c-api/sequence.rst:96
msgid""
"Return the number of occurrences of *value* in *o*, that is, return the "
"number of keys for which ``o[key] == value``. On failure, return ``-1``. "
"This is equivalent to the Python expression ``o.count(value)``."
msgstr""
"返回 *value* 在 *o* 中出现的次数,即返回使得 ``o[key] == value`` 的键的数量。 失败时返回 ``-1``。 这相当于 "
"Python 表达式 ``o.count(value)``。"
#:../../c-api/sequence.rst:103
msgid""
"Determine if *o* contains *value*. If an item in *o* is equal to *value*, "
"return ``1``, otherwise return ``0``. On error, return ``-1``. This is "
"equivalent to the Python expression ``value in o``."
msgstr""
"确定 *o* 是否包含 *value*。 如果 *o* 中的某一项等于 *value*,则返回 ``1``,否则返回 ``0``。 出错时,返回 "
"``-1``。 这相当于 Python 表达式 ``value in o``。"
#:../../c-api/sequence.rst:110
msgid""
"Return the first index *i* for which ``o[i] == value``. On error, return "
"``-1``. This is equivalent to the Python expression ``o.index(value)``."
msgstr""
"返回第一个索引*i*,其中 ``o[i] == value``.出错时,返回 "
"``-1``.相当于Python的``o.index(value)``表达式."
#:../../c-api/sequence.rst:116
msgid""
"Return a list object with the same contents as the sequence or iterable *o*,"
" or ``NULL`` on failure. The returned list is guaranteed to be new. This "
"is equivalent to the Python expression ``list(o)``."
msgstr""
"返回一个列表对象,其内容与序列或可迭代对象 *o* 相同,失败时返回 ``NULL``。 返回的列表保证是一个新对象。 这等价于 Python 表达式 "
"``list(o)``。"
#:../../c-api/sequence.rst:125
msgid""
"Return a tuple object with the same contents as the sequence or iterable "
"*o*, or ``NULL`` on failure. If *o* is a tuple, a new reference will be "
"returned, otherwise a tuple will be constructed with the appropriate "
"contents. This is equivalent to the Python expression ``tuple(o)``."
msgstr""
"返回一个元组对象,其内容与序列或可迭代对象 *o* 相同,失败时返回 ``NULL``。 如果 *o* "
"为元组,则将返回一个新的引用,在其他情况下将使用适当的内容构造一个元组。 这等价于 Python 表达式 ``tuple(o)``。"
#:../../c-api/sequence.rst:133
msgid""
"Return the sequence or iterable *o* as an object usable by the other "
"``PySequence_Fast*`` family of functions. If the object is not a sequence or"
" iterable, raises :exc:`TypeError` with *m* as the message text. Returns "
"``NULL`` on failure."
msgstr""
"将序列或可迭代对象 *o* 作为其他 ``PySequence_Fast*`` 函数族可用的对象返回。 如果该对象不是序列或可迭代对象,则会引发 "
":exc:`TypeError` 并将 *m* 作为消息文本。 失败时返回 ``NULL``。"
#:../../c-api/sequence.rst:138
msgid""
"The ``PySequence_Fast*`` functions are thus named because they assume *o* is"
" a :c:type:`PyTupleObject` or a :c:type:`PyListObject` and access the data "
"fields of *o* directly."
msgstr""
"``PySequence_Fast*`` 函数之所以这样命名,是因为它们会假定 *o* 是一个 :c:type:`PyTupleObject` 或 "
":c:type:`PyListObject` 并直接访问 *o* 的数据字段。"
#:../../c-api/sequence.rst:142
msgid""
"As a CPython implementation detail, if *o* is already a sequence or list, it"
" will be returned."
msgstr"作为 CPython 的实现细节,如果 *o* 已经是一个序列或列表,它将被直接返回。"
#:../../c-api/sequence.rst:148
msgid""
"Returns the length of *o*, assuming that *o* was returned by "
":c:func:`PySequence_Fast` and that *o* is not ``NULL``. The size can also "
"be gotten by calling :c:func:`PySequence_Size` on *o*, but "
":c:func:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a "
"list or tuple."
msgstr""
"在 *o* 由 :c:func:`PySequence_Fast` 返回且 *o* 不为 ``NULL`` 的情况下返回 *o* 的长度。 也可以通过在"
" *o* 上调用 :c:func:`PySequence_Size` 来获取大小,但是 "
":c:func:`PySequence_Fast_GET_SIZE` 速度更快,因为它可以假定 *o* 为列表或元组。"
#:../../c-api/sequence.rst:157
msgid""
"Return the *i*\\ th element of *o*, assuming that *o* was returned by "
":c:func:`PySequence_Fast`, *o* is not ``NULL``, and that *i* is within "
"bounds."
msgstr""
"在 *o* 由 :c:func:`PySequence_Fast` 返回且 *o* 不 ``NULL``,并且 *i* d在索引范围内的情况下返回 "
"*o* 的第 *i* 号元素。"
#:../../c-api/sequence.rst:163
msgid""
"Return the underlying array of PyObject pointers. Assumes that *o* was "
"returned by :c:func:`PySequence_Fast` and *o* is not ``NULL``."
msgstr""
"返回 PyObject 指针的底层数组。 假设 *o* 由 :c:func:`PySequence_Fast` 返回且 *o* 不为 ``NULL``。"
#:../../c-api/sequence.rst:166
msgid""
"Note, if a list gets resized, the reallocation may relocate the items array."
" So, only use the underlying array pointer in contexts where the sequence "
"cannot change."
msgstr"请注意,如果列表调整大小,重新分配可能会重新定位items数组.因此,仅在序列无法更改的上下文中使用基础数组指针."
#:../../c-api/sequence.rst:173
msgid""
"Return the *i*\\ th element of *o* or ``NULL`` on failure. Faster form of "
":c:func:`PySequence_GetItem` but without checking that "
":c:func:`PySequence_Check` on *o* is true and without adjustment for "
"negative indices."
msgstr""
"返回 *o* 的第 *i* 个元素或在失败时返回 ``NULL``。 此形式比 :c:func:`PySequence_GetItem` "
"理馔,但不会检查 *o* 上的 :c:func:`PySequence_Check` 是否为真值,也不会对负序号进行调整。"