Skip to content

Commit fde3851

Browse files
Traducido archivo c-api/iter (#3382)
Closes #3252
1 parent c98c7ee commit fde3851

File tree

1 file changed

+43
-20
lines changed

1 file changed

+43
-20
lines changed

Diff for: c-api/iter.po

+43-20
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ msgstr ""
1111
"Project-Id-Version: Python 3.8\n"
1212
"Report-Msgid-Bugs-To: \n"
1313
"POT-Creation-Date: 2024-11-21 16:38-0300\n"
14-
"PO-Revision-Date: 2021-08-16 13:04+0200\n"
15-
"Last-Translator: Cristián Maureira-Fredes <[email protected]>\n"
16-
"Language: es\n"
14+
"PO-Revision-Date: 2025-04-10 23:48+0200\n"
15+
"Last-Translator: David Spindola\n"
1716
"Language-Team: python-doc-es\n"
18-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"Language: es\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=utf-8\n"
2120
"Content-Transfer-Encoding: 8bit\n"
21+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2222
"Generated-By: Babel 2.16.0\n"
23+
"X-Generator: Poedit 3.6\n"
2324

2425
#: ../Doc/c-api/iter.rst:6
2526
msgid "Iterator Protocol"
@@ -30,37 +31,37 @@ msgid "There are two functions specifically for working with iterators."
3031
msgstr "Hay dos funciones específicas para trabajar con iteradores."
3132

3233
#: ../Doc/c-api/iter.rst:12
33-
#, fuzzy
3434
msgid ""
35-
"Return non-zero if the object *o* can be safely passed to :c:func:"
36-
"`PyIter_Next`, and ``0`` otherwise. This function always succeeds."
35+
"Return non-zero if the object *o* can be safely passed "
36+
"to :c:func:`PyIter_Next`, and ``0`` otherwise. This function always "
37+
"succeeds."
3738
msgstr ""
38-
"Retorna un valor distinto de cero si el objeto *o* admite el protocolo de "
39-
"iterador y ``0`` en caso contrario. Esta función siempre tiene éxito."
39+
"Retorna un valor distinto de cero si el objeto *o* puede pasarse de manera "
40+
"segura a :c:func:`PyIter_Next`, y ``0`` en caso contrario. Esta función "
41+
"siempre tiene éxito."
4042

4143
#: ../Doc/c-api/iter.rst:17
42-
#, fuzzy
4344
msgid ""
4445
"Return non-zero if the object *o* provides the :class:`AsyncIterator` "
4546
"protocol, and ``0`` otherwise. This function always succeeds."
4647
msgstr ""
47-
"Retorna un valor distinto de cero si el objeto 'obj' proporciona protocolos :"
48-
"class:`AsyncIterator` y ``0`` en caso contrario. Esta función siempre tiene "
49-
"éxito."
48+
"Retorna un valor distinto de cero si el objeto *o* proporciona el "
49+
"protocolo :class:`AsyncIterator`, y ``0`` en caso contrario. Esta función "
50+
"siempre tiene éxito."
5051

5152
#: ../Doc/c-api/iter.rst:24
52-
#, fuzzy
5353
msgid ""
5454
"Return the next value from the iterator *o*. The object must be an iterator "
5555
"according to :c:func:`PyIter_Check` (it is up to the caller to check this). "
5656
"If there are no remaining values, returns ``NULL`` with no exception set. If "
5757
"an error occurs while retrieving the item, returns ``NULL`` and passes along "
5858
"the exception."
5959
msgstr ""
60-
"Retorna el siguiente valor de la iteración *o*. El objeto debe ser un "
61-
"iterador (depende de quién llama comprobar esto). Si no quedan valores "
62-
"restantes, retorna ``NULL`` sin establecer ninguna excepción. Si se produce "
63-
"un error al recuperar el elemento, retorna ``NULL`` y pasa la excepción."
60+
"Retorna el siguiente valor del iterador *o*. El objeto debe ser un iterador "
61+
"según :c:func:`PyIter_Check` (depende del llamador verificar esto). Si no "
62+
"hay valores restantes, retorna ``NULL`` sin establecer una excepción. Si "
63+
"ocurre un error al recuperar el elemento, devuelve ``NULL`` y envía la "
64+
"excepción."
6465

6566
#: ../Doc/c-api/iter.rst:30
6667
msgid ""
@@ -95,13 +96,35 @@ msgid ""
9596
" /* continue doing useful work */\n"
9697
"}"
9798
msgstr ""
99+
"PyObject *iterator = PyObject_GetIter(obj);\n"
100+
"PyObject *item;\n"
101+
"\n"
102+
"if (iterator == NULL) {\n"
103+
" /* propagate error */\n"
104+
"}\n"
105+
"\n"
106+
"while ((item = PyIter_Next(iterator))) {\n"
107+
" /* do something with item */\n"
108+
" ...\n"
109+
" /* release reference when done */\n"
110+
" Py_DECREF(item);\n"
111+
"}\n"
112+
"\n"
113+
"Py_DECREF(iterator);\n"
114+
"\n"
115+
"if (PyErr_Occurred()) {\n"
116+
" /* propagate error */\n"
117+
"}\n"
118+
"else {\n"
119+
" /* continue doing useful work */\n"
120+
"}"
98121

99122
#: ../Doc/c-api/iter.rst:59
100123
msgid ""
101124
"The enum value used to represent different results of :c:func:`PyIter_Send`."
102125
msgstr ""
103-
"El valor de enumeración utilizado para representar diferentes resultados de :"
104-
"c:func:`PyIter_Send`."
126+
"El valor de enumeración utilizado para representar diferentes resultados "
127+
"de :c:func:`PyIter_Send`."
105128

106129
#: ../Doc/c-api/iter.rst:66
107130
msgid "Sends the *arg* value into the iterator *iter*. Returns:"

0 commit comments

Comments
 (0)