-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathiterator.po
More file actions
158 lines (134 loc) · 6.18 KB
/
iterator.po
File metadata and controls
158 lines (134 loc) · 6.18 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
# 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:
# python-doc bot, 2025
# Freesand Leo <yuqinju@163.com>, 2025
# 99 <wh2099@pm.me>, 2026
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.14\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-05 15:48+0000\n"
"PO-Revision-Date: 2025-09-16 00:00+0000\n"
"Last-Translator: 99 <wh2099@pm.me>, 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/iterator.rst:6
msgid "Iterator Objects"
msgstr "迭代器对象"
#: ../../c-api/iterator.rst:8
msgid ""
"Python provides two general-purpose iterator objects. The first, a sequence"
" iterator, works with an arbitrary sequence supporting the "
":meth:`~object.__getitem__` method. The second works with a callable object"
" and a sentinel value, calling the callable for each item in the sequence, "
"and ending the iteration when the sentinel value is returned."
msgstr ""
"Python 提供了两个通用迭代器对象。第一个是序列迭代器,它可与支持 :meth:`~object.__getitem__` "
"方法的任意序列一起使用。第二个迭代器使用一个可调用对象和一个哨兵值,为序列中的每个项目调用可调用对象,并在返回哨兵值时结束迭代。"
#: ../../c-api/iterator.rst:17
msgid ""
"Type object for iterator objects returned by :c:func:`PySeqIter_New` and the"
" one-argument form of the :func:`iter` built-in function for built-in "
"sequence types."
msgstr ""
"由 :c:func:`PySeqIter_New` 和内置序列类型的内置函数 :func:`iter` 的单参数形式所返回的迭代器对象的类型对象。"
#: ../../c-api/iterator.rst:24
msgid ""
"Return true if the type of *op* is :c:data:`PySeqIter_Type`. This function "
"always succeeds."
msgstr "如果 *op* 的类型为 :c:data:`PySeqIter_Type` 则返回真值。此函数总是会成功执行。"
#: ../../c-api/iterator.rst:30
msgid ""
"Return an iterator that works with a general sequence object, *seq*. The "
"iteration ends when the sequence raises :exc:`IndexError` for the "
"subscripting operation."
msgstr "返回一个与常规序列对象 *seq* 一起使用的迭代器。当序列下标操作引发 :exc:`IndexError` 时,迭代结束。"
#: ../../c-api/iterator.rst:37
msgid ""
"Type object for iterator objects returned by :c:func:`PyCallIter_New` and "
"the two-argument form of the :func:`iter` built-in function."
msgstr "由函数 :c:func:`PyCallIter_New` 和 :func:`iter` 内置函数的双参数形式返回的迭代器对象类型对象。"
#: ../../c-api/iterator.rst:43
msgid ""
"Return true if the type of *op* is :c:data:`PyCallIter_Type`. This function"
" always succeeds."
msgstr "如果 *op* 的类型为 :c:data:`PyCallIter_Type` 则返回真值。此函数总是会成功执行。"
#: ../../c-api/iterator.rst:49
msgid ""
"Return a new iterator. The first parameter, *callable*, can be any Python "
"callable object that can be called with no parameters; each call to it "
"should return the next item in the iteration. When *callable* returns a "
"value equal to *sentinel*, the iteration will be terminated."
msgstr ""
"返回一个新的迭代器。第一个参数 *callable* 可以是任何可以在没有参数的情况下调用的 Python "
"可调用对象;每次调用都应该返回迭代中的下一个项目。当 *callable* 返回等于 *sentinel* 的值时,迭代将终止。"
#: ../../c-api/iterator.rst:56
msgid "Range Objects"
msgstr "Range 对象"
#: ../../c-api/iterator.rst:60
msgid "The type object for :class:`range` objects."
msgstr ":class:`range` 对象的类型对象。"
#: ../../c-api/iterator.rst:65
msgid ""
"Return true if the object *o* is an instance of a :class:`range` object. "
"This function always succeeds."
msgstr "如果对象 *o* 是 :class:`range` 对象的实例则返回真值。此函数总是会成功执行。"
#: ../../c-api/iterator.rst:70
msgid "Builtin Iterator Types"
msgstr "内置迭代器类型"
#: ../../c-api/iterator.rst:72
msgid ""
"These are built-in iteration types that are included in Python's C API, but "
"provide no additional functions. They are here for completeness."
msgstr "这些是包括在 Python 的 C API 中的内置迭代类型,但未提供附加功能。将它们放在这里是为保持内容完整。"
#: ../../c-api/iterator.rst:80
msgid "C type"
msgstr "C 类型"
#: ../../c-api/iterator.rst:81
msgid "Python type"
msgstr "Python 类型"
#: ../../c-api/iterator.rst:83
msgid ":py:class:`enumerate`"
msgstr ":py:class:`enumerate`"
#: ../../c-api/iterator.rst:85
msgid ":py:class:`filter`"
msgstr ":py:class:`filter`"
#: ../../c-api/iterator.rst:87
msgid ":py:class:`map`"
msgstr ":py:class:`map`"
#: ../../c-api/iterator.rst:89
msgid ":py:class:`reversed`"
msgstr ":py:class:`reversed`"
#: ../../c-api/iterator.rst:91
msgid ":py:class:`zip`"
msgstr ":py:class:`zip`"
#: ../../c-api/iterator.rst:95
msgid "Other Iterator Objects"
msgstr "其他迭代器对象"
#: ../../c-api/iterator.rst:113
msgid "Type objects for iterators of various built-in objects."
msgstr "用于多种内置对象的迭代器的类型对象。"
#: ../../c-api/iterator.rst:115
msgid ""
"Do not create instances of these directly; prefer calling "
":c:func:`PyObject_GetIter` instead."
msgstr "请不要直接创建这些类型的实例;应改为调用 :c:func:`PyObject_GetIter`。"
#: ../../c-api/iterator.rst:118
msgid ""
"Note that there is no guarantee that a given built-in type uses a given "
"iterator type. For example, iterating over :class:`range` will use one of "
"two iterator types depending on the size of the range. Other types may start"
" using a similar scheme in the future, without warning."
msgstr ""
"请注意一个给定的内置类型并不保证会使用一个给定的迭代器类型。例如,对 :class:`range` 的迭代将根据 range "
"对象的大小使用两种迭代器类型之一。其他类型可能会在未来使用类似的方案,事先不会发出警告。"