@@ -11,15 +11,16 @@ msgstr ""
11
11
"Project-Id-Version : Python 3.8\n "
12
12
"Report-Msgid-Bugs-To : \n "
13
13
"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 "
17
16
"Language-Team : python-doc-es\n "
18
- "Plural-Forms : nplurals=2; plural=(n != 1); \n "
17
+ "Language : es \n "
19
18
"MIME-Version : 1.0\n "
20
19
"Content-Type : text/plain; charset=utf-8\n "
21
20
"Content-Transfer-Encoding : 8bit\n "
21
+ "Plural-Forms : nplurals=2; plural=(n != 1);\n "
22
22
"Generated-By : Babel 2.16.0\n "
23
+ "X-Generator : Poedit 3.6\n "
23
24
24
25
#: ../Doc/c-api/iter.rst:6
25
26
msgid "Iterator Protocol"
@@ -30,37 +31,37 @@ msgid "There are two functions specifically for working with iterators."
30
31
msgstr "Hay dos funciones específicas para trabajar con iteradores."
31
32
32
33
#: ../Doc/c-api/iter.rst:12
33
- #, fuzzy
34
34
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."
37
38
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."
40
42
41
43
#: ../Doc/c-api/iter.rst:17
42
- #, fuzzy
43
44
msgid ""
44
45
"Return non-zero if the object *o* provides the :class:`AsyncIterator` "
45
46
"protocol, and ``0`` otherwise. This function always succeeds."
46
47
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."
50
51
51
52
#: ../Doc/c-api/iter.rst:24
52
- #, fuzzy
53
53
msgid ""
54
54
"Return the next value from the iterator *o*. The object must be an iterator "
55
55
"according to :c:func:`PyIter_Check` (it is up to the caller to check this). "
56
56
"If there are no remaining values, returns ``NULL`` with no exception set. If "
57
57
"an error occurs while retrieving the item, returns ``NULL`` and passes along "
58
58
"the exception."
59
59
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."
64
65
65
66
#: ../Doc/c-api/iter.rst:30
66
67
msgid ""
@@ -95,13 +96,35 @@ msgid ""
95
96
" /* continue doing useful work */\n"
96
97
"}"
97
98
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
+ "}"
98
121
99
122
#: ../Doc/c-api/iter.rst:59
100
123
msgid ""
101
124
"The enum value used to represent different results of :c:func:`PyIter_Send`."
102
125
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`."
105
128
106
129
#: ../Doc/c-api/iter.rst:66
107
130
msgid "Sends the *arg* value into the iterator *iter*. Returns:"
0 commit comments