diff --git a/c-api/iter.po b/c-api/iter.po index e00cbf2466..5ebc364693 100644 --- a/c-api/iter.po +++ b/c-api/iter.po @@ -11,15 +11,16 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2021-08-16 13:04+0200\n" -"Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\n" +"PO-Revision-Date: 2025-04-10 23:48+0200\n" +"Last-Translator: David Spindola\n" "Language-Team: python-doc-es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Babel 2.16.0\n" +"X-Generator: Poedit 3.6\n" #: ../Doc/c-api/iter.rst:6 msgid "Iterator Protocol" @@ -30,26 +31,25 @@ msgid "There are two functions specifically for working with iterators." msgstr "Hay dos funciones específicas para trabajar con iteradores." #: ../Doc/c-api/iter.rst:12 -#, fuzzy msgid "" -"Return non-zero if the object *o* can be safely passed to :c:func:" -"`PyIter_Next`, and ``0`` otherwise. This function always succeeds." +"Return non-zero if the object *o* can be safely passed " +"to :c:func:`PyIter_Next`, and ``0`` otherwise. This function always " +"succeeds." msgstr "" -"Retorna un valor distinto de cero si el objeto *o* admite el protocolo de " -"iterador y ``0`` en caso contrario. Esta función siempre tiene éxito." +"Retorna un valor distinto de cero si el objeto *o* puede pasarse de manera " +"segura a :c:func:`PyIter_Next`, y ``0`` en caso contrario. Esta función " +"siempre tiene éxito." #: ../Doc/c-api/iter.rst:17 -#, fuzzy msgid "" "Return non-zero if the object *o* provides the :class:`AsyncIterator` " "protocol, and ``0`` otherwise. This function always succeeds." msgstr "" -"Retorna un valor distinto de cero si el objeto 'obj' proporciona protocolos :" -"class:`AsyncIterator` y ``0`` en caso contrario. Esta función siempre tiene " -"éxito." +"Retorna un valor distinto de cero si el objeto *o* proporciona el " +"protocolo :class:`AsyncIterator`, y ``0`` en caso contrario. Esta función " +"siempre tiene éxito." #: ../Doc/c-api/iter.rst:24 -#, fuzzy msgid "" "Return the next value from the iterator *o*. The object must be an iterator " "according to :c:func:`PyIter_Check` (it is up to the caller to check this). " @@ -57,10 +57,11 @@ msgid "" "an error occurs while retrieving the item, returns ``NULL`` and passes along " "the exception." msgstr "" -"Retorna el siguiente valor de la iteración *o*. El objeto debe ser un " -"iterador (depende de quién llama comprobar esto). Si no quedan valores " -"restantes, retorna ``NULL`` sin establecer ninguna excepción. Si se produce " -"un error al recuperar el elemento, retorna ``NULL`` y pasa la excepción." +"Retorna el siguiente valor del iterador *o*. El objeto debe ser un iterador " +"según :c:func:`PyIter_Check` (depende del llamador verificar esto). Si no " +"hay valores restantes, retorna ``NULL`` sin establecer una excepción. Si " +"ocurre un error al recuperar el elemento, devuelve ``NULL`` y envía la " +"excepción." #: ../Doc/c-api/iter.rst:30 msgid "" @@ -95,13 +96,35 @@ msgid "" " /* continue doing useful work */\n" "}" msgstr "" +"PyObject *iterator = PyObject_GetIter(obj);\n" +"PyObject *item;\n" +"\n" +"if (iterator == NULL) {\n" +" /* propagate error */\n" +"}\n" +"\n" +"while ((item = PyIter_Next(iterator))) {\n" +" /* do something with item */\n" +" ...\n" +" /* release reference when done */\n" +" Py_DECREF(item);\n" +"}\n" +"\n" +"Py_DECREF(iterator);\n" +"\n" +"if (PyErr_Occurred()) {\n" +" /* propagate error */\n" +"}\n" +"else {\n" +" /* continue doing useful work */\n" +"}" #: ../Doc/c-api/iter.rst:59 msgid "" "The enum value used to represent different results of :c:func:`PyIter_Send`." msgstr "" -"El valor de enumeración utilizado para representar diferentes resultados de :" -"c:func:`PyIter_Send`." +"El valor de enumeración utilizado para representar diferentes resultados " +"de :c:func:`PyIter_Send`." #: ../Doc/c-api/iter.rst:66 msgid "Sends the *arg* value into the iterator *iter*. Returns:"