diff --git a/dictionaries/library_asyncio_future.txt b/dictionaries/library_asyncio_future.txt new file mode 100644 index 0000000000..3cfca85ea9 --- /dev/null +++ b/dictionaries/library_asyncio_future.txt @@ -0,0 +1,4 @@ +Task +Futures +aguardable +aguardables diff --git a/library/asyncio-future.po b/library/asyncio-future.po index b30f6b306f..913cb49fab 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -6,65 +6,75 @@ # Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-10-07 09:20+0200\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Last-Translator: \n" +"Language: es\n" +"X-Generator: Poedit 2.4.1\n" #: ../Doc/library/asyncio-future.rst:8 msgid "Futures" -msgstr "" +msgstr "Futures" #: ../Doc/library/asyncio-future.rst:10 msgid "" "**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" "base_futures.py`" msgstr "" +"**Código fuente:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" +"base_futures.py`" #: ../Doc/library/asyncio-future.rst:15 msgid "" "*Future* objects are used to bridge **low-level callback-based code** with " "high-level async/await code." msgstr "" +"Los objetos *Future* se utilizan para conectar **código basado en " +"retrollamadas de bajo nivel** (*low-level callback-based code*) con código " +"*async/await* de alto nivel." #: ../Doc/library/asyncio-future.rst:20 msgid "Future Functions" -msgstr "" +msgstr "Funciones Future" #: ../Doc/library/asyncio-future.rst:24 msgid "Return ``True`` if *obj* is either of:" -msgstr "" +msgstr "Retorna ``True`` si *obj* es uno de los siguientes:" #: ../Doc/library/asyncio-future.rst:26 msgid "an instance of :class:`asyncio.Future`," -msgstr "" +msgstr "una instancia de :class:`asyncio.Future`," #: ../Doc/library/asyncio-future.rst:27 msgid "an instance of :class:`asyncio.Task`," -msgstr "" +msgstr "una instancia de :class:`asyncio.Task`," #: ../Doc/library/asyncio-future.rst:28 msgid "a Future-like object with a ``_asyncio_future_blocking`` attribute." -msgstr "" +msgstr "un objeto tipo Future con un atributo ``_asyncio_future_blocking``." #: ../Doc/library/asyncio-future.rst:36 msgid "Return:" -msgstr "" +msgstr "Retorna:" #: ../Doc/library/asyncio-future.rst:38 msgid "" "*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a " "Future-like object (:func:`isfuture` is used for the test.)" msgstr "" +"el argumento *obj* inalterado, si *obj* es una :class:`Future`, :class:" +"`Task`, o un objeto tipo Future (esto se puede verificar con :func:" +"`isfuture`.)" #: ../Doc/library/asyncio-future.rst:42 msgid "" @@ -72,42 +82,53 @@ msgid "" "`iscoroutine` is used for the test); in this case the coroutine will be " "scheduled by ``ensure_future()``." msgstr "" +"un objeto :class:`Task` envolviendo *obj*, si *obj* es una corrutina (esto " +"se puede verificar con :func:`iscoroutine`); en este caso, la corrutina será " +"programada por ``ensure_future()``." #: ../Doc/library/asyncio-future.rst:47 msgid "" "a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:" "func:`inspect.isawaitable` is used for the test.)" msgstr "" +"un objeto :class:`Task` que aguardará a *obj*, si *obj* es aguardable (esto " +"se puede verificar con :func:`inspect.isawaitable`.)" #: ../Doc/library/asyncio-future.rst:50 msgid "If *obj* is neither of the above a :exc:`TypeError` is raised." -msgstr "" +msgstr "Si *obj* no es ninguno de los superiores, se lanzará :exc:`TypeError`." #: ../Doc/library/asyncio-future.rst:54 msgid "" "See also the :func:`create_task` function which is the preferred way for " "creating new Tasks." msgstr "" +"Ver también la función :func:`create_task`, que es la forma preferida de " +"crear nuevas *Tasks*." #: ../Doc/library/asyncio-future.rst:57 msgid "The function accepts any :term:`awaitable` object." -msgstr "" +msgstr "La función acepta cualquier objeto :term:`awaitable`." #: ../Doc/library/asyncio-future.rst:63 msgid "" "Wrap a :class:`concurrent.futures.Future` object in a :class:`asyncio." "Future` object." msgstr "" +"Envuelve un objeto :class:`concurrent.futures.Future` en un objeto :class:" +"`asyncio.Future`." #: ../Doc/library/asyncio-future.rst:68 msgid "Future Object" -msgstr "" +msgstr "Objeto Future" #: ../Doc/library/asyncio-future.rst:72 msgid "" "A Future represents an eventual result of an asynchronous operation. Not " "thread-safe." msgstr "" +"Un Future representa un resultado eventual de una operación asíncrona. No es " +"seguro en hilos (*thread-safe*)." #: ../Doc/library/asyncio-future.rst:75 msgid "" @@ -115,6 +136,9 @@ msgid "" "objects until they either have a result or an exception set, or until they " "are cancelled." msgstr "" +"Future es un objeto :term:`awaitable`. Las corrutinas pueden esperar " +"(*await*) a objetos Future hasta que obtengan un resultado o excepción, o " +"hasta que se cancelen." #: ../Doc/library/asyncio-future.rst:79 msgid "" @@ -122,6 +146,10 @@ msgid "" "protocols implemented using asyncio :ref:`transports `) to interoperate with high-level async/await code." msgstr "" +"Normalmente, los Futures se utilizan para permitir que código basado en " +"retrollamadas de bajo nivel (*low-level callback-based code*) (por ejemplo, " +"en protocolos implementados utilizando *asyncio* :ref:`transports `) interactúe con código *async/await* de alto nivel." #: ../Doc/library/asyncio-future.rst:84 msgid "" @@ -130,85 +158,109 @@ msgid "" "create_future`. This way alternative event loop implementations can inject " "their own optimized implementations of a Future object." msgstr "" +"Es recomendable no exponer nunca objetos Future en APIs expuestas al " +"usuario, y la forma recomendada de crear un objeto Future es llamando a :" +"meth:`loop.create_future`. De esta forma, implementaciones alternativas de " +"bucles de eventos (*event loop*) pueden inyectar sus propias " +"implementaciones optimizadas de un objeto Future." #: ../Doc/library/asyncio-future.rst:90 msgid "Added support for the :mod:`contextvars` module." -msgstr "" +msgstr "Añadido soporte para el módulo :mod:`contextvars`." #: ../Doc/library/asyncio-future.rst:95 msgid "Return the result of the Future." -msgstr "" +msgstr "Retorna el resultado del Future." #: ../Doc/library/asyncio-future.rst:97 msgid "" "If the Future is *done* and has a result set by the :meth:`set_result` " "method, the result value is returned." msgstr "" +"Si el Future es *done* y tiene un resultado establecido por el método :meth:" +"`set_result`, el valor resultante es retornado." #: ../Doc/library/asyncio-future.rst:100 msgid "" "If the Future is *done* and has an exception set by the :meth:" "`set_exception` method, this method raises the exception." msgstr "" +"Si el Future es *done* y tiene una excepción establecida por el método :meth:" +"`set_exception`, este método lanzará esta excepción." #: ../Doc/library/asyncio-future.rst:103 ../Doc/library/asyncio-future.rst:188 msgid "" "If the Future has been *cancelled*, this method raises a :exc:" "`CancelledError` exception." msgstr "" +"Si un evento es *cancelled*, este método lanzará una excepción :exc:" +"`CancelledError`." #: ../Doc/library/asyncio-future.rst:106 msgid "" "If the Future's result isn't yet available, this method raises a :exc:" "`InvalidStateError` exception." msgstr "" +"Si el resultado del Future todavía no está disponible, este método lanzará " +"una excepción :exc:`InvalidStateError`." #: ../Doc/library/asyncio-future.rst:111 msgid "Mark the Future as *done* and set its result." -msgstr "" +msgstr "Marca el Future como *done* y establece su resultado." #: ../Doc/library/asyncio-future.rst:113 ../Doc/library/asyncio-future.rst:120 msgid "" "Raises a :exc:`InvalidStateError` error if the Future is already *done*." -msgstr "" +msgstr "Lanza un error :exc:`InvalidStateError` si el Future ya está *done*." #: ../Doc/library/asyncio-future.rst:118 msgid "Mark the Future as *done* and set an exception." -msgstr "" +msgstr "Marca el Future como *done* y establece una excepción." #: ../Doc/library/asyncio-future.rst:125 msgid "Return ``True`` if the Future is *done*." -msgstr "" +msgstr "Retorna ``True`` si el Future está *done*." #: ../Doc/library/asyncio-future.rst:127 msgid "" "A Future is *done* if it was *cancelled* or if it has a result or an " "exception set with :meth:`set_result` or :meth:`set_exception` calls." msgstr "" +"Un Future está *done* si estaba *cancelled* o si tiene un resultado o " +"excepción establecidos mediante llamadas a :meth:`set_result` o :meth:" +"`set_exception`." #: ../Doc/library/asyncio-future.rst:133 msgid "Return ``True`` if the Future was *cancelled*." -msgstr "" +msgstr "Retorna ``True`` si el Future fue *cancelled*." #: ../Doc/library/asyncio-future.rst:135 msgid "" "The method is usually used to check if a Future is not *cancelled* before " "setting a result or an exception for it::" msgstr "" +"El método suele utilizarse para comprobar que un Future no es *cancelled* " +"antes de establecer un resultado o excepción al mismo::" #: ../Doc/library/asyncio-future.rst:143 msgid "Add a callback to be run when the Future is *done*." msgstr "" +"Añade una retrollamada (*callback*) a ser ejecutada cuando el Future es " +"*done*." #: ../Doc/library/asyncio-future.rst:145 msgid "The *callback* is called with the Future object as its only argument." msgstr "" +"La retrollamada (*callback*) es llamada con el objeto Future como su único " +"argumento." #: ../Doc/library/asyncio-future.rst:148 msgid "" "If the Future is already *done* when this method is called, the callback is " "scheduled with :meth:`loop.call_soon`." msgstr "" +"Si el Future ya es *done* cuando se llama a este método, la retrollamada " +"(*callback*) es programada con :meth:`loop.call_soon`." #: ../Doc/library/asyncio-future.rst:151 msgid "" @@ -216,98 +268,134 @@ msgid "" "class:`contextvars.Context` for the *callback* to run in. The current " "context is used when no *context* is provided." msgstr "" +"Un argumento opcional de contexto, por palabra clave, permite especificar " +"un :class:`contextvars.Context` personalizado para ser ejecutado en la " +"retrollamada (*callback*). El contexto actual se utiliza cuando no se provee " +"un contexto (*context*)." #: ../Doc/library/asyncio-future.rst:155 msgid "" ":func:`functools.partial` can be used to pass parameters to the callback, e." "g.::" msgstr "" +":func:`functools.partial` se puede utilizar para dar parámetros a la " +"retrollamada (*callback*), por ejemplo::" #: ../Doc/library/asyncio-future.rst:162 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." msgstr "" +"El parámetro de contexto (*context*) por palabra clave fue añadido. Ver :pep:" +"`567` para más detalles." #: ../Doc/library/asyncio-future.rst:168 msgid "Remove *callback* from the callbacks list." -msgstr "" +msgstr "Elimina la retrollamada (*callback*) de la lista de retrollamadas." #: ../Doc/library/asyncio-future.rst:170 msgid "" "Returns the number of callbacks removed, which is typically 1, unless a " "callback was added more than once." msgstr "" +"Retorna el número de retrollamadas (*callbacks*) eliminadas, que normalmente " +"es 1, excepto si una retrollamada fue añadida más de una vez." #: ../Doc/library/asyncio-future.rst:175 msgid "Cancel the Future and schedule callbacks." -msgstr "" +msgstr "Cancela el Future y programa retrollamadas (*callbacks*)." #: ../Doc/library/asyncio-future.rst:177 +#, fuzzy msgid "" "If the Future is already *done* or *cancelled*, return ``False``. Otherwise, " "change the Future's state to *cancelled*, schedule the callbacks, and return " "``True``." msgstr "" +"Si el Future ya está *done* o *cancelled*, retorna ``False``. De lo " +"contrario, cambia el estado del Future a *cancelled*, programa las " +"retrollamadas, y retorna ``True``." #: ../Doc/library/asyncio-future.rst:183 msgid "Return the exception that was set on this Future." -msgstr "" +msgstr "Retorna la excepción definida en este Future." #: ../Doc/library/asyncio-future.rst:185 msgid "" "The exception (or ``None`` if no exception was set) is returned only if the " "Future is *done*." msgstr "" +"La excepción (o ``None`` si no se había establecido ninguna excepción) es " +"retornada sólo si Future es *done*." #: ../Doc/library/asyncio-future.rst:191 msgid "" "If the Future isn't *done* yet, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" +"Si el Future todavía no es *done*, este método lanza una excepción :exc:" +"`InvalidStateError`." #: ../Doc/library/asyncio-future.rst:196 msgid "Return the event loop the Future object is bound to." msgstr "" +"Retorna el bucle de eventos (*event loop*) al cual el objeto Future está " +"asociado." #: ../Doc/library/asyncio-future.rst:203 msgid "" "This example creates a Future object, creates and schedules an asynchronous " "Task to set result for the Future, and waits until the Future has a result::" msgstr "" +"Este ejemplo crea un objeto Future, crea y programa una Task asíncrona para " +"establecer el resultado para el Future, y espera hasta que el Future tenga " +"un resultado::" #: ../Doc/library/asyncio-future.rst:238 msgid "" "The Future object was designed to mimic :class:`concurrent.futures.Future`. " "Key differences include:" msgstr "" +"El objeto Future fue diseñado para imitar a :class:`concurrent.futures." +"Future`. Entre las principales diferencias están:" #: ../Doc/library/asyncio-future.rst:241 msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." msgstr "" +"al contrario que Futures de *asyncio*, las instancias de :class:`concurrent." +"futures.Future` no son aguardables (*await*)." #: ../Doc/library/asyncio-future.rst:244 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` do not " "accept the *timeout* argument." msgstr "" +":meth:`asyncio.Future.result` y :meth:`asyncio.Future.exception` no aceptan " +"el argumento *timeout*." #: ../Doc/library/asyncio-future.rst:247 msgid "" ":meth:`asyncio.Future.result` and :meth:`asyncio.Future.exception` raise an :" "exc:`InvalidStateError` exception when the Future is not *done*." msgstr "" +":meth:`asyncio.Future.result` y :meth:`asyncio.Future.exception` lanzan una " +"excepción :exc:`InvalidStateError` cuando el Future no es *done*." #: ../Doc/library/asyncio-future.rst:251 msgid "" "Callbacks registered with :meth:`asyncio.Future.add_done_callback` are not " "called immediately. They are scheduled with :meth:`loop.call_soon` instead." msgstr "" +"Las retrollamadas (*callbacks*) registradas con :meth:`asyncio.Future." +"add_done_callback` no son llamadas inmediatamente, sino que son programadas " +"con :meth:`loop.call_soon`." #: ../Doc/library/asyncio-future.rst:255 msgid "" "asyncio Future is not compatible with the :func:`concurrent.futures.wait` " "and :func:`concurrent.futures.as_completed` functions." msgstr "" +"*asyncio* Future no es compatible con las funciones :func:`concurrent." +"futures.wait` ni :func:`concurrent.futures.as_completed`."