88msgstr ""
99"Project-Id-Version : Python 3.6\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2018-02-21 12:40 +0900\n "
11+ "POT-Creation-Date : 2018-05-23 13:22 +0900\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1313"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1414"MIME-Version : 1.0\n "
@@ -24,161 +24,165 @@ msgstr ""
2424#: ../../c-api/sequence.rst:11
2525msgid ""
2626"Return ``1`` if the object provides sequence protocol, and ``0`` otherwise. "
27- "This function always succeeds."
27+ "Note that it returns ``1`` for Python classes with a :meth:`__getitem__` "
28+ "method unless they are :class:`dict` subclasses since in general case it is "
29+ "impossible to determine what the type of keys it supports. This function "
30+ "always succeeds."
2831msgstr ""
2932
30- #: ../../c-api/sequence.rst:20
33+ #: ../../c-api/sequence.rst:23
3134msgid ""
3235"Returns the number of objects in sequence *o* on success, and ``-1`` on "
3336"failure. This is equivalent to the Python expression ``len(o)``."
3437msgstr ""
3538
36- #: ../../c-api/sequence.rst:26
39+ #: ../../c-api/sequence.rst:29
3740msgid ""
3841"Return the concatenation of *o1* and *o2* on success, and *NULL* on failure."
3942" This is the equivalent of the Python expression ``o1 + o2``."
4043msgstr ""
4144
42- #: ../../c-api/sequence.rst:32
45+ #: ../../c-api/sequence.rst:35
4346msgid ""
4447"Return the result of repeating sequence object *o* *count* times, or *NULL* "
4548"on failure. This is the equivalent of the Python expression ``o * count``."
4649msgstr ""
4750
48- #: ../../c-api/sequence.rst:38
51+ #: ../../c-api/sequence.rst:41
4952msgid ""
5053"Return the concatenation of *o1* and *o2* on success, and *NULL* on failure."
5154" The operation is done *in-place* when *o1* supports it. This is the "
5255"equivalent of the Python expression ``o1 += o2``."
5356msgstr ""
5457
55- #: ../../c-api/sequence.rst:45
58+ #: ../../c-api/sequence.rst:48
5659msgid ""
5760"Return the result of repeating sequence object *o* *count* times, or *NULL* "
5861"on failure. The operation is done *in-place* when *o* supports it. This is"
5962" the equivalent of the Python expression ``o *= count``."
6063msgstr ""
6164
62- #: ../../c-api/sequence.rst:52
65+ #: ../../c-api/sequence.rst:55
6366msgid ""
6467"Return the *i*\\ th element of *o*, or *NULL* on failure. This is the "
6568"equivalent of the Python expression ``o[i]``."
6669msgstr ""
6770
68- #: ../../c-api/sequence.rst:58
71+ #: ../../c-api/sequence.rst:61
6972msgid ""
7073"Return the slice of sequence object *o* between *i1* and *i2*, or *NULL* on "
7174"failure. This is the equivalent of the Python expression ``o[i1:i2]``."
7275msgstr ""
7376
74- #: ../../c-api/sequence.rst:64
77+ #: ../../c-api/sequence.rst:67
7578msgid ""
7679"Assign object *v* to the *i*\\ th element of *o*. Raise an exception and "
7780"return ``-1`` on failure; return ``0`` on success. This is the equivalent "
7881"of the Python statement ``o[i] = v``. This function *does not* steal a "
7982"reference to *v*."
8083msgstr ""
8184
82- #: ../../c-api/sequence.rst:69
85+ #: ../../c-api/sequence.rst:72
8386msgid ""
8487"If *v* is *NULL*, the element is deleted, however this feature is deprecated"
8588" in favour of using :c:func:`PySequence_DelItem`."
8689msgstr ""
8790
88- #: ../../c-api/sequence.rst:75
91+ #: ../../c-api/sequence.rst:78
8992msgid ""
9093"Delete the *i*\\ th element of object *o*. Returns ``-1`` on failure. This"
9194" is the equivalent of the Python statement ``del o[i]``."
9295msgstr ""
9396
94- #: ../../c-api/sequence.rst:81
97+ #: ../../c-api/sequence.rst:84
9598msgid ""
9699"Assign the sequence object *v* to the slice in sequence object *o* from *i1*"
97100" to *i2*. This is the equivalent of the Python statement ``o[i1:i2] = v``."
98101msgstr ""
99102
100- #: ../../c-api/sequence.rst:87
103+ #: ../../c-api/sequence.rst:90
101104msgid ""
102105"Delete the slice in sequence object *o* from *i1* to *i2*. Returns ``-1`` "
103106"on failure. This is the equivalent of the Python statement ``del "
104107"o[i1:i2]``."
105108msgstr ""
106109
107- #: ../../c-api/sequence.rst:93
110+ #: ../../c-api/sequence.rst:96
108111msgid ""
109112"Return the number of occurrences of *value* in *o*, that is, return the "
110113"number of keys for which ``o[key] == value``. On failure, return ``-1``. "
111114"This is equivalent to the Python expression ``o.count(value)``."
112115msgstr ""
113116
114- #: ../../c-api/sequence.rst:100
117+ #: ../../c-api/sequence.rst:103
115118msgid ""
116119"Determine if *o* contains *value*. If an item in *o* is equal to *value*, "
117120"return ``1``, otherwise return ``0``. On error, return ``-1``. This is "
118121"equivalent to the Python expression ``value in o``."
119122msgstr ""
120123
121- #: ../../c-api/sequence.rst:107
124+ #: ../../c-api/sequence.rst:110
122125msgid ""
123126"Return the first index *i* for which ``o[i] == value``. On error, return "
124127"``-1``. This is equivalent to the Python expression ``o.index(value)``."
125128msgstr ""
126129
127- #: ../../c-api/sequence.rst:113
130+ #: ../../c-api/sequence.rst:116
128131msgid ""
129132"Return a list object with the same contents as the sequence or iterable *o*,"
130133" or *NULL* on failure. The returned list is guaranteed to be new. This is "
131134"equivalent to the Python expression ``list(o)``."
132135msgstr ""
133136
134- #: ../../c-api/sequence.rst:122
137+ #: ../../c-api/sequence.rst:125
135138msgid ""
136- "Return a tuple object with the same contents as the arbitrary sequence *o* "
137- "or *NULL* on failure. If *o* is a tuple, a new reference will be returned, "
138- "otherwise a tuple will be constructed with the appropriate contents. This "
139- "is equivalent to the Python expression ``tuple(o)``."
139+ "Return a tuple object with the same contents as the sequence or iterable "
140+ "*o*, or *NULL* on failure. If *o* is a tuple, a new reference will be "
141+ "returned, otherwise a tuple will be constructed with the appropriate "
142+ "contents. This is equivalent to the Python expression ``tuple(o)``."
140143msgstr ""
141144
142- #: ../../c-api/sequence.rst:130
145+ #: ../../c-api/sequence.rst:133
143146msgid ""
144- "Return the sequence *o* as a list, unless it is already a tuple or list, in "
145- "which case *o* is returned. Use :c:func:`PySequence_Fast_GET_ITEM` to "
146- "access the members of the result. Returns *NULL* on failure. If the object"
147- " is not a sequence, raises :exc:`TypeError` with *m* as the message text."
147+ "Return the sequence or iterable *o* as a list, unless it is already a tuple "
148+ "or list, in which case *o* is returned. Use "
149+ ":c:func:`PySequence_Fast_GET_ITEM` to access the members of the result. "
150+ "Returns *NULL* on failure. If the object is not a sequence or iterable, "
151+ "raises :exc:`TypeError` with *m* as the message text."
148152msgstr ""
149153
150- #: ../../c-api/sequence.rst:138
154+ #: ../../c-api/sequence.rst:141
155+ msgid ""
156+ "Returns the length of *o*, assuming that *o* was returned by "
157+ ":c:func:`PySequence_Fast` and that *o* is not *NULL*. The size can also be "
158+ "gotten by calling :c:func:`PySequence_Size` on *o*, but "
159+ ":c:func:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a "
160+ "list or tuple."
161+ msgstr ""
162+
163+ #: ../../c-api/sequence.rst:150
151164msgid ""
152165"Return the *i*\\ th element of *o*, assuming that *o* was returned by "
153166":c:func:`PySequence_Fast`, *o* is not *NULL*, and that *i* is within bounds."
154167msgstr ""
155168
156- #: ../../c-api/sequence.rst:144
169+ #: ../../c-api/sequence.rst:156
157170msgid ""
158171"Return the underlying array of PyObject pointers. Assumes that *o* was "
159172"returned by :c:func:`PySequence_Fast` and *o* is not *NULL*."
160173msgstr ""
161174
162- #: ../../c-api/sequence.rst:147
175+ #: ../../c-api/sequence.rst:159
163176msgid ""
164177"Note, if a list gets resized, the reallocation may relocate the items array."
165178" So, only use the underlying array pointer in contexts where the sequence "
166179"cannot change."
167180msgstr ""
168181
169- #: ../../c-api/sequence.rst:154
182+ #: ../../c-api/sequence.rst:166
170183msgid ""
171184"Return the *i*\\ th element of *o* or *NULL* on failure. Macro form of "
172185":c:func:`PySequence_GetItem` but without checking that "
173186":c:func:`PySequence_Check` on *o* is true and without adjustment for "
174187"negative indices."
175188msgstr ""
176-
177- #: ../../c-api/sequence.rst:162
178- msgid ""
179- "Returns the length of *o*, assuming that *o* was returned by "
180- ":c:func:`PySequence_Fast` and that *o* is not *NULL*. The size can also be "
181- "gotten by calling :c:func:`PySequence_Size` on *o*, but "
182- ":c:func:`PySequence_Fast_GET_SIZE` is faster because it can assume *o* is a "
183- "list or tuple."
184- msgstr ""
0 commit comments