Skip to content

Traducido archivo c-api/iter #3382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 43 additions & 20 deletions c-api/iter.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>\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"
Expand All @@ -30,37 +31,37 @@ 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). "
"If there are no remaining values, returns ``NULL`` with no exception set. If "
"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 ""
Expand Down Expand Up @@ -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:"
Expand Down