From 0f3bc36f8d8504ab9194dd71ca72c75ca4240b94 Mon Sep 17 00:00:00 2001 From: Carlos Mena <50986837+carlosm00@users.noreply.github.com> Date: Fri, 30 May 2025 01:02:40 +0200 Subject: [PATCH 01/40] =?UTF-8?q?Traducci=C3=B3n=20de=20deprecations/c-api?= =?UTF-8?q?-pending-removal-in-future.po=20(#3397)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3291 --- .../c-api-pending-removal-in-future.po | 58 +++++++++++++++---- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/deprecations/c-api-pending-removal-in-future.po b/deprecations/c-api-pending-removal-in-future.po index 1996da9be1..c12f53b674 100644 --- a/deprecations/c-api-pending-removal-in-future.po +++ b/deprecations/c-api-pending-removal-in-future.po @@ -10,134 +10,172 @@ msgstr "" "Project-Id-Version: Python en Español 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language: es\n" +"PO-Revision-Date: 2025-05-30 00:19+0200\n" +"Last-Translator: Carlos Mena Pérez <@carlosm00>\n" "Language-Team: 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.5\n" #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:2 msgid "Pending Removal in Future Versions" -msgstr "" +msgstr "Pendiente de eliminación en versiones futuras" #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:4 msgid "" "The following APIs are deprecated and will be removed, although there is " "currently no date scheduled for their removal." msgstr "" +"Las siguientes APIs están obsoletas y serán eliminadas, aunque actualmente " +"no hay fecha prevista para su eliminación." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:7 msgid ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Unneeded since Python 3.8." -msgstr "" +msgstr ":c:macro:`Py_TPFLAGS_HAVE_FINALIZE`: Innecesaria desde Python 3.8." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:9 msgid ":c:func:`PyErr_Fetch`: Use :c:func:`PyErr_GetRaisedException` instead." msgstr "" +":c:func:`PyErr_Fetch`: Utilice :c:func:`PyErr_GetRaisedException` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:11 msgid "" ":c:func:`PyErr_NormalizeException`: Use :c:func:`PyErr_GetRaisedException` " "instead." msgstr "" +":c:func:`PyErr_NormalizeException`: Utilice :c:func:" +"`PyErr_GetRaisedException` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:13 msgid "" ":c:func:`PyErr_Restore`: Use :c:func:`PyErr_SetRaisedException` instead." msgstr "" +":c:func:`PyErr_Restore`: Utilice :c:func:`PyErr_SetRaisedException` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:15 msgid "" ":c:func:`PyModule_GetFilename`: Use :c:func:`PyModule_GetFilenameObject` " "instead." msgstr "" +":c:func:`PyModule_GetFilename`: Utilice :c:func:`PyModule_GetFilenameObject` " +"en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:17 msgid ":c:func:`PyOS_AfterFork`: Use :c:func:`PyOS_AfterFork_Child` instead." msgstr "" +":c:func:`PyOS_AfterFork`: Utilice :c:func:`PyOS_AfterFork_Child` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:19 msgid "" ":c:func:`PySlice_GetIndicesEx`: Use :c:func:`PySlice_Unpack` and :c:func:" "`PySlice_AdjustIndices` instead." msgstr "" +":c:func:`PySlice_GetIndicesEx`: Utilice :c:func:`PySlice_Unpack` y :c:func:" +"`PySlice_AdjustIndices` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:21 msgid "" ":c:func:`!PyUnicode_AsDecodedObject`: Use :c:func:`PyCodec_Decode` instead." msgstr "" +":c:func:`!PyUnicode_AsDecodedObject`: Utilice :c:func:`PyCodec_Decode` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:23 msgid "" ":c:func:`!PyUnicode_AsDecodedUnicode`: Use :c:func:`PyCodec_Decode` instead." msgstr "" +":c:func:`!PyUnicode_AsDecodedUnicode`: Utilice :c:func:`PyCodec_Decode` en " +"su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:25 msgid "" ":c:func:`!PyUnicode_AsEncodedObject`: Use :c:func:`PyCodec_Encode` instead." msgstr "" +":c:func:`!PyUnicode_AsEncodedObject`: Utilice :c:func:`PyCodec_Encode` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:27 msgid "" ":c:func:`!PyUnicode_AsEncodedUnicode`: Use :c:func:`PyCodec_Encode` instead." msgstr "" +":c:func:`!PyUnicode_AsEncodedUnicode`: Utilice :c:func:`PyCodec_Encode` en " +"su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:29 msgid ":c:func:`PyUnicode_READY`: Unneeded since Python 3.12" -msgstr "" +msgstr ":c:func:`PyUnicode_READY`: Innecesaria desde Python 3.12" #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:31 msgid ":c:func:`!PyErr_Display`: Use :c:func:`PyErr_DisplayException` instead." msgstr "" +":c:func:`!PyErr_Display`: Utilice :c:func:`PyErr_DisplayException` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:33 msgid "" ":c:func:`!_PyErr_ChainExceptions`: Use :c:func:`!_PyErr_ChainExceptions1` " "instead." msgstr "" +":c:func:`!_PyErr_ChainExceptions`: Utilice :c:func:`!" +"_PyErr_ChainExceptions1` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:35 msgid "" ":c:member:`!PyBytesObject.ob_shash` member: call :c:func:`PyObject_Hash` " "instead." msgstr "" +"Miembro :c:member:`!PyBytesObject.ob_shash`: Llame a :c:func:`PyObject_Hash` " +"en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:37 msgid ":c:member:`!PyDictObject.ma_version_tag` member." -msgstr "" +msgstr "Miembro :c:member:`!PyDictObject.ma_version_tag`." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:38 msgid "Thread Local Storage (TLS) API:" -msgstr "" +msgstr "API de almacenamiento local de hilos (TLS):" #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:40 msgid "" ":c:func:`PyThread_create_key`: Use :c:func:`PyThread_tss_alloc` instead." msgstr "" +":c:func:`PyThread_create_key`: Utilice :c:func:`PyThread_tss_alloc` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:42 msgid ":c:func:`PyThread_delete_key`: Use :c:func:`PyThread_tss_free` instead." msgstr "" +":c:func:`PyThread_delete_key`: Utilice :c:func:`PyThread_tss_free` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:44 msgid "" ":c:func:`PyThread_set_key_value`: Use :c:func:`PyThread_tss_set` instead." msgstr "" +":c:func:`PyThread_set_key_value`: Utilice :c:func:`PyThread_tss_set` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:46 msgid "" ":c:func:`PyThread_get_key_value`: Use :c:func:`PyThread_tss_get` instead." msgstr "" +":c:func:`PyThread_get_key_value`: Utilice :c:func:`PyThread_tss_get` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:48 msgid "" ":c:func:`PyThread_delete_key_value`: Use :c:func:`PyThread_tss_delete` " "instead." msgstr "" +":c:func:`PyThread_delete_key_value`: Utilice :c:func:`PyThread_tss_delete` " +"en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-future.rst:50 msgid ":c:func:`PyThread_ReInitTLS`: Unneeded since Python 3.7." -msgstr "" +msgstr ":c:func:`PyThread_ReInitTLS`: Innecesaria desde Python 3.7." From 69f6a2b97351984ba38c320500a7a813a9f3a71d Mon Sep 17 00:00:00 2001 From: Marcos Medrano <786907+mmmarcos@users.noreply.github.com> Date: Sun, 1 Jun 2025 00:23:17 +0200 Subject: [PATCH 02/40] Traducido c-api/refcounting.po (#3399) Fix de algunas traducciones y problemas que quedaron sin resolver en #3386 --------- Co-authored-by: rtobar --- c-api/refcounting.po | 111 ++++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 50 deletions(-) diff --git a/c-api/refcounting.po b/c-api/refcounting.po index f3abd37805..a76233eb0f 100644 --- a/c-api/refcounting.po +++ b/c-api/refcounting.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: 2022-11-04 09:05-0300\n" -"Last-Translator: Rodrigo Poblete \n" -"Language: es\n" +"PO-Revision-Date: 2025-05-16 20:01+0200\n" +"Last-Translator: Marcos Medrano \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/refcounting.rst:8 msgid "Reference Counting" @@ -30,7 +31,7 @@ msgid "" "The functions and macros in this section are used for managing reference " "counts of Python objects." msgstr "" -"Las funciónes y macros de esta sección se utilizan para administrar conteos " +"Las funciones y macros de esta sección se utilizan para administrar conteos " "de referencia de objetos en Python." #: ../Doc/c-api/refcounting.rst:16 @@ -40,16 +41,16 @@ msgstr "Obtiene el recuento de referencias para el objeto de Python *o*." #: ../Doc/c-api/refcounting.rst:18 msgid "" "Note that the returned value may not actually reflect how many references to " -"the object are actually held. For example, some objects are :term:" -"`immortal` and have a very high refcount that does not reflect the actual " -"number of references. Consequently, do not rely on the returned value to be " -"accurate, other than a value of 0 or 1." -msgstr "" -"Ten cuenta que el valor devuelto puede que no reflejar cúantas referencias " -"al objecto existen realmente. Por ejemplo, algunos objetos son :" -"term:'immortal' y tienen un refcount muy alto que no refleja el número " +"the object are actually held. For example, some objects " +"are :term:`immortal` and have a very high refcount that does not reflect the " +"actual number of references. Consequently, do not rely on the returned " +"value to be accurate, other than a value of 0 or 1." +msgstr "" +"Ten cuenta que el valor devuelto puede que no reflejar cuantas referencias " +"al objecto existen realmente. Por ejemplo, algunos objetos " +"son :term:`immortal` y tienen un refcount muy alto que no refleja el número " "real de referencias. Por lo tanto, no confíes en que el valor devuelto sea " -"presciso, salvo cuando sea 0 o 1. " +"preciso, salvo cuando sea 0 o 1." #: ../Doc/c-api/refcounting.rst:24 msgid "" @@ -75,9 +76,9 @@ msgid "" "On :ref:`Python build with Free Threading `, if " "*refcnt* is larger than ``UINT32_MAX``, the object is made :term:`immortal`." msgstr "" -"En :ref:`compilación de Python con Free Threading `, " -"si *refcnt* es mas mayor que ``UINT32_MAX``, el objeto se convierte en :term:" -"`immortal`." +"En :ref:`compilación de Python con Free Threading `, " +"si *refcnt* es mas mayor que ``UINT32_MAX``, el objeto se convierte " +"en :term:`immortal`." #: ../Doc/c-api/refcounting.rst:40 ../Doc/c-api/refcounting.rst:53 #: ../Doc/c-api/refcounting.rst:119 @@ -95,23 +96,24 @@ msgid "" "is in use and should not be destroyed." msgstr "" "Indica tomar una nueva :term:`strong reference` al objeto *o*, lo que indica " -"que está en uso y no debe ser destruido. " +"que está en uso y no debe ser destruido." #: ../Doc/c-api/refcounting.rst:55 msgid "" -"This function is usually used to convert a :term:`borrowed reference` to a :" -"term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " +"This function is usually used to convert a :term:`borrowed reference` to " +"a :term:`strong reference` in-place. The :c:func:`Py_NewRef` function can be " "used to create a new :term:`strong reference`." msgstr "" "Esta función se usa generalmente para convertir un :term:`borrowed " -"reference` en un :term:`strong reference` en su lugar. La función :c:func:" -"`Py_NewRef` se puede utilizar para crear un nuevo :term:`strong reference`." +"reference` en un :term:`strong reference` en su lugar. La " +"función :c:func:`Py_NewRef` se puede utilizar para crear un " +"nuevo :term:`strong reference`." #: ../Doc/c-api/refcounting.rst:59 msgid "When done using the object, release is by calling :c:func:`Py_DECREF`." msgstr "" -"Cuando se termine de usar el objeto, se libera llamando a :c:func:" -"`Py_DECREF`." +"Cuando se termine de usar el objeto, se libera llamando " +"a :c:func:`Py_DECREF`." #: ../Doc/c-api/refcounting.rst:61 msgid "" @@ -123,9 +125,11 @@ msgstr "" #: ../Doc/c-api/refcounting.rst:64 msgid "" -"Do not expect this function to actually modify *o* in any way. For at least :" -"pep:`some objects <0683>`, this function has no effect." +"Do not expect this function to actually modify *o* in any way. For at " +"least :pep:`some objects <0683>`, this function has no effect." msgstr "" +"No esperes que esta función modifique realmente *o* de ninguna manera. Al " +"menos para :pep:`algunos objetos <0683>`, esta función no tiene ningún efecto." #: ../Doc/c-api/refcounting.rst:74 msgid "" @@ -144,16 +148,16 @@ msgid "" "Create a new :term:`strong reference` to an object: call :c:func:`Py_INCREF` " "on *o* and return the object *o*." msgstr "" -"Crea una nueva :term:`strong reference` a un objeto: llama a :c:func:" -"`Py_INCREF` sobre *o* y devuelve el objeto *o*." +"Crea una nueva :term:`strong reference` a un objeto: llama " +"a :c:func:`Py_INCREF` sobre *o* y devuelve el objeto *o*." #: ../Doc/c-api/refcounting.rst:85 msgid "" "When the :term:`strong reference` is no longer needed, :c:func:`Py_DECREF` " "should be called on it to release the reference." msgstr "" -"Cuando la :term:`strong reference` ya no sea necesaria, se debe llamar a :c:" -"func:`Py_DECREF` para disminuir el recuento de referencias del objeto." +"Cuando la :term:`strong reference` ya no sea necesaria, se debe llamar " +"a :c:func:`Py_DECREF` para disminuir el recuento de referencias del objeto." #: ../Doc/c-api/refcounting.rst:88 msgid "" @@ -172,6 +176,8 @@ msgid "" "Py_INCREF(obj);\n" "self->attr = obj;" msgstr "" +"Py_INCREF(obj);\n" +"self->attr = obj;" #: ../Doc/c-api/refcounting.rst:96 msgid "can be written as::" @@ -179,7 +185,7 @@ msgstr "puede ser escrito como::" #: ../Doc/c-api/refcounting.rst:98 msgid "self->attr = Py_NewRef(obj);" -msgstr "" +msgstr "self->attr = Py_NewRef(obj);" #: ../Doc/c-api/refcounting.rst:100 msgid "See also :c:func:`Py_INCREF`." @@ -229,14 +235,16 @@ msgstr "" #: ../Doc/c-api/refcounting.rst:132 msgid "" -"Do not expect this function to actually modify *o* in any way. For at least :" -"pep:`some objects <683>`, this function has no effect." +"Do not expect this function to actually modify *o* in any way. For at " +"least :pep:`some objects <683>`, this function has no effect." msgstr "" +"No esperes que esta función modifique realmente *o* de ninguna manera. Al " +"menos para :pep:`algunos objetos <683>`, esta función no tiene ningún efecto." #: ../Doc/c-api/refcounting.rst:138 msgid "" -"The deallocation function can cause arbitrary Python code to be invoked (e." -"g. when a class instance with a :meth:`~object.__del__` method is " +"The deallocation function can cause arbitrary Python code to be invoked " +"(e.g. when a class instance with a :meth:`~object.__del__` method is " "deallocated). While exceptions in such code are not propagated, the " "executed code has free access to all Python global variables. This means " "that any object that is reachable from a global variable should be in a " @@ -247,12 +255,12 @@ msgid "" msgstr "" "La función de desasignación puede hacer que se invoque un código arbitrario " "de Python (por ejemplo, cuando se desasigna una instancia de clase con el " -"método :meth:`~object.__del__`). Mientras las excepciones en dicho código no sean " -"propagadas, el código ejecutado tendrá acceso libre a todas las variables " -"globales de Python. Esto significa que cualquier objeto al que se pueda " -"acceder desde una variable global debería estar en un estado coherente antes " -"de invocar a :c:func:`Py_DECREF`. Por ejemplo, el código para eliminar un " -"objeto de una lista debe copiar una referencia al objeto eliminado en una " +"método :meth:`~object.__del__`). Mientras las excepciones en dicho código no " +"sean propagadas, el código ejecutado tendrá acceso libre a todas las " +"variables globales de Python. Esto significa que cualquier objeto al que se " +"pueda acceder desde una variable global debería estar en un estado coherente " +"antes de invocar a :c:func:`Py_DECREF`. Por ejemplo, el código para eliminar " +"un objeto de una lista debe copiar una referencia al objeto eliminado en una " "variable temporal, actualizar la estructura de datos de la lista y luego " "llamar a :c:func:`Py_DECREF` para la variable temporal." @@ -263,8 +271,8 @@ msgid "" "here as well." msgstr "" "Similar a :c:func:`Py_DECREF`, pero el objeto *o* puede ser ``NULL``, en " -"cuyo caso esto no tendría efecto alguno. El mismo aviso de :c:func:" -"`Py_DECREF` aplica aqui también." +"cuyo caso esto no tendría efecto alguno. El mismo aviso " +"de :c:func:`Py_DECREF` aplica aquí también." #: ../Doc/c-api/refcounting.rst:160 msgid "" @@ -280,7 +288,7 @@ msgstr "" "es el mismo que el de :c:func:`Py_DECREF`, excepto que el argumento también " "se establece en ``NULL``. La advertencia de :c:func:`Py_DECREF` no se aplica " "en este caso, ya que el macro usa cuidadosamente una variable temporal y " -"asigna ``NULL`` al algumento antes de luberar la referencia " +"asigna ``NULL`` al argumento antes de liberar la referencia." #: ../Doc/c-api/refcounting.rst:168 msgid "" @@ -295,7 +303,7 @@ msgid "" "The macro argument is now only evaluated once. If the argument has side " "effects, these are no longer duplicated." msgstr "" -"Ahora, el macro argumento solo se evalua una vez. Si el argumento tiene " +"Ahora, el macro argumento solo se evalúa una vez. Si el argumento tiene " "efectos secundarios, estos ya no se duplican." #: ../Doc/c-api/refcounting.rst:178 @@ -310,8 +318,9 @@ msgstr "" #: ../Doc/c-api/refcounting.rst:185 msgid "" -"Release a :term:`strong reference` to object *o*. A function version of :c:" -"func:`Py_XDECREF`. It can be used for runtime dynamic embedding of Python." +"Release a :term:`strong reference` to object *o*. A function version " +"of :c:func:`Py_XDECREF`. It can be used for runtime dynamic embedding of " +"Python." msgstr "" "Libera una :term:`strong reference` al objeto *o*. Una versión en forma de " "función de :c:func:`Py_XDECREF`. Puede utilizarse para la integración " @@ -328,13 +337,15 @@ msgstr "" #: ../Doc/c-api/refcounting.rst:195 msgid "As in case of :c:func:`Py_CLEAR`, \"the obvious\" code can be deadly::" msgstr "" -"Como en el caso de :c:func:`Py_CLEAR`, el codigo \"obvio\" puede ser mortal::" +"Como en el caso de :c:func:`Py_CLEAR`, el código \"obvio\" puede ser mortal::" #: ../Doc/c-api/refcounting.rst:197 msgid "" "Py_DECREF(dst);\n" "dst = src;" msgstr "" +"Py_DECREF(dst);\n" +"dst = src;" #: ../Doc/c-api/refcounting.rst:200 msgid "The safe way is::" @@ -342,7 +353,7 @@ msgstr "La forma segura es::" #: ../Doc/c-api/refcounting.rst:202 msgid "Py_SETREF(dst, src);" -msgstr "" +msgstr "Py_SETREF(dst, src);" #: ../Doc/c-api/refcounting.rst:204 msgid "" @@ -350,7 +361,7 @@ msgid "" "old value of *dst*, so that any code triggered as a side-effect of *dst* " "getting torn down no longer believes *dst* points to a valid object." msgstr "" -"Eso termina asignando *dst* al valor *src* _antes de_ liberar la referencia " +"Eso termina asignando *dst* al valor *src* _antes_ de liberar la referencia " "al valor anterior de *dst*, para que cualquier código ejecutado como efecto " "secundario de *dst* siendo destruido ya no crea que *dst* señala a un objeto " "válido." From f5a06a3b43fe0615c9dd17b4cdcbaa89ebb096ae Mon Sep 17 00:00:00 2001 From: Carlos Mena <50986837+carlosm00@users.noreply.github.com> Date: Mon, 2 Jun 2025 01:02:10 +0200 Subject: [PATCH 03/40] =?UTF-8?q?Traducci=C3=B3n=20de=20deprecations/c-api?= =?UTF-8?q?-pending-removal-in-3.14.po=20(#3398)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3292 --------- Co-authored-by: rtobar --- deprecations/c-api-pending-removal-in-3.14.po | 65 +++++++++++++++++-- 1 file changed, 58 insertions(+), 7 deletions(-) diff --git a/deprecations/c-api-pending-removal-in-3.14.po b/deprecations/c-api-pending-removal-in-3.14.po index a78f57de03..8db17c276c 100644 --- a/deprecations/c-api-pending-removal-in-3.14.po +++ b/deprecations/c-api-pending-removal-in-3.14.po @@ -10,54 +10,68 @@ msgstr "" "Project-Id-Version: Python en Español 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language: es\n" +"PO-Revision-Date: 2025-06-01 20:43+0200\n" +"Last-Translator: Carlos Mena Pérez <@carlosm00>\n" "Language-Team: 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.5\n" #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:2 msgid "Pending Removal in Python 3.14" -msgstr "" +msgstr "Pendiente de eliminación en Python 3.14" #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:4 msgid "" "The ``ma_version_tag`` field in :c:type:`PyDictObject` for extension modules " "(:pep:`699`; :gh:`101193`)." msgstr "" +"El campo ``ma_version_tag`` en :c:type:`PyDictObject` para módulos de " +"extensión (:pep:`699`; :gh:`101193`)." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:7 msgid "" "Creating :c:data:`immutable types ` with mutable " "bases (:gh:`95388`)." msgstr "" +"Crear :c:data:`tipos inmutables ` con bases " +"mutables (:gh:`95388`)." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:10 msgid "" "Functions to configure Python's initialization, deprecated in Python 3.11:" msgstr "" +"Funciones para configurar la inicialización de Python, obsoletas en Python " +"3.11:" #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:12 msgid ":c:func:`!PySys_SetArgvEx()`: Set :c:member:`PyConfig.argv` instead." msgstr "" +":c:func:`!PySys_SetArgvEx()`: Establezca :c:member:`PyConfig.argv` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:14 msgid ":c:func:`!PySys_SetArgv()`: Set :c:member:`PyConfig.argv` instead." msgstr "" +":c:func:`!PySys_SetArgv()`: Establezca :c:member:`PyConfig.argv` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:16 msgid "" ":c:func:`!Py_SetProgramName()`: Set :c:member:`PyConfig.program_name` " "instead." msgstr "" +":c:func:`!Py_SetProgramName()`: Establezca :c:member:`PyConfig.program_name` " +"en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:18 msgid ":c:func:`!Py_SetPythonHome()`: Set :c:member:`PyConfig.home` instead." msgstr "" +":c:func:`!Py_SetPythonHome()`: Establezca :c:member:`PyConfig.home` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:21 #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:71 @@ -65,118 +79,155 @@ msgid "" "The :c:func:`Py_InitializeFromConfig` API should be used with :c:type:" "`PyConfig` instead." msgstr "" +"La API :c:func:`Py_InitializeFromConfig` debería utilizarse con :c:type:" +"`PyConfig` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:24 msgid "Global configuration variables:" -msgstr "" +msgstr "Variables de configuración global:" #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:26 msgid ":c:var:`Py_DebugFlag`: Use :c:member:`PyConfig.parser_debug` instead." msgstr "" +":c:var:`Py_DebugFlag`: Utilice :c:member:`PyConfig.parser_debug` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:28 msgid ":c:var:`Py_VerboseFlag`: Use :c:member:`PyConfig.verbose` instead." msgstr "" +":c:var:`Py_VerboseFlag`: Utilice :c:member:`PyConfig.verbose` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:30 msgid ":c:var:`Py_QuietFlag`: Use :c:member:`PyConfig.quiet` instead." -msgstr "" +msgstr ":c:var:`Py_QuietFlag`: Utilice :c:member:`PyConfig.quiet` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:32 msgid "" ":c:var:`Py_InteractiveFlag`: Use :c:member:`PyConfig.interactive` instead." msgstr "" +":c:var:`Py_InteractiveFlag`: Utilice :c:member:`PyConfig.interactive` en su " +"lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:34 msgid ":c:var:`Py_InspectFlag`: Use :c:member:`PyConfig.inspect` instead." msgstr "" +":c:var:`Py_InspectFlag`: Utilice :c:member:`PyConfig.inspect` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:36 msgid "" ":c:var:`Py_OptimizeFlag`: Use :c:member:`PyConfig.optimization_level` " "instead." msgstr "" +":c:var:`Py_OptimizeFlag`: Utilice :c:member:`PyConfig.optimization_level` en " +"su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:38 msgid ":c:var:`Py_NoSiteFlag`: Use :c:member:`PyConfig.site_import` instead." msgstr "" +":c:var:`Py_NoSiteFlag`: Utilice :c:member:`PyConfig.site_import` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:40 msgid "" ":c:var:`Py_BytesWarningFlag`: Use :c:member:`PyConfig.bytes_warning` instead." msgstr "" +":c:var:`Py_BytesWarningFlag`: Utilice :c:member:`PyConfig.bytes_warning` en " +"su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:42 msgid "" ":c:var:`Py_FrozenFlag`: Use :c:member:`PyConfig.pathconfig_warnings` instead." msgstr "" +":c:var:`Py_FrozenFlag`: Utilice :c:member:`PyConfig.pathconfig_warnings` en " +"su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:44 msgid "" ":c:var:`Py_IgnoreEnvironmentFlag`: Use :c:member:`PyConfig.use_environment` " "instead." msgstr "" +":c:var:`Py_IgnoreEnvironmentFlag`: Utilice :c:member:`PyConfig." +"use_environment` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:46 msgid "" ":c:var:`Py_DontWriteBytecodeFlag`: Use :c:member:`PyConfig.write_bytecode` " "instead." msgstr "" +":c:var:`Py_DontWriteBytecodeFlag`: Utilice :c:member:`PyConfig." +"write_bytecode` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:48 msgid "" ":c:var:`Py_NoUserSiteDirectory`: Use :c:member:`PyConfig." "user_site_directory` instead." msgstr "" +":c:var:`Py_NoUserSiteDirectory`: Utilice :c:member:`PyConfig." +"user_site_directory` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:50 msgid "" ":c:var:`Py_UnbufferedStdioFlag`: Use :c:member:`PyConfig.buffered_stdio` " "instead." msgstr "" +":c:var:`Py_UnbufferedStdioFlag`: Utilice :c:member:`PyConfig.buffered_stdio` " +"en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:52 msgid "" ":c:var:`Py_HashRandomizationFlag`: Use :c:member:`PyConfig.use_hash_seed` " "and :c:member:`PyConfig.hash_seed` instead." msgstr "" +":c:var:`Py_HashRandomizationFlag`: Utilice :c:member:`PyConfig." +"use_hash_seed` y :c:member:`PyConfig.hash_seed` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:55 msgid ":c:var:`Py_IsolatedFlag`: Use :c:member:`PyConfig.isolated` instead." msgstr "" +":c:var:`Py_IsolatedFlag`: Utilice :c:member:`PyConfig.isolated` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:57 msgid "" ":c:var:`Py_LegacyWindowsFSEncodingFlag`: Use :c:member:`PyPreConfig." "legacy_windows_fs_encoding` instead." msgstr "" +":c:var:`Py_LegacyWindowsFSEncodingFlag`: Utilice :c:member:`PyPreConfig." +"legacy_windows_fs_encoding` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:59 msgid "" ":c:var:`Py_LegacyWindowsStdioFlag`: Use :c:member:`PyConfig." "legacy_windows_stdio` instead." msgstr "" +":c:var:`Py_LegacyWindowsStdioFlag`: Utilice :c:member:`PyConfig." +"legacy_windows_stdio` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:61 msgid "" ":c:var:`!Py_FileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" +":c:var:`!Py_FileSystemDefaultEncoding`: Utilice :c:member:`PyConfig." +"filesystem_encoding` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:63 msgid "" ":c:var:`!Py_HasFileSystemDefaultEncoding`: Use :c:member:`PyConfig." "filesystem_encoding` instead." msgstr "" +":c:var:`!Py_HasFileSystemDefaultEncoding`: Utilice :c:member:`PyConfig." +"filesystem_encoding` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:65 msgid "" ":c:var:`!Py_FileSystemDefaultEncodeErrors`: Use :c:member:`PyConfig." "filesystem_errors` instead." msgstr "" +":c:var:`!Py_FileSystemDefaultEncodeErrors`: Utilice :c:member:`PyConfig." +"filesystem_errors` en su lugar." #: ../Doc/deprecations/c-api-pending-removal-in-3.14.rst:67 msgid "" ":c:var:`!Py_UTF8Mode`: Use :c:member:`PyPreConfig.utf8_mode` instead. (see :" "c:func:`Py_PreInitialize`)" msgstr "" +":c:var:`!Py_UTF8Mode`: Utilice :c:member:`PyPreConfig.utf8_mode` en su " +"lugar. (Consulte :c:func:`Py_PreInitialize`)" From 0a5cf8f2e720a38301f2ce41e22e0ee7f3ae85e2 Mon Sep 17 00:00:00 2001 From: Luis Gonzalez Date: Thu, 17 Jul 2025 11:29:09 -0500 Subject: [PATCH 04/40] primera de slice (#3401) closes #3262 --------- Co-authored-by: rtobar --- c-api/slice.po | 210 +++++++++++++++++------------------ dictionaries/c-api_slice.txt | 1 + 2 files changed, 102 insertions(+), 109 deletions(-) create mode 100644 dictionaries/c-api_slice.txt diff --git a/c-api/slice.po b/c-api/slice.po index 5c2f6fb8da..ce1caa9568 100644 --- a/c-api/slice.po +++ b/c-api/slice.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:05+0200\n" +"PO-Revision-Date: 2025-07-16 18:09-0500\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\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/slice.rst:6 msgid "Slice Objects" @@ -27,109 +28,103 @@ msgstr "Objetos rebanada (*slice*)" #: ../Doc/c-api/slice.rst:11 msgid "" -"The type object for slice objects. This is the same as :class:`slice` in " -"the Python layer." +"The type object for slice objects. This is the same as :class:`slice` in the Python " +"layer." msgstr "" -"El objeto tipo para objetos rebanadas. Esto es lo mismo que :class:`slice` " -"en la capa de Python." +"El objeto tipo para objetos rebanadas. Esto es lo mismo que :class:`slice` en la capa " +"de Python." #: ../Doc/c-api/slice.rst:17 msgid "" -"Return true if *ob* is a slice object; *ob* must not be ``NULL``. This " -"function always succeeds." +"Return true if *ob* is a slice object; *ob* must not be ``NULL``. This function " +"always succeeds." msgstr "" -"Retorna verdadero si *ob* es un objeto rebanada; *ob* no debe ser ``NULL``. " -"Esta función siempre finaliza con éxito." +"Retorna verdadero si *ob* es un objeto rebanada; *ob* no debe ser ``NULL``. Esta " +"función siempre funciona correctamente." #: ../Doc/c-api/slice.rst:23 -#, fuzzy msgid "" -"Return a new slice object with the given values. The *start*, *stop*, and " -"*step* parameters are used as the values of the slice object attributes of " -"the same names. Any of the values may be ``NULL``, in which case the " -"``None`` will be used for the corresponding attribute." +"Return a new slice object with the given values. The *start*, *stop*, and *step* " +"parameters are used as the values of the slice object attributes of the same names. " +"Any of the values may be ``NULL``, in which case the ``None`` will be used for the " +"corresponding attribute." msgstr "" -"Retorna un nuevo objeto rebanada con los valores dados. Los parámetros " -"*start*, *stop* y *step* se utilizan como los valores de los atributos del " -"objeto rebanada de los mismos nombres. Cualquiera de los valores puede ser " -"``NULL``, en cuyo caso se usará ``None`` para el atributo correspondiente. " -"Retorna ``NULL`` si no se puedo asignar el nuevo objeto." +"Retorna un nuevo objeto rebanada con los valores dados. Los parámetros *start*, " +"*stop* y *step* se utilizan como los valores de los atributos del objeto rebanada de " +"los mismos nombres. Cualquiera de los valores puede ser ``NULL``, en cuyo caso se " +"usará ``None`` para el atributo correspondiente." #: ../Doc/c-api/slice.rst:28 -msgid "" -"Return ``NULL`` with an exception set if the new object could not be " -"allocated." +msgid "Return ``NULL`` with an exception set if the new object could not be allocated." msgstr "" +"Retorna ``NULL`` con una excepción establecida si no se ha podido asignar el nuevo " +"objeto." #: ../Doc/c-api/slice.rst:34 msgid "" -"Retrieve the start, stop and step indices from the slice object *slice*, " -"assuming a sequence of length *length*. Treats indices greater than *length* " -"as errors." +"Retrieve the start, stop and step indices from the slice object *slice*, assuming a " +"sequence of length *length*. Treats indices greater than *length* as errors." msgstr "" -"Recupera los índices *start*, *stop* y *step* del objeto rebanada *slice*, " -"suponiendo una secuencia de longitud *length*. Trata los índices mayores que " -"*length* como errores." +"Recupera los índices *start*, *stop* y *step* del objeto rebanada *slice*, suponiendo " +"una secuencia de longitud *length*. Trata los índices mayores que *length* como " +"errores." #: ../Doc/c-api/slice.rst:38 msgid "" -"Returns ``0`` on success and ``-1`` on error with no exception set (unless " -"one of the indices was not ``None`` and failed to be converted to an " -"integer, in which case ``-1`` is returned with an exception set)." +"Returns ``0`` on success and ``-1`` on error with no exception set (unless one of the " +"indices was not ``None`` and failed to be converted to an integer, in which case " +"``-1`` is returned with an exception set)." msgstr "" -"Retorna ``0`` en caso de éxito y ``-1`` en caso de error sin excepción " -"establecida (a menos que uno de los índices no sea ``None`` y no se haya " -"convertido a un entero, en cuyo caso ``- 1`` se retorna con una excepción " -"establecida)." +"Retorna ``0`` en caso de éxito y ``-1`` en caso de error sin una excepción " +"establecida (a menos que uno de los índices no sea ``None`` y no se haya convertido a " +"un entero, en cuyo caso ``- 1`` se retorna con una excepción establecida)." #: ../Doc/c-api/slice.rst:42 msgid "You probably do not want to use this function." msgstr "Probablemente no quiera usar esta función." #: ../Doc/c-api/slice.rst:44 ../Doc/c-api/slice.rst:75 -msgid "" -"The parameter type for the *slice* parameter was ``PySliceObject*`` before." -msgstr "" -"El tipo de parámetro para el parámetro *slice* era ``PySliceObject*`` antes." +msgid "The parameter type for the *slice* parameter was ``PySliceObject*`` before." +msgstr "El tipo de parámetro para el parámetro *slice* era ``PySliceObject*`` antes." #: ../Doc/c-api/slice.rst:51 msgid "" -"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, " -"stop, and step indices from the slice object *slice* assuming a sequence of " -"length *length*, and store the length of the slice in *slicelength*. Out of " -"bounds indices are clipped in a manner consistent with the handling of " -"normal slices." -msgstr "" -"Reemplazo utilizable para :c:func:`PySlice_GetIndices`. Recupera los índices " -"de *start*, *stop*, y *step* del objeto rebanada *slice* asumiendo una " -"secuencia de longitud *length*, y almacena la longitud de la rebanada en " -"*slicelength*. Los índices fuera de los límites se recortan de manera " -"coherente con el manejo de sectores normales." +"Usable replacement for :c:func:`PySlice_GetIndices`. Retrieve the start, stop, and " +"step indices from the slice object *slice* assuming a sequence of length *length*, " +"and store the length of the slice in *slicelength*. Out of bounds indices are " +"clipped in a manner consistent with the handling of normal slices." +msgstr "" +"Reemplazo utilizable para :c:func:`PySlice_GetIndices`. Recupera los índices de " +"*start*, *stop*, y *step* del objeto rebanada *slice* asumiendo una secuencia de " +"longitud *length*, y almacena la longitud de la rebanada en *slicelength*. Los " +"índices fuera de los límites se recortan de manera coherente con el manejo de " +"sectores normales." #: ../Doc/c-api/slice.rst:57 -#, fuzzy msgid "Return ``0`` on success and ``-1`` on error with an exception set." msgstr "" -"Retorna ``0`` en caso de éxito y ``-1`` en caso de error con excepción " +"Retorna ``0`` en caso de éxito y ``-1`` en caso de error con una excepción " "establecida." #: ../Doc/c-api/slice.rst:60 msgid "" -"This function is considered not safe for resizable sequences. Its invocation " -"should be replaced by a combination of :c:func:`PySlice_Unpack` and :c:func:" -"`PySlice_AdjustIndices` where ::" +"This function is considered not safe for resizable sequences. Its invocation should " +"be replaced by a combination of :c:func:`PySlice_Unpack` " +"and :c:func:`PySlice_AdjustIndices` where ::" msgstr "" -"Esta función se considera no segura para secuencias redimensionables. Su " -"invocación debe ser reemplazada por una combinación de :c:func:" -"`PySlice_Unpack` y :c:func:`PySlice_AdjustIndices` donde::" +"Esta función se considera no segura para secuencias redimensionables. Su invocación " +"debe ser reemplazada por una combinación de :c:func:`PySlice_Unpack` " +"y :c:func:`PySlice_AdjustIndices` donde::" #: ../Doc/c-api/slice.rst:64 msgid "" -"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) " -"< 0) {\n" +"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) < 0) {\n" " // return error\n" "}" msgstr "" +"if (PySlice_GetIndicesEx(slice, length, &start, &stop, &step, &slicelength) < 0) {\n" +" // retorna un error\n" +"}" #: ../Doc/c-api/slice.rst:68 msgid "is replaced by ::" @@ -142,82 +137,79 @@ msgid "" "}\n" "slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" msgstr "" +"if (PySlice_Unpack(slice, &start, &stop, &step) < 0) {\n" +" // retorna un error\n" +"}\n" +"slicelength = PySlice_AdjustIndices(length, &start, &stop, step);" #: ../Doc/c-api/slice.rst:79 msgid "" -"If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` " -"and ``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" -"PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!" -"PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, " -"*stop* and *step* are evaluated more than once." -msgstr "" -"Si ``Py_LIMITED_API`` no se establece o establece el valor entre " -"``0x03050400`` y ``0x03060000`` (sin incluir) o ``0x03060100`` o un " -"superior :c:func:`!PySlice_GetIndicesEx` se implementa como un macro usando :" -"c:func:`! PySlice_Unpack` y :c:func:`!PySlice_AdjustIndices`. Los argumentos " -"*start*, *stop* y *step* se evalúan más de una vez." +"If ``Py_LIMITED_API`` is not set or set to the value between ``0x03050400`` and " +"``0x03060000`` (not including) or ``0x03060100`` or higher :c:func:`!" +"PySlice_GetIndicesEx` is implemented as a macro using :c:func:`!PySlice_Unpack` " +"and :c:func:`!PySlice_AdjustIndices`. Arguments *start*, *stop* and *step* are " +"evaluated more than once." +msgstr "" +"Si ``Py_LIMITED_API`` no se establece o se establece el valor entre ``0x03050400`` y " +"``0x03060000`` (sin incluir) o ``0x03060100`` o un superior :c:func:`!" +"PySlice_GetIndicesEx` se implementa como un macro usando :c:func:`! PySlice_Unpack` " +"y :c:func:`!PySlice_AdjustIndices`. Los argumentos *start*, *stop* y *step* se " +"evalúan más de una vez." #: ../Doc/c-api/slice.rst:86 msgid "" -"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or " -"between ``0x03060000`` and ``0x03060100`` (not including) :c:func:`!" -"PySlice_GetIndicesEx` is a deprecated function." +"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or between " +"``0x03060000`` and ``0x03060100`` (not including) :c:func:`!PySlice_GetIndicesEx` is " +"a deprecated function." msgstr "" -"Si ``Py_LIMITED_API`` se establece en un valor menor que ``0x03050400`` o " -"entre ``0x03060000`` y ``0x03060100`` (sin incluir) :c:func:`!" -"PySlice_GetIndicesEx` es una función obsoleta." +"Si ``Py_LIMITED_API`` se establece en un valor menor que ``0x03050400`` o entre " +"``0x03060000`` y ``0x03060100`` (sin incluir) :c:func:`!PySlice_GetIndicesEx` es una " +"función obsoleta." #: ../Doc/c-api/slice.rst:94 msgid "" -"Extract the start, stop and step data members from a slice object as C " -"integers. Silently reduce values larger than ``PY_SSIZE_T_MAX`` to " -"``PY_SSIZE_T_MAX``, silently boost the start and stop values less than " -"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values " -"less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``." -msgstr "" -"Extrae los miembros de datos *start*, *stop*, y *step* de un objeto rebanada " -"como enteros en C. Reduce silenciosamente los valores mayores que " -"``PY_SSIZE_T_MAX`` a ``PY_SSIZE_T_MAX``, aumenta silenciosamente los valores " -"*start* y *stop* inferiores a ``PY_SSIZE_T_MIN`` a ``PY_SSIZE_T_MIN``, y " -"silenciosamente aumenta los valores de *step* a menos de ``-PY_SSE`` a ``-" +"Extract the start, stop and step data members from a slice object as C integers. " +"Silently reduce values larger than ``PY_SSIZE_T_MAX`` to ``PY_SSIZE_T_MAX``, silently " +"boost the start and stop values less than ``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, " +"and silently boost the step values less than ``-PY_SSIZE_T_MAX`` to ``-" "PY_SSIZE_T_MAX``." +msgstr "" +"Extrae los miembros de datos *start*, *stop*, y *step* de un objeto rebanada como " +"enteros en C. Reduce silenciosamente los valores mayores que ``PY_SSIZE_T_MAX`` a " +"``PY_SSIZE_T_MAX``, aumenta silenciosamente los valores *start* y *stop* inferiores a " +"``PY_SSIZE_T_MIN`` a ``PY_SSIZE_T_MIN``, y silenciosamente aumenta los valores de " +"*step* a menos de ``-PY_SSE`` a ``-PY_SSIZE_T_MAX``." #: ../Doc/c-api/slice.rst:100 -#, fuzzy msgid "Return ``-1`` with an exception set on error, ``0`` on success." -msgstr "Retorna ``-1`` en caso de error, ``0`` en caso de éxito." +msgstr "" +"Retorna ``-1`` con una excepción establecida en caso de error, ``0`` en caso de éxito." #: ../Doc/c-api/slice.rst:107 msgid "" -"Adjust start/end slice indices assuming a sequence of the specified length. " -"Out of bounds indices are clipped in a manner consistent with the handling " -"of normal slices." +"Adjust start/end slice indices assuming a sequence of the specified length. Out of " +"bounds indices are clipped in a manner consistent with the handling of normal slices." msgstr "" -"Ajusta los índices de corte de inicio/fin asumiendo una secuencia de la " -"longitud especificada. Los índices fuera de los límites se recortan de " -"manera coherente con el manejo de sectores normales." +"Ajusta los índices de corte de inicio/fin asumiendo una secuencia de la longitud " +"especificada. Los índices fuera de los límites se recortan de manera coherente con el " +"manejo de sectores normales." #: ../Doc/c-api/slice.rst:111 -msgid "" -"Return the length of the slice. Always successful. Doesn't call Python " -"code." +msgid "Return the length of the slice. Always successful. Doesn't call Python code." msgstr "" -"Retorna la longitud de la rebanada. Siempre exitoso. No llama al código de " -"Python." +"Retorna la longitud de la rebanada. Siempre exitoso. No llama al código de Python." #: ../Doc/c-api/slice.rst:118 msgid "Ellipsis Object" msgstr "Objeto elipsis" #: ../Doc/c-api/slice.rst:123 -#, fuzzy msgid "" -"The Python ``Ellipsis`` object. This object has no methods. Like :c:data:" -"`Py_None`, it is an :term:`immortal` singleton object." +"The Python ``Ellipsis`` object. This object has no methods. Like :c:data:`Py_None`, " +"it is an :term:`immortal` singleton object." msgstr "" -"El objeto ``Elipsis`` de Python. Este objeto no tiene métodos. Al igual que :" -"c:data:`Py_None`, es un objeto singleton `inmortal `_." +"El objeto ``Ellipsis`` de Python. Este objeto no tiene métodos. Al igual " +"que :c:data:`Py_None`, es un objeto singleton :term:`immortal`." #: ../Doc/c-api/slice.rst:126 msgid ":c:data:`Py_Ellipsis` is immortal." diff --git a/dictionaries/c-api_slice.txt b/dictionaries/c-api_slice.txt new file mode 100644 index 0000000000..53bf17f379 --- /dev/null +++ b/dictionaries/c-api_slice.txt @@ -0,0 +1 @@ +slicelength \ No newline at end of file From 09a727236a5b79ce0765b7bb918c8bce280e939e Mon Sep 17 00:00:00 2001 From: Carlos Mena <50986837+carlosm00@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:58:45 +0200 Subject: [PATCH 05/40] =?UTF-8?q?Traducci=C3=B3n=20reference/toplevel=5Fco?= =?UTF-8?q?mponents.po=20(#3402)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #3285 --- reference/toplevel_components.po | 39 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/reference/toplevel_components.po b/reference/toplevel_components.po index 22f043bbf6..5822f5d639 100644 --- a/reference/toplevel_components.po +++ b/reference/toplevel_components.po @@ -11,15 +11,16 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2023-10-12 19:43+0200\n" -"PO-Revision-Date: 2020-10-18 16:24-0500\n" -"Last-Translator: \n" -"Language: es\n" +"PO-Revision-Date: 2025-07-20 16:40+0200\n" +"Last-Translator: Carlos Mena Pérez <@carlosm00>\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.13.0\n" +"X-Generator: Poedit 3.5\n" #: ../Doc/reference/toplevel_components.rst:6 msgid "Top-level components" @@ -159,60 +160,58 @@ msgstr "" #: ../Doc/reference/toplevel_components.rst:8 msgid "interpreter" -msgstr "" +msgstr "interpreter" #: ../Doc/reference/toplevel_components.rst:21 msgid "program" -msgstr "" +msgstr "program" #: ../Doc/reference/toplevel_components.rst:23 #: ../Doc/reference/toplevel_components.rst:39 msgid "module" -msgstr "" +msgstr "module" #: ../Doc/reference/toplevel_components.rst:23 msgid "sys" -msgstr "" +msgstr "sys" #: ../Doc/reference/toplevel_components.rst:23 #: ../Doc/reference/toplevel_components.rst:39 msgid "__main__" -msgstr "" +msgstr "__main__" #: ../Doc/reference/toplevel_components.rst:23 msgid "builtins" -msgstr "" +msgstr "builtins" #: ../Doc/reference/toplevel_components.rst:39 -#, fuzzy msgid "interactive mode" -msgstr "Entrada interactiva" +msgstr "interactive mode" #: ../Doc/reference/toplevel_components.rst:49 msgid "UNIX" -msgstr "" +msgstr "UNIX" #: ../Doc/reference/toplevel_components.rst:49 msgid "Windows" -msgstr "" +msgstr "Windows" #: ../Doc/reference/toplevel_components.rst:49 msgid "command line" -msgstr "" +msgstr "command line" #: ../Doc/reference/toplevel_components.rst:49 msgid "standard input" -msgstr "" +msgstr "standard input" #: ../Doc/reference/toplevel_components.rst:100 -#, fuzzy msgid "input" -msgstr "Entrada de archivo" +msgstr "input" #: ../Doc/reference/toplevel_components.rst:101 msgid "built-in function" -msgstr "" +msgstr "built-in function" #: ../Doc/reference/toplevel_components.rst:101 msgid "eval" -msgstr "" +msgstr "eval" From 34190d973d2eeb679f0571378c8fcf361a9c3c31 Mon Sep 17 00:00:00 2001 From: v1ckxy Date: Mon, 11 Aug 2025 11:11:36 +0200 Subject: [PATCH 06/40] =?UTF-8?q?Fixed=20misstranslated=20word=20(removal?= =?UTF-8?q?=20=3D=3D=20eliminaci=C3=B3n=20for=20ES-ES)=20(#3403)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "remoción" no se usa en Español. Eliminar sí. 🙃 --- library/2to3.po | 2 +- library/shutil.po | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/2to3.po b/library/2to3.po index 805d60e109..0d6d4e6542 100644 --- a/library/2to3.po +++ b/library/2to3.po @@ -741,7 +741,7 @@ msgid "" "Fixes code broken from the removal of some members in the :mod:`types` " "module." msgstr "" -"Corrige el código roto por la remoción de algunos miembros en el módulo :mod:" +"Corrige el código roto por la eliminación de algunos miembros en el módulo :mod:" "`types`." #: ../Doc/library/2to3.rst:432 diff --git a/library/shutil.po b/library/shutil.po index b37298b48e..5ae029f014 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -39,7 +39,7 @@ msgid "" msgstr "" "El módulo :mod:`shutil` ofrece varias operaciones de alto nivel en archivos " "y colecciones de archivos. En particular, provee funciones que dan soporte a " -"la copia y remoción de archivos. Para operaciones en archivos individuales, " +"la copia y eliminación de archivos. Para operaciones en archivos individuales, " "véase también el módulo :mod:`os`." #: ../Doc/library/shutil.rst:25 From fb4ae4e75ac573369f2c11aa8d9ed4dcd1f429b5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 14:11:44 +0800 Subject: [PATCH 07/40] Bump actions/checkout from 4 to 5 (#3404) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
Release notes

Sourced from actions/checkout's releases.

v5.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

Full Changelog: https://github.com/actions/checkout/compare/v4...v5.0.0

v4.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4...v4.3.0

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.2.0...v4.2.1

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

V5.0.0

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- .github/workflows/pr-comment.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7f375d29ff..2d328968dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: # Obtención del código - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: submodules: 'true' # Necesario para que tj-actions/changed-files se ejecute diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 41165bef7e..d394bc810d 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -14,7 +14,7 @@ jobs: any_changed: ${{ steps.changed-files.outputs.any_changed }} comment: ${{ steps.create-pr-comment.outputs.comment }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false @@ -25,7 +25,7 @@ jobs: cache: "pip" # checkout these files from the base branch to guarantee they haven't been # modified by the PR - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: path: base-branch sparse-checkout-cone-mode: false From 7615055e7b07afd5ab2852d72c560a696ba475d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:29:50 -0300 Subject: [PATCH 08/40] Bump actions/setup-python from 5 to 6 (#3406) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
Release notes

Sourced from actions/setup-python's releases.

v6.0.0

What's Changed

Breaking Changes

Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. See Release Notes

Enhancements:

Bug fixes:

Dependency updates:

New Contributors

Full Changelog: https://github.com/actions/setup-python/compare/v5...v6.0.0

v5.6.0

What's Changed

Full Changelog: https://github.com/actions/setup-python/compare/v5...v5.6.0

v5.5.0

What's Changed

Enhancements:

Bug fixes:

... (truncated)

Commits
  • e797f83 Upgrade to node 24 (#1164)
  • 3d1e2d2 Revert "Enhance cache-dependency-path handling to support files outside the w...
  • 65b0712 Clarify pythonLocation behavior for PyPy and GraalPy in environment variables...
  • 5b668cf Bump actions/checkout from 4 to 5 (#1181)
  • f62a0e2 Change missing cache directory error to warning (#1182)
  • 9322b3c Upgrade setuptools to 78.1.1 to fix path traversal vulnerability in PackageIn...
  • fbeb884 Bump form-data to fix critical vulnerabilities #182 & #183 (#1163)
  • 03bb615 Bump idna from 2.9 to 3.7 in /tests/data (#843)
  • 36da51d Add version parsing from Pipfile (#1067)
  • 3c6f142 update documentation (#1156)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- .github/workflows/pr-comment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d328968dc..346b0014d0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: # Instalación de dependencias - name: Preparar Python v3.13 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.13" cache: "pip" diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index d394bc810d..3491b1e972 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -19,7 +19,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - name: Preparar Python v3.13 - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.13" cache: "pip" From 28ade9d3c3365b5d840b9d895f15b09a6accabe6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:32:27 -0300 Subject: [PATCH 09/40] Bump actions/stale from 9 to 10 (#3405) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/stale](https://github.com/actions/stale) from 9 to 10.
Release notes

Sourced from actions/stale's releases.

v10.0.0

What's Changed

Breaking Changes

Enhancement

Dependency Upgrades

Documentation changes

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v9...v10.0.0

v9.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/stale/compare/v9...v9.1.0

Changelog

Sourced from actions/stale's changelog.

Changelog

[9.1.0]

What's Changed

[9.0.0]

Breaking Changes

  1. Action is now stateful: If the action ends because of operations-per-run then the next run will start from the first unprocessed issue skipping the issues processed during the previous run(s). The state is reset when all the issues are processed. This should be considered for scheduling workflow runs.
  2. Version 9 of this action updated the runtime to Node.js 20. All scripts are now run with Node.js 20 instead of Node.js 16 and are affected by any breaking changes between Node.js 16 and 20.

What Else Changed

  1. Performance optimization that removes unnecessary API calls by @​dsame in #1033; fixes #792
  2. Logs displaying current GitHub API rate limit by @​dsame in #1032; addresses #1029

For more information, please read the action documentation and its section about statefulness

[4.1.1]

In scope of this release we updated actions/core to 1.10.0 for v4 and fixed issues operation count.

[8.0.0]

:warning: This version contains breaking changes :warning:

[7.0.0]

:warning: Breaking change :warning:

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/stale&package-manager=github_actions&previous-version=9&new-version=10)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/stale.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index 8c32a55525..546c96f445 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -13,7 +13,7 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: stale-pr-label: 'needs decision' stale-issue-label: 'stale' From 630a61de795c81ecfab917cfc39b57793ae25975 Mon Sep 17 00:00:00 2001 From: "Erick G. Islas-Osuna" Date: Fri, 26 Sep 2025 10:48:10 -0600 Subject: [PATCH 10/40] =?UTF-8?q?Translate=20`c-api/list.po`=20?= =?UTF-8?q?=F0=9F=A4=96=20(#3414)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed missing msgstr entries for c-api/list.po and cleaned up duplicated translations: - List object type descriptions - PyTypeObject instance descriptions - List type checking functions - Removed duplicate translation entries Updated Last-Translator field and Po-Revision-Date. Closes #3261 --------- Co-authored-by: rtobar --- c-api/list.po | 83 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/c-api/list.po b/c-api/list.po index f5d813fb2d..aef1ef9d76 100644 --- a/c-api/list.po +++ b/c-api/list.po @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" "PO-Revision-Date: 2021-08-01 20:11+0200\n" -"Last-Translator: Cristián Maureira-Fredes \n" +"Last-Translator: Erick G. Islas-Osuna \n" "Language: es\n" "Language-Team: python-doc-es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -35,15 +35,15 @@ msgid "" "This instance of :c:type:`PyTypeObject` represents the Python list type. " "This is the same object as :class:`list` in the Python layer." msgstr "" -"Esta instancia de :c:type:`PyTypeObject` representa el tipo de lista de " -"Python. Este es el mismo objeto que :class:`list` en la capa de Python." +"Esta instancia de :c:type:`PyTypeObject` representa el tipo lista de Python. " +"Este es el mismo objeto que :class:`list` en la capa de Python." #: ../Doc/c-api/list.rst:24 msgid "" "Return true if *p* is a list object or an instance of a subtype of the list " "type. This function always succeeds." msgstr "" -"Retorna verdadero si *p* es un objeto de lista o una instancia de un subtipo " +"Retorna verdadero si *p* es un objeto lista o una instancia de un subtipo " "del tipo lista. Esta función siempre finaliza con éxito." #: ../Doc/c-api/list.rst:30 @@ -61,21 +61,22 @@ msgstr "" "caso de error." #: ../Doc/c-api/list.rst:40 -#, fuzzy msgid "" "If *len* is greater than zero, the returned list object's items are set to " -"``NULL``. Thus you cannot use abstract API functions such as :c:func:" -"`PySequence_SetItem` or expose the object to Python code before setting all " -"items to a real object with :c:func:`PyList_SetItem` or :c:func:" -"`PyList_SET_ITEM()`. The following APIs are safe APIs before the list is " -"fully initialized: :c:func:`PyList_SetItem()` and :c:func:" -"`PyList_SET_ITEM()`." +"``NULL``. Thus you cannot use abstract API functions such " +"as :c:func:`PySequence_SetItem` or expose the object to Python code before " +"setting all items to a real object with :c:func:`PyList_SetItem` " +"or :c:func:`PyList_SET_ITEM()`. The following APIs are safe APIs before the " +"list is fully initialized: :c:func:`PyList_SetItem()` " +"and :c:func:`PyList_SET_ITEM()`." msgstr "" "Si *len* es mayor que cero, los elementos del objeto de la lista retornada " "se establecen en ``NULL``. Por lo tanto, no puede utilizar funciones API " "abstractas como :c:func:`PySequence_SetItem` o exponer el objeto al código " -"Python antes de configurar todos los elementos en un objeto real con :c:func:" -"`PyList_SetItem`." +"Python antes de configurar todos los elementos en un objeto real " +"con :c:func:`PyList_SetItem` o :c:func:`PyList_SET_ITEM()`. Las siguientes " +"APIs son APIs seguras antes de que la lista esté completamente " +"inicializada: :c:func:`PyList_SetItem()` y :c:func:`PyList_SET_ITEM()`." #: ../Doc/c-api/list.rst:53 msgid "" @@ -86,12 +87,10 @@ msgstr "" "``len(list)`` en un objeto lista." #: ../Doc/c-api/list.rst:59 -#, fuzzy msgid "Similar to :c:func:`PyList_Size`, but without error checking." -msgstr "Forma macro de :c:func:`PyList_Size` sin comprobación de errores." +msgstr "Similar a :c:func:`PyList_Size`, pero sin comprobación de errores." #: ../Doc/c-api/list.rst:64 -#, fuzzy msgid "" "Return the object at position *index* in the list pointed to by *list*. The " "position must be non-negative; indexing from the end of the list is not " @@ -108,11 +107,12 @@ msgid "" "Like :c:func:`PyList_GetItemRef`, but returns a :term:`borrowed reference` " "instead of a :term:`strong reference`." msgstr "" +"Como :c:func:`PyList_GetItemRef`, pero retorna una :term:`referencia " +"prestada` en lugar de una :term:`referencia fuerte`." #: ../Doc/c-api/list.rst:80 -#, fuzzy msgid "Similar to :c:func:`PyList_GetItem`, but without error checking." -msgstr "Forma macro de :c:func:`PyList_GetItem` sin comprobación de errores." +msgstr "Similar a :c:func:`PyList_GetItem`, pero sin comprobación de errores." #: ../Doc/c-api/list.rst:85 msgid "" @@ -143,19 +143,25 @@ msgstr "" #: ../Doc/c-api/list.rst:100 msgid "" -"Bounds checking is performed as an assertion if Python is built in :ref:" -"`debug mode ` or :option:`with assertions <--with-assertions>`." +"Bounds checking is performed as an assertion if Python is built " +"in :ref:`debug mode ` or :option:`with assertions <--with-" +"assertions>`." msgstr "" +"La verificación de límites se realiza como una aserción si Python se compila " +"en :ref:`modo de depuración ` o :option:`con aserciones <--" +"with-assertions>`." #: ../Doc/c-api/list.rst:106 msgid "" -"This macro \"steals\" a reference to *item*, and, unlike :c:func:" -"`PyList_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in *list* at position *i* will be leaked." +"This macro \"steals\" a reference to *item*, and, " +"unlike :c:func:`PyList_SetItem`, does *not* discard a reference to any item " +"that is being replaced; any reference in *list* at position *i* will be " +"leaked." msgstr "" -"Este macro \"roba\" una referencia a *item* y, a diferencia de :c:func:" -"`PyList_SetItem`, *no descarta* una referencia a ningún elemento que se está " -"reemplazando; cualquier referencia en *list* en la posición *i* se filtrará." +"Este macro \"roba\" una referencia a *item* y, a diferencia " +"de :c:func:`PyList_SetItem`, *no descarta* una referencia a ningún elemento " +"que se está reemplazando; cualquier referencia en *list* en la posición *i* " +"se filtrará." #: ../Doc/c-api/list.rst:114 msgid "" @@ -209,12 +215,17 @@ msgid "" "``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` and " "analogous to ``list.extend(iterable)`` or ``list += iterable``." msgstr "" +"Extiende *list* con los contenidos de *iterable*. Esto es lo mismo que " +"``PyList_SetSlice(list, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, iterable)`` y " +"análogo a ``list.extend(iterable)`` o ``list += iterable``." #: ../Doc/c-api/list.rst:148 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" +"Lanza una excepción y retorna ``-1`` si *list* no es un " +"objeto :class:`list`. Retorna 0 en caso de éxito." #: ../Doc/c-api/list.rst:156 msgid "" @@ -222,12 +233,17 @@ msgid "" "0, PY_SSIZE_T_MAX, NULL)`` and analogous to ``list.clear()`` or ``del " "list[:]``." msgstr "" +"Elimina todos los elementos de *list*. Esto es lo mismo que " +"``PyList_SetSlice(list, 0, PY_SSIZE_T_MAX, NULL)`` y análogo a " +"``list.clear()`` o ``del list[:]``." #: ../Doc/c-api/list.rst:160 msgid "" "Raise an exception and return ``-1`` if *list* is not a :class:`list` " "object. Return 0 on success." msgstr "" +"Lanza una excepción y retorna ``-1`` si *list* no es un " +"objeto :class:`list`. Retorna 0 en caso de éxito." #: ../Doc/c-api/list.rst:168 msgid "" @@ -243,8 +259,8 @@ msgid "" "failure. This is the equivalent of ``list.reverse()``." msgstr "" "Invierte los elementos de la lista *list* en su lugar. Retorna ``0`` en caso " -"de éxito, ``-1`` en caso de error. Este es el equivalente de ``list." -"reverse()``." +"de éxito, ``-1`` en caso de error. Este es el equivalente de " +"``list.reverse()``." #: ../Doc/c-api/list.rst:182 msgid "" @@ -255,22 +271,21 @@ msgstr "" "equivalente a ``tuple(list)``." #: ../Doc/c-api/list.rst:8 -#, fuzzy msgid "object" -msgstr "Objetos lista" +msgstr "objeto" #: ../Doc/c-api/list.rst:8 msgid "list" -msgstr "" +msgstr "lista" #: ../Doc/c-api/list.rst:51 ../Doc/c-api/list.rst:180 msgid "built-in function" -msgstr "" +msgstr "función integrada" #: ../Doc/c-api/list.rst:51 msgid "len" -msgstr "" +msgstr "len" #: ../Doc/c-api/list.rst:180 msgid "tuple" -msgstr "" +msgstr "tupla" From 03e7b787ffee7f7d281895f22648d778ca4f5fad Mon Sep 17 00:00:00 2001 From: "Erick G. Islas-Osuna" Date: Sat, 4 Oct 2025 18:34:04 -0600 Subject: [PATCH 11/40] =?UTF-8?q?Translate=20`c-api/sys.po`=20=F0=9F=A4=96?= =?UTF-8?q?=20(#3408)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated header information for c-api/sys.po. File was largely translated already with only minor header updates needed. Updated Last-Translator field and Po-Revision-Date. Closes #3249 --- c-api/sys.po | 257 +++++++++++++++++++------------------ dictionaries/c-api_sys.txt | 2 + 2 files changed, 131 insertions(+), 128 deletions(-) create mode 100644 dictionaries/c-api_sys.txt diff --git a/c-api/sys.po b/c-api/sys.po index c6574e41a1..6f7d324c3c 100644 --- a/c-api/sys.po +++ b/c-api/sys.po @@ -11,8 +11,7 @@ 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: 2022-10-29 13:18-0500\n" -"Last-Translator: Rodrigo Tobar \n" +"Last-Translator: Erick G. Islas-Osuna \n" "Language: es\n" "Language-Team: python-doc-es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -26,24 +25,21 @@ msgid "Operating System Utilities" msgstr "Utilidades del sistema operativo" #: ../Doc/c-api/sys.rst:11 -#, fuzzy msgid "" -"Return the file system representation for *path*. If the object is a :class:" -"`str` or :class:`bytes` object, then a new :term:`strong reference` is " -"returned. If the object implements the :class:`os.PathLike` interface, then :" -"meth:`~os.PathLike.__fspath__` is returned as long as it is a :class:`str` " -"or :class:`bytes` object. Otherwise :exc:`TypeError` is raised and ``NULL`` " -"is returned." +"Return the file system representation for *path*. If the object is " +"a :class:`str` or :class:`bytes` object, then a new :term:`strong reference` " +"is returned. If the object implements the :class:`os.PathLike` interface, " +"then :meth:`~os.PathLike.__fspath__` is returned as long as it is " +"a :class:`str` or :class:`bytes` object. Otherwise :exc:`TypeError` is " +"raised and ``NULL`` is returned." msgstr "" "Retorna la representación del sistema de archivos para *path*. Si el objeto " -"es :class:`str` o :class:`bytes`, entonces su conteo de referencias se " -"incrementa. Si el objeto implementa la interfaz :class:`os.PathLike`, " -"entonces :meth:`~os.PathLike.__fspath__` se retorna siempre que sea un " -"objeto :class:`str` o :class:`bytes`. De lo contrario :exc:`TypeError` se " +"es :class:`str` o :class:`bytes`, entonces se retorna una nueva :term:`referencia fuerte`. " +"Si el objeto implementa la interfaz :class:`os.PathLike`, entonces :meth:`~os.PathLike.__fspath__` " +"se retorna siempre que sea un objeto :class:`str` o :class:`bytes`. De lo contrario :exc:`TypeError` se " "lanza y se retorna ``NULL``." #: ../Doc/c-api/sys.rst:24 -#, fuzzy msgid "" "Return true (nonzero) if the standard I/O file *fp* with name *filename* is " "deemed interactive. This is the case for files for which " @@ -54,14 +50,14 @@ msgid "" msgstr "" "Retorna verdadero (distinto de cero) si el archivo de E/S (*I/O*) estándar " "*fp* con nombre *filename* se considera interactivo. Este es el caso de los " -"archivos para los que ``isatty(fileno(fp))`` es verdadero. Si el indicador " -"global :c:data:`Py_InteractiveFlag` es verdadero, esta función también " -"retorna verdadero si el puntero *filename* es ``NULL`` o si el nombre es " -"igual a una de las cadenas de caracteres ``''`` o ``'???'``." +"archivos para los que ``isatty(fileno(fp))`` es verdadero. Si :c:member:`PyConfig.interactive` es " +"distinto de cero, esta función también retorna verdadero si el puntero *filename* es " +"``NULL`` o si el nombre es igual a una de las cadenas de caracteres ``''`` o " +"``'???'``." #: ../Doc/c-api/sys.rst:30 msgid "This function must not be called before Python is initialized." -msgstr "" +msgstr "Esta función no debe ser llamada antes de que Python sea inicializado." #: ../Doc/c-api/sys.rst:35 msgid "" @@ -71,9 +67,9 @@ msgid "" "defined." msgstr "" "Función para preparar algún estado interno antes de una bifurcación de " -"proceso (*process fork*). Esto debería llamarse antes de llamar a :c:func:" -"`fork` o cualquier función similar que clone el proceso actual. Solo " -"disponible en sistemas donde :c:func:`fork` está definido." +"proceso (*process fork*). Esto debería llamarse antes de llamar " +"a :c:func:`fork` o cualquier función similar que clone el proceso actual. " +"Solo disponible en sistemas donde :c:func:`fork` está definido." #: ../Doc/c-api/sys.rst:41 msgid "" @@ -94,8 +90,8 @@ msgid "" "defined." msgstr "" "Función para actualizar algún estado interno después de una bifurcación de " -"proceso. Se debe invocar desde el proceso principal después de llamar a :c:" -"func:`fork` o cualquier función similar que clone el proceso actual, " +"proceso. Se debe invocar desde el proceso principal después de llamar " +"a :c:func:`fork` o cualquier función similar que clone el proceso actual, " "independientemente de si la clonación del proceso fue exitosa. Solo " "disponible en sistemas donde :c:func:`fork` está definido." @@ -121,8 +117,8 @@ msgstr "" "bifurcación de proceso (*process fork*). Debe llamarse desde el proceso " "secundario después de llamar a :c:func:`fork`, o cualquier función similar " "que clone el proceso actual, si existe alguna posibilidad de que el proceso " -"vuelva a llamar al intérprete de Python. Solo disponible en sistemas donde :" -"c:func:`fork` está definido." +"vuelva a llamar al intérprete de Python. Solo disponible en sistemas " +"donde :c:func:`fork` está definido." #: ../Doc/c-api/sys.rst:75 msgid "" @@ -137,12 +133,13 @@ msgstr "" #: ../Doc/c-api/sys.rst:83 msgid "" ":func:`os.register_at_fork` allows registering custom Python functions to be " -"called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` and :" -"c:func:`PyOS_AfterFork_Child`." +"called by :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` " +"and :c:func:`PyOS_AfterFork_Child`." msgstr "" ":func:`os.register_at_fork` permite registrar funciones personalizadas de " -"Python a las que puede llamar :c:func:`PyOS_BeforeFork()`, :c:func:" -"`PyOS_AfterFork_Parent` y :c:func:`PyOS_AfterFork_Child`." +"Python a las que puede " +"llamar :c:func:`PyOS_BeforeFork()`, :c:func:`PyOS_AfterFork_Parent` " +"y :c:func:`PyOS_AfterFork_Child`." #: ../Doc/c-api/sys.rst:90 msgid "" @@ -161,7 +158,6 @@ msgid "This function is superseded by :c:func:`PyOS_AfterFork_Child()`." msgstr "Esta función es reemplazada por :c:func:`PyOS_AfterFork_Child()`." #: ../Doc/c-api/sys.rst:103 -#, fuzzy msgid "" "Return true when the interpreter runs out of stack space. This is a " "reliable check, but is only available when :c:macro:`!USE_STACKCHECK` is " @@ -171,51 +167,47 @@ msgid "" msgstr "" "Retorna verdadero cuando el intérprete se queda sin espacio de pila (*stack " "space*). Esta es una verificación confiable, pero solo está disponible " -"cuando :const:`USE_STACKCHECK` está definido (actualmente en algunas " -"versiones de Windows usando el compilador de *Microsoft Visual C++*). :const:" -"`USE_STACKCHECK` se definirá automáticamente; nunca debe cambiar la " -"definición en su propio código." +"cuando :c:macro:`!USE_STACKCHECK` está definido (actualmente en algunas " +"versiones de Windows usando el compilador de *Microsoft Visual C+" +"+*). :c:macro:`!USE_STACKCHECK` se definirá automáticamente; nunca debe cambiar " +"la definición en su propio código." #: ../Doc/c-api/sys.rst:115 -#, fuzzy msgid "" "Return the current signal handler for signal *i*. This is a thin wrapper " "around either :c:func:`!sigaction` or :c:func:`!signal`. Do not call those " "functions directly!" msgstr "" "Retorna el controlador de señal actual para la señal *i*. Esta es una " -"pequeña envoltura alrededor de :c:func:`sigaction` o :c:func:`signal`. ¡No " -"llame a esas funciones directamente! :c:type:`PyOS_sighandler_t` es un alias " -"*typedef* para :c:expr:`void (\\*)(int)`." +"pequeña envoltura alrededor de :c:func:`!sigaction` o :c:func:`!signal`. ¡No " +"llame a esas funciones directamente!" #: ../Doc/c-api/sys.rst:122 -#, fuzzy msgid "" "Set the signal handler for signal *i* to be *h*; return the old signal " -"handler. This is a thin wrapper around either :c:func:`!sigaction` or :c:" -"func:`!signal`. Do not call those functions directly!" +"handler. This is a thin wrapper around either :c:func:`!sigaction` " +"or :c:func:`!signal`. Do not call those functions directly!" msgstr "" "Configura el controlador de señal para la señal *i* como *h*; retorna el " -"antiguo controlador de señal. Esta es una pequeña envoltura alrededor de :c:" -"func:`sigaction` o :c:func:`signal`. ¡No llame a esas funciones " -"directamente! :c:type:`PyOS_sighandler_t` es un alias *typedef* para :c:expr:" -"`void (\\*)(int)`." +"antiguo controlador de señal. Esta es una pequeña envoltura alrededor " +"de :c:func:`!sigaction` o :c:func:`!signal`. ¡No llame a esas funciones " +"directamente!" #: ../Doc/c-api/sys.rst:129 msgid "" "This function should not be called directly: use the :c:type:`PyConfig` API " -"with the :c:func:`PyConfig_SetBytesString` function which ensures that :ref:" -"`Python is preinitialized `." +"with the :c:func:`PyConfig_SetBytesString` function which ensures " +"that :ref:`Python is preinitialized `." msgstr "" -"Esta función no debe llamarse directamente: utilice la API :c:type:" -"`PyConfig` con la función :c:func:`PyConfig_SetBytesString` que asegura que :" -"ref:`Python está preinicializado `." +"Esta función no debe llamarse directamente: utilice la " +"API :c:type:`PyConfig` con la función :c:func:`PyConfig_SetBytesString` que " +"asegura que :ref:`Python está preinicializado `." #: ../Doc/c-api/sys.rst:133 ../Doc/c-api/sys.rst:200 msgid "" "This function must not be called before :ref:`Python is preinitialized ` and so that the LC_CTYPE locale is properly configured: see the :c:" -"func:`Py_PreInitialize` function." +"preinit>` and so that the LC_CTYPE locale is properly configured: see " +"the :c:func:`Py_PreInitialize` function." msgstr "" "Esta función no debe llamarse antes de que :ref:`Python esté preinicializado " "` y para que la configuración local LC_CTYPE esté correctamente " @@ -240,9 +232,10 @@ msgstr "" #: ../Doc/c-api/sys.rst:144 msgid "" -"Return a pointer to a newly allocated wide character string, use :c:func:" -"`PyMem_RawFree` to free the memory. If size is not ``NULL``, write the " -"number of wide characters excluding the null character into ``*size``" +"Return a pointer to a newly allocated wide character string, " +"use :c:func:`PyMem_RawFree` to free the memory. If size is not ``NULL``, " +"write the number of wide characters excluding the null character into " +"``*size``" msgstr "" "Retorna un puntero a una cadena de caracteres anchos recientemente asignada, " "use :c:func:`PyMem_RawFree` para liberar la memoria. Si el tamaño no es " @@ -262,13 +255,14 @@ msgstr "" #: ../Doc/c-api/sys.rst:152 ../Doc/c-api/sys.rst:192 msgid "" -"The :term:`filesystem encoding and error handler` are selected by :c:func:" -"`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` and :c:member:" -"`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." +"The :term:`filesystem encoding and error handler` are selected " +"by :c:func:`PyConfig_Read`: see :c:member:`~PyConfig.filesystem_encoding` " +"and :c:member:`~PyConfig.filesystem_errors` members of :c:type:`PyConfig`." msgstr "" -"El :term:`filesystem encoding and error handler` son seleccionados por :c:" -"func:`PyConfig_Read`: ver :c:member:`~PyConfig.filesystem_encoding` y :c:" -"member:`~PyConfig.filesystem_errors` que pertenecen a :c:type:`PyConfig`." +"El :term:`filesystem encoding and error handler` son seleccionados " +"por :c:func:`PyConfig_Read`: ver :c:member:`~PyConfig.filesystem_encoding` " +"y :c:member:`~PyConfig.filesystem_errors` que pertenecen " +"a :c:type:`PyConfig`." #: ../Doc/c-api/sys.rst:156 msgid "" @@ -287,11 +281,11 @@ msgstr "" #: ../Doc/c-api/sys.rst:164 msgid "" -"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` and :c:func:" -"`PyUnicode_DecodeLocaleAndSize` functions." +"The :c:func:`PyUnicode_DecodeFSDefaultAndSize` " +"and :c:func:`PyUnicode_DecodeLocaleAndSize` functions." msgstr "" -"Las funciones :c:func:`PyUnicode_DecodeFSDefaultAndSize` y :c:func:" -"`PyUnicode_DecodeLocaleAndSize`." +"Las funciones :c:func:`PyUnicode_DecodeFSDefaultAndSize` " +"y :c:func:`PyUnicode_DecodeLocaleAndSize`." #: ../Doc/c-api/sys.rst:169 ../Doc/c-api/sys.rst:211 msgid "" @@ -302,13 +296,12 @@ msgstr "" "`." #: ../Doc/c-api/sys.rst:173 -#, fuzzy msgid "" -"The function now uses the UTF-8 encoding on Windows if :c:member:" -"`PyPreConfig.legacy_windows_fs_encoding` is zero;" +"The function now uses the UTF-8 encoding on Windows " +"if :c:member:`PyPreConfig.legacy_windows_fs_encoding` is zero;" msgstr "" -"La función ahora usa la codificación UTF-8 en Windows si :c:data:" -"`Py_LegacyWindowsFSEncodingFlag` es cero;" +"La función ahora usa la codificación UTF-8 en Windows " +"si :c:member:`PyPreConfig.legacy_windows_fs_encoding` es cero;" #: ../Doc/c-api/sys.rst:180 msgid "" @@ -318,8 +311,8 @@ msgid "" "converted to bytes 0x80..0xFF." msgstr "" "Codifica una cadena de caracteres amplios según el término :term:`filesystem " -"encoding and error handler`. Si el gestor de errores es :ref:" -"`surrogateescape error handler `, los caracteres " +"encoding and error handler`. Si el gestor de errores " +"es :ref:`surrogateescape error handler `, los caracteres " "sustituidos en el rango U+DC80..U+DCFF se convierten en bytes 0x80..0xFF." #: ../Doc/c-api/sys.rst:185 @@ -328,9 +321,9 @@ msgid "" "to free the memory. Return ``NULL`` on encoding error or memory allocation " "error." msgstr "" -"Retorna un puntero a una cadena de bytes recién asignada, usa :c:func:" -"`PyMem_Free` para liberar la memoria. Retorna ``NULL`` si se genera un error " -"de codificación o error de asignación de memoria." +"Retorna un puntero a una cadena de bytes recién asignada, " +"usa :c:func:`PyMem_Free` para liberar la memoria. Retorna ``NULL`` si se " +"genera un error de codificación o error de asignación de memoria." #: ../Doc/c-api/sys.rst:189 msgid "" @@ -354,17 +347,16 @@ msgid "" "The :c:func:`PyUnicode_EncodeFSDefault` and :c:func:`PyUnicode_EncodeLocale` " "functions." msgstr "" -"Las funciones :c:func:`PyUnicode_EncodeFSDefault` y :c:func:" -"`PyUnicode_EncodeLocale`." +"Las funciones :c:func:`PyUnicode_EncodeFSDefault` " +"y :c:func:`PyUnicode_EncodeLocale`." #: ../Doc/c-api/sys.rst:215 -#, fuzzy msgid "" -"The function now uses the UTF-8 encoding on Windows if :c:member:" -"`PyPreConfig.legacy_windows_fs_encoding` is zero." +"The function now uses the UTF-8 encoding on Windows " +"if :c:member:`PyPreConfig.legacy_windows_fs_encoding` is zero." msgstr "" -"La función ahora usa la codificación UTF-8 en Windows si :c:data:" -"`Py_LegacyWindowsFSEncodingFlag` es cero." +"La función ahora usa la codificación UTF-8 en Windows " +"si :c:member:`PyPreConfig.legacy_windows_fs_encoding` es cero." #: ../Doc/c-api/sys.rst:223 msgid "System Functions" @@ -377,10 +369,10 @@ msgid "" "thread's :mod:`sys` module's dict, which is contained in the internal thread " "state structure." msgstr "" -"Estas son funciones de utilidad que hacen que la funcionalidad del módulo :" -"mod:`sys` sea accesible para el código C. Todos funcionan con el diccionario " -"del módulo :mod:`sys` del subproceso actual del intérprete, que está " -"contenido en la estructura interna del estado del subproceso." +"Estas son funciones de utilidad que hacen que la funcionalidad del " +"módulo :mod:`sys` sea accesible para el código C. Todos funcionan con el " +"diccionario del módulo :mod:`sys` del subproceso actual del intérprete, que " +"está contenido en la estructura interna del estado del subproceso." #: ../Doc/c-api/sys.rst:231 msgid "" @@ -411,14 +403,15 @@ msgstr "" #: ../Doc/c-api/sys.rst:245 msgid "Clear :data:`sys.warnoptions` and :data:`!warnings.filters` instead." msgstr "" +"En su lugar, borra :data:`sys.warnoptions` y :data:`!warnings.filters`." #: ../Doc/c-api/sys.rst:250 msgid "" "Write the output string described by *format* to :data:`sys.stdout`. No " "exceptions are raised, even if truncation occurs (see below)." msgstr "" -"Escribe la cadena de caracteres de salida descrita por *format* en :data:" -"`sys.stdout`. No se lanzan excepciones, incluso si se produce el " +"Escribe la cadena de caracteres de salida descrita por *format* " +"en :data:`sys.stdout`. No se lanzan excepciones, incluso si se produce el " "truncamiento (ver más abajo)." #: ../Doc/c-api/sys.rst:253 @@ -459,12 +452,12 @@ msgstr "" #: ../Doc/c-api/sys.rst:271 msgid "" -"Function similar to PySys_WriteStdout() but format the message using :c:func:" -"`PyUnicode_FromFormatV` and don't truncate the message to an arbitrary " -"length." +"Function similar to PySys_WriteStdout() but format the message " +"using :c:func:`PyUnicode_FromFormatV` and don't truncate the message to an " +"arbitrary length." msgstr "" -"Función similar a ``PySys_WriteStdout()`` pero formatea el mensaje usando :c:" -"func:`PyUnicode_FromFormatV` y no trunca el mensaje a una longitud " +"Función similar a ``PySys_WriteStdout()`` pero formatea el mensaje " +"usando :c:func:`PyUnicode_FromFormatV` y no trunca el mensaje a una longitud " "arbitraria." #: ../Doc/c-api/sys.rst:279 @@ -477,12 +470,13 @@ msgstr "" #: ../Doc/c-api/sys.rst:286 msgid "" -"Return the current dictionary of :option:`-X` options, similarly to :data:" -"`sys._xoptions`. On error, ``NULL`` is returned and an exception is set." +"Return the current dictionary of :option:`-X` options, similarly " +"to :data:`sys._xoptions`. On error, ``NULL`` is returned and an exception " +"is set." msgstr "" -"Retorna el diccionario actual de opciones :option:`-X`, de manera similar a :" -"data:`sys._xoptions`. En caso de error, se retorna ``NULL`` y se establece " -"una excepción." +"Retorna el diccionario actual de opciones :option:`-X`, de manera similar " +"a :data:`sys._xoptions`. En caso de error, se retorna ``NULL`` y se " +"establece una excepción." #: ../Doc/c-api/sys.rst:295 msgid "" @@ -494,10 +488,9 @@ msgstr "" #: ../Doc/c-api/sys.rst:298 msgid "The *event* string argument must not be *NULL*." -msgstr "" +msgstr "El argumento de cadena *event* no debe ser *NULL*." #: ../Doc/c-api/sys.rst:300 -#, fuzzy msgid "" "If any hooks have been added, *format* and other arguments will be used to " "construct a tuple to pass. Apart from ``N``, the same format characters as " @@ -508,9 +501,7 @@ msgstr "" "construir una tupla para pasar. Además de ``N``, están disponibles los " "mismos caracteres de formato que los utilizados en :c:func:`Py_BuildValue`. " "Si el valor generado no es una tupla, se agregará a una tupla de un solo " -"elemento. (La opción de formato ``N`` consume una referencia, pero dado que " -"no hay forma de saber si se consumirán argumentos para esta función, su uso " -"puede causar fugas de referencia)." +"elemento." #: ../Doc/c-api/sys.rst:305 msgid "" @@ -518,14 +509,19 @@ msgid "" "there is no way to know whether arguments to this function will be consumed, " "using it may cause reference leaks." msgstr "" +"La opción de formato ``N`` no debe usarse. Consume una referencia, pero dado que " +"no hay forma de saber si los argumentos de esta función serán consumidos, " +"usarla puede causar fugas de referencia." #: ../Doc/c-api/sys.rst:309 msgid "" -"Note that ``#`` format characters should always be treated as :c:type:" -"`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was defined." +"Note that ``#`` format characters should always be treated " +"as :c:type:`Py_ssize_t`, regardless of whether ``PY_SSIZE_T_CLEAN`` was " +"defined." msgstr "" -"Tenga en cuenta que los caracteres de formato ``#`` deben tratarse como :c:" -"type:`Py_ssize_t`, independientemente de si se definió ``PY_SSIZE_T_CLEAN``." +"Tenga en cuenta que los caracteres de formato ``#`` deben tratarse " +"como :c:type:`Py_ssize_t`, independientemente de si se definió " +"``PY_SSIZE_T_CLEAN``." #: ../Doc/c-api/sys.rst:312 msgid ":func:`sys.audit` performs the same function from Python code." @@ -533,7 +529,7 @@ msgstr ":func:`sys.audit` realiza la misma función del código Python." #: ../Doc/c-api/sys.rst:314 msgid "See also :c:func:`PySys_AuditTuple`." -msgstr "" +msgstr "Ver también :c:func:`PySys_AuditTuple`." #: ../Doc/c-api/sys.rst:320 msgid "" @@ -548,6 +544,8 @@ msgid "" "Similar to :c:func:`PySys_Audit`, but pass arguments as a Python object. " "*args* must be a :class:`tuple`. To pass no arguments, *args* can be *NULL*." msgstr "" +"Similar a :c:func:`PySys_Audit`, pero pasa argumentos como un objeto Python. " +"*args* debe ser una :class:`tuple`. Para no pasar argumentos, *args* puede ser *NULL*." #: ../Doc/c-api/sys.rst:334 msgid "" @@ -576,8 +574,8 @@ msgstr "" msgid "" "This function is safe to call before :c:func:`Py_Initialize`. When called " "after runtime initialization, existing audit hooks are notified and may " -"silently abort the operation by raising an error subclassed from :class:" -"`Exception` (other errors will not be silenced)." +"silently abort the operation by raising an error subclassed " +"from :class:`Exception` (other errors will not be silenced)." msgstr "" "Es seguro llamar a esta función antes de :c:func:`Py_Initialize`. Cuando se " "llama después de la inicialización del tiempo de ejecución, se notifican los " @@ -590,6 +588,8 @@ msgid "" "The hook function is always called with the GIL held by the Python " "interpreter that raised the event." msgstr "" +"La función gancho siempre es llamada con el GIL mantenido por el " +"intérprete de Python que lanzó el evento." #: ../Doc/c-api/sys.rst:352 msgid "" @@ -603,7 +603,6 @@ msgstr "" "detalles se encuentran en la documentación de cada función." #: ../Doc/c-api/sys.rst:357 ../Doc/c-api/sys.rst:359 -#, fuzzy msgid "" "If the interpreter is initialized, this function raises an auditing event " "``sys.addaudithook`` with no arguments. If any existing hooks raise an " @@ -612,7 +611,7 @@ msgid "" "hook has been added unless they control all existing hooks." msgstr "" "Si el intérprete se inicializa, esta función lanza un evento de auditoría " -"``sys.addaudithook`` sin argumentos. Si algún enlace existente lanza una " +"``sys.addaudithook`` sin argumentos. Si algún gancho existente lanza una " "excepción derivada de :class:`Exception`, el nuevo gancho no se agregará y " "la excepción se borrará. Como resultado, las personas que llaman no pueden " "asumir que su gancho ha sido agregado a menos que controlen todos los " @@ -625,26 +624,29 @@ msgid "" "to be a :c:type:`PyTupleObject`. *userData* is the argument passed to " "PySys_AddAuditHook()." msgstr "" +"El tipo de la función gancho. *event* es el argumento de cadena C de evento pasado " +"a :c:func:`PySys_Audit` o :c:func:`PySys_AuditTuple`. Se garantiza que *args* " +"es un :c:type:`PyTupleObject`. *userData* es el argumento pasado a " +"PySys_AddAuditHook()." #: ../Doc/c-api/sys.rst:380 msgid "Process Control" msgstr "Control de procesos" #: ../Doc/c-api/sys.rst:387 -#, fuzzy msgid "" "Print a fatal error message and kill the process. No cleanup is performed. " "This function should only be invoked when a condition is detected that would " "make it dangerous to continue using the Python interpreter; e.g., when the " "object administration appears to be corrupted. On Unix, the standard C " -"library function :c:func:`!abort` is called which will attempt to produce a :" -"file:`core` file." +"library function :c:func:`!abort` is called which will attempt to produce " +"a :file:`core` file." msgstr "" "Imprime un mensaje de error fatal y elimina el proceso. No se realiza " "limpieza. Esta función solo debe invocarse cuando se detecta una condición " "que haría peligroso continuar usando el intérprete de Python; por ejemplo, " "cuando la administración del objeto parece estar dañada. En Unix, se llama a " -"la función de biblioteca C estándar :c:func:`abort` que intentará producir " +"la función de biblioteca C estándar :c:func:`!abort` que intentará producir " "un archivo :file:`core`." #: ../Doc/c-api/sys.rst:394 @@ -664,12 +666,13 @@ msgstr "Registra el nombre de la función automáticamente." #: ../Doc/c-api/sys.rst:408 msgid "" "Exit the current process. This calls :c:func:`Py_FinalizeEx` and then calls " -"the standard C library function ``exit(status)``. If :c:func:" -"`Py_FinalizeEx` indicates an error, the exit status is set to 120." +"the standard C library function ``exit(status)``. " +"If :c:func:`Py_FinalizeEx` indicates an error, the exit status is set to 120." msgstr "" "Sale del proceso actual. Esto llama :c:func:`Py_FinalizeEx` y luego llama a " -"la función estándar de la biblioteca C ``exit(status)``. Si :c:func:" -"`Py_FinalizeEx` indica un error, el estado de salida se establece en 120." +"la función estándar de la biblioteca C ``exit(status)``. " +"Si :c:func:`Py_FinalizeEx` indica un error, el estado de salida se establece " +"en 120." #: ../Doc/c-api/sys.rst:412 msgid "Errors from finalization no longer ignored." @@ -697,22 +700,20 @@ msgstr "" #: ../Doc/c-api/sys.rst:101 msgid "USE_STACKCHECK (C macro)" -msgstr "" +msgstr "USE_STACKCHECK (macro de C)" #: ../Doc/c-api/sys.rst:385 msgid "abort (C function)" -msgstr "" +msgstr "abort (función de C)" #: ../Doc/c-api/sys.rst:404 ../Doc/c-api/sys.rst:418 msgid "Py_FinalizeEx (C function)" -msgstr "" +msgstr "Py_FinalizeEx (función de C)" #: ../Doc/c-api/sys.rst:404 -#, fuzzy msgid "exit (C function)" -msgstr "Funciones del Sistema" +msgstr "exit (función C)" #: ../Doc/c-api/sys.rst:418 -#, fuzzy msgid "cleanup functions" -msgstr "Funciones del Sistema" +msgstr "funciones de limpieza" diff --git a/dictionaries/c-api_sys.txt b/dictionaries/c-api_sys.txt new file mode 100644 index 0000000000..ea922641ef --- /dev/null +++ b/dictionaries/c-api_sys.txt @@ -0,0 +1,2 @@ +abort +exit From 53312f23e7c6565bd6fbb6e23690b13c825d2f70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 5 Oct 2025 16:59:41 +0800 Subject: [PATCH 12/40] Bump tj-actions/changed-files from 46 to 47 (#3416) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 46 to 47.
Release notes

Sourced from tj-actions/changed-files's releases.

v47

Changes in v47.0.0

What's Changed

... (truncated)

Changelog

Sourced from tj-actions/changed-files's changelog.

Changelog

47.0.0 - (2025-09-13)

🚀 Features

➖ Remove

  • Commit and push step from build job (#2538) (be393a9) - (Tonye Jack)

🔄 Update

  • Updated README.md (#2592)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@​users.noreply.github.com> (3dbc1e1) - (github-actions[bot])

  • Updated README.md (#2591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@​users.noreply.github.com> (b1ccff8) - (github-actions[bot])

  • Updated README.md (#2574)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@​users.noreply.github.com> (050a3d3) - (github-actions[bot])

📚 Documentation

  • Update link to glob patterns (#2590) (a892f50) - (Tonye Jack)
  • Add Jellyfrog as a contributor for code, and doc (#2573) (f000a9b) - (allcontributors[bot])

🧪 Testing

  • Manual triggered workflows (#2637) (c2ca249) - (Tonye Jack)

⚙️ Miscellaneous Tasks

  • deps-dev: Bump jest from 30.0.5 to 30.1.3 (#2655) (9a67555) - (dependabot[bot])
  • deps: Bump tj-actions/git-cliff from 2.1.0 to 2.2.0 (#2660) (b67e30d) - (dependabot[bot])
  • deps: Bump github/codeql-action from 3.30.2 to 3.30.3 (#2661) (62aef42) - (dependabot[bot])
  • deps: Bump github/codeql-action from 3.29.11 to 3.30.2 (#2659) (e874f3c) - (dependabot[bot])
  • deps: Bump actions/setup-node from 4.4.0 to 5.0.0 (#2656) (8c14441) - (dependabot[bot])
  • deps-dev: Bump @​types/node from 24.3.0 to 24.3.1 (#2657) (e995ac4) - (dependabot[bot])
  • deps-dev: Bump @​types/node from 24.2.1 to 24.3.0 (#2649) (3b04099) - (dependabot[bot])
  • deps: Bump github/codeql-action from 3.29.9 to 3.29.11 (#2651) (e7b6c97) - (dependabot[bot])
  • deps: Bump tj-actions/git-cliff from 2.0.2 to 2.1.0 (#2648) (765d62b) - (dependabot[bot])
  • deps: Bump github/codeql-action from 3.29.8 to 3.29.9 (#2647) (2036da1) - (dependabot[bot])
  • deps: Bump github/codeql-action from 3.29.7 to 3.29.8 (#2644) (239aef8) - (dependabot[bot])
  • deps-dev: Bump @​types/node from 24.2.0 to 24.2.1 (#2645) (a7d5f5f) - (dependabot[bot])
  • deps: Bump actions/checkout from 4.2.2 to 5.0.0 (#2646) (5107f3a) - (dependabot[bot])
  • deps-dev: Bump @​types/node from 24.1.0 to 24.2.0 (#2640) (f963b3f) - (dependabot[bot])
  • deps: Bump actions/download-artifact from 4.3.0 to 5.0.0 (#2641) (f956744) - (dependabot[bot])

... (truncated)

Commits
  • 24d32ff upgrade: to node24 (#2662)
  • 9a67555 chore(deps-dev): bump jest from 30.0.5 to 30.1.3 (#2655)
  • b67e30d chore(deps): bump tj-actions/git-cliff from 2.1.0 to 2.2.0 (#2660)
  • 62aef42 chore(deps): bump github/codeql-action from 3.30.2 to 3.30.3 (#2661)
  • e874f3c chore(deps): bump github/codeql-action from 3.29.11 to 3.30.2 (#2659)
  • 8c14441 chore(deps): bump actions/setup-node from 4.4.0 to 5.0.0 (#2656)
  • e995ac4 chore(deps-dev): bump @​types/node from 24.3.0 to 24.3.1 (#2657)
  • 3b04099 chore(deps-dev): bump @​types/node from 24.2.1 to 24.3.0 (#2649)
  • e7b6c97 chore(deps): bump github/codeql-action from 3.29.9 to 3.29.11 (#2651)
  • 765d62b chore(deps): bump tj-actions/git-cliff from 2.0.2 to 2.1.0 (#2648)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tj-actions/changed-files&package-manager=github_actions&previous-version=46&new-version=47)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- .github/workflows/pr-comment.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 346b0014d0..18016efc2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -52,7 +52,7 @@ jobs: - name: Obtiene la lista de archivos .po con cambios (sólo en PRs) if: github.event_name == 'pull_request' id: changed-po-files - uses: tj-actions/changed-files@v46 + uses: tj-actions/changed-files@v47 with: files: | **/*.po diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 3491b1e972..9e0971c7c8 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -37,7 +37,7 @@ jobs: python -m pip install -r base-branch/requirements-own.txt - name: Obtiene lista de archivos con cambios id: changed-files - uses: tj-actions/changed-files@v46 + uses: tj-actions/changed-files@v47 with: files: | **/*.po From 51d0fe7c0752abac7aee2ded444f61b09569e41e Mon Sep 17 00:00:00 2001 From: "Erick G. Islas-Osuna" Date: Sun, 5 Oct 2025 03:08:24 -0600 Subject: [PATCH 13/40] =?UTF-8?q?Translate=20`c-api/function.po`=20?= =?UTF-8?q?=F0=9F=A4=96=20(#3411)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated header information for c-api/function.po. File was largely translated already with only minor header updates needed. Updated Last-Translator field and Po-Revision-Date. Closes #3251 --- c-api/function.po | 145 ++++++++++++++++++++------------ dictionaries/c-api_function.txt | 1 + 2 files changed, 94 insertions(+), 52 deletions(-) create mode 100644 dictionaries/c-api_function.txt diff --git a/c-api/function.po b/c-api/function.po index 8cc916bc04..be33ef241d 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -12,7 +12,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" "PO-Revision-Date: 2021-12-09 10:29+0800\n" -"Last-Translator: Rodrigo Tobar \n" +"Last-Translator: Erick G. Islas-Osuna \n" "Language: es\n" "Language-Team: python-doc-es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -36,22 +36,22 @@ msgstr "La estructura C utilizada para las funciones." #: ../Doc/c-api/function.rst:22 msgid "" "This is an instance of :c:type:`PyTypeObject` and represents the Python " -"function type. It is exposed to Python programmers as ``types." -"FunctionType``." +"function type. It is exposed to Python programmers as " +"``types.FunctionType``." msgstr "" "Esta es una instancia de :c:type:`PyTypeObject` y representa el tipo función " -"de Python. Está expuesto a los programadores de Python como ``types." -"FunctionType``." +"de Python. Está expuesto a los programadores de Python como " +"``types.FunctionType``." #: ../Doc/c-api/function.rst:28 msgid "" -"Return true if *o* is a function object (has type :c:data:" -"`PyFunction_Type`). The parameter must not be ``NULL``. This function " -"always succeeds." +"Return true if *o* is a function object (has " +"type :c:data:`PyFunction_Type`). The parameter must not be ``NULL``. This " +"function always succeeds." msgstr "" -"Retorna verdadero si *o* es un objeto función (tiene tipo :c:data:" -"`PyFunction_Type`). El parámetro no debe ser ``NULL``. Esta función siempre " -"finaliza con éxito." +"Retorna verdadero si *o* es un objeto función (tiene " +"tipo :c:data:`PyFunction_Type`). El parámetro no debe ser ``NULL``. Esta " +"función siempre finaliza con éxito." #: ../Doc/c-api/function.rst:34 msgid "" @@ -64,31 +64,32 @@ msgstr "" "la función." #: ../Doc/c-api/function.rst:37 -#, fuzzy msgid "" -"The function's docstring and name are retrieved from the code object. :attr:" -"`~function.__module__` is retrieved from *globals*. The argument defaults, " -"annotations and closure are set to ``NULL``. :attr:`~function.__qualname__` " -"is set to the same value as the code object's :attr:`~codeobject." -"co_qualname` field." +"The function's docstring and name are retrieved from the code " +"object. :attr:`~function.__module__` is retrieved from *globals*. The " +"argument defaults, annotations and closure are set to " +"``NULL``. :attr:`~function.__qualname__` is set to the same value as the " +"code object's :attr:`~codeobject.co_qualname` field." msgstr "" -"El docstring y el nombre de la función se obtiene del objeto código. " -"*__module__* se obtiene de *globals *. El argumento *defaults*, " -"*annotations* y *closure* se establecen en ``NULL``. *__qualname__* se " -"establece en el mismo valor que el nombre de la función." +"El docstring y el nombre de la función se obtienen del objeto " +"código. :attr:`~function.__module__` se obtiene de *globals*. Los argumentos " +"por defecto, anotaciones y clausura se establecen en " +"``NULL``. :attr:`~function.__qualname__` se establece en el mismo valor que " +"el campo :attr:`~codeobject.co_qualname` del objeto código." #: ../Doc/c-api/function.rst:46 -#, fuzzy msgid "" -"As :c:func:`PyFunction_New`, but also allows setting the function object's :" -"attr:`~function.__qualname__` attribute. *qualname* should be a unicode " -"object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute is set " -"to the same value as the code object's :attr:`~codeobject.co_qualname` field." +"As :c:func:`PyFunction_New`, but also allows setting the function " +"object's :attr:`~function.__qualname__` attribute. *qualname* should be a " +"unicode object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute " +"is set to the same value as the code " +"object's :attr:`~codeobject.co_qualname` field." msgstr "" -"Como :c:func:`PyFunction_New`, pero también permite configurar el atributo " -"``__qualname__`` del objeto función. *qualname* debe ser un objeto unicode o " -"``NULL``; si es ``NULL``, el atributo ``__qualname__`` se establece en el " -"mismo valor que su atributo ``__name__``." +"Como :c:func:`PyFunction_New`, pero también permite configurar el " +"atributo :attr:`~function.__qualname__` del objeto función. *qualname* debe " +"ser un objeto unicode o ``NULL``; si es ``NULL``, el atributo :attr:`!" +"__qualname__` se establece en el mismo valor que el " +"campo :attr:`~codeobject.co_qualname` del objeto código." #: ../Doc/c-api/function.rst:57 msgid "Return the code object associated with the function object *op*." @@ -99,24 +100,23 @@ msgid "Return the globals dictionary associated with the function object *op*." msgstr "Retorna el diccionario global asociado con el objeto función *op*." #: ../Doc/c-api/function.rst:67 -#, fuzzy msgid "" "Return a :term:`borrowed reference` to the :attr:`~function.__module__` " "attribute of the :ref:`function object ` *op*. It can be " "*NULL*." msgstr "" -"Retorna una referencia tomada (:term:`borrowed reference`) al atributo " -"*__module__* del objeto función *op*. Puede ser *NULL*." +"Retorna una :term:`referencia prestada` al " +"atributo :attr:`~function.__module__` del :ref:`objeto función ` *op*. Puede ser *NULL*." #: ../Doc/c-api/function.rst:71 -#, fuzzy msgid "" "This is normally a :class:`string ` containing the module name, but can " "be set to any other object by Python code." msgstr "" -"Éste es normalmente una cadena de caracteres que contiene el nombre del " -"módulo, pero se puede establecer en cualquier otro objeto mediante código " -"Python." +"Esto es normalmente una :class:`cadena de caracteres ` que contiene el " +"nombre del módulo, pero se puede establecer en cualquier otro objeto " +"mediante código Python." #: ../Doc/c-api/function.rst:77 msgid "" @@ -141,13 +141,15 @@ msgstr "Lanza :exc:`SystemError` y retorna ``-1`` en caso de error." #: ../Doc/c-api/function.rst:91 msgid "Set the vectorcall field of a given function object *func*." -msgstr "" +msgstr "Establece el campo vectorcall de un objeto función dado *func*." #: ../Doc/c-api/function.rst:93 msgid "" "Warning: extensions using this API must preserve the behavior of the " "unaltered (default) vectorcall function!" msgstr "" +"Advertencia: ¡las extensiones que usan esta API deben preservar el " +"comportamiento de la función vectorcall inalterada (por defecto)!" #: ../Doc/c-api/function.rst:100 msgid "" @@ -188,14 +190,22 @@ msgid "" "case of error (e.g. no more watcher IDs available), return ``-1`` and set an " "exception." msgstr "" +"Registra *callback* como un observador de función para el intérprete actual. " +"Retorna un ID que puede pasarse a :c:func:`PyFunction_ClearWatcher`. En caso " +"de error (por ejemplo, no hay más IDs de observador disponibles), retorna " +"``-1`` y establece una excepción." #: ../Doc/c-api/function.rst:138 msgid "" -"Clear watcher identified by *watcher_id* previously returned from :c:func:" -"`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on " -"success, or ``-1`` and set an exception on error (e.g. if the given " -"*watcher_id* was never registered.)" +"Clear watcher identified by *watcher_id* previously returned " +"from :c:func:`PyFunction_AddWatcher` for the current interpreter. Return " +"``0`` on success, or ``-1`` and set an exception on error (e.g. if the " +"given *watcher_id* was never registered.)" msgstr "" +"Limpia el observador identificado por *watcher_id* previamente retornado " +"de :c:func:`PyFunction_AddWatcher` para el intérprete actual. Retorna ``0`` " +"en caso de éxito, o ``-1`` y establece una excepción en caso de error (por " +"ejemplo, si el *watcher_id* dado nunca fue registrado)." #: ../Doc/c-api/function.rst:148 msgid "" @@ -204,24 +214,34 @@ msgid "" "``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" msgstr "" +"Enumeración de posibles eventos de observador de función: - " +"``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - " +"``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " +"``PyFunction_EVENT_MODIFY_KWDEFAULTS``" #: ../Doc/c-api/function.rst:160 msgid "Type of a function watcher callback function." -msgstr "" +msgstr "Tipo de una función callback de observador de función." #: ../Doc/c-api/function.rst:162 msgid "" "If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` " -"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:" -"`borrowed reference` to the new value that is about to be stored in *func* " -"for the attribute that is being modified." +"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold " +"a :term:`borrowed reference` to the new value that is about to be stored in " +"*func* for the attribute that is being modified." msgstr "" +"Si *event* es ``PyFunction_EVENT_CREATE`` o ``PyFunction_EVENT_DESTROY`` " +"entonces *new_value* será ``NULL``. De lo contrario, *new_value* mantendrá " +"una :term:`referencia prestada` al nuevo valor que está a punto de " +"almacenarse en *func* para el atributo que se está modificando." #: ../Doc/c-api/function.rst:167 msgid "" "The callback may inspect but must not modify *func*; doing so could have " "unpredictable effects, including infinite recursion." msgstr "" +"El callback puede inspeccionar pero no debe modificar *func*; hacerlo podría " +"tener efectos impredecibles, incluyendo recursión infinita." #: ../Doc/c-api/function.rst:170 msgid "" @@ -234,6 +254,15 @@ msgid "" "behavior depending on optimization decisions, it does not change the " "semantics of the Python code being executed." msgstr "" +"Si *event* es ``PyFunction_EVENT_CREATE``, entonces el callback se invoca " +"después de que `func` haya sido completamente inicializada. De lo contrario, " +"el callback se invoca antes de que tenga lugar la modificación a *func*, por " +"lo que el estado previo de *func* puede ser inspeccionado. Se permite al " +"tiempo de ejecución optimizar la creación de objetos función cuando sea " +"posible. En tales casos no se emitirá ningún evento. Aunque esto crea la " +"posibilidad de una diferencia observable del comportamiento del tiempo de " +"ejecución dependiendo de las decisiones de optimización, no cambia la " +"semántica del código Python que se está ejecutando." #: ../Doc/c-api/function.rst:179 msgid "" @@ -242,13 +271,21 @@ msgid "" "it from being freed at this time. When the resurrected object is destroyed " "later, any watcher callbacks active at that time will be called again." msgstr "" +"Si *event* es ``PyFunction_EVENT_DESTROY``, tomar una referencia en el " +"callback a la función a punto de ser destruida la resucitará, evitando que " +"sea liberada en este momento. Cuando el objeto resucitado sea destruido más " +"tarde, cualquier callback observador activo en ese momento será llamado de " +"nuevo." #: ../Doc/c-api/function.rst:184 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " -"will be printed as an unraisable exception using :c:func:" -"`PyErr_WriteUnraisable`. Otherwise it should return ``0``." +"will be printed as an unraisable exception " +"using :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" +"Si el callback establece una excepción, debe retornar ``-1``; esta excepción " +"se imprimirá como una excepción no lanzable " +"usando :c:func:`PyErr_WriteUnraisable`. De lo contrario debe retornar ``0``." #: ../Doc/c-api/function.rst:188 msgid "" @@ -258,16 +295,20 @@ msgid "" "exception unless it saves and clears the exception state first, and restores " "it before returning." msgstr "" +"Puede haber ya una excepción pendiente establecida al entrar al callback. En " +"este caso, el callback debe retornar ``0`` con la misma excepción aún " +"establecida. Esto significa que el callback no puede llamar a ninguna otra " +"API que pueda establecer una excepción a menos que guarde y borre el estado " +"de la excepción primero, y lo restaure antes de retornar." #: ../Doc/c-api/function.rst:8 msgid "object" -msgstr "" +msgstr "objeto" #: ../Doc/c-api/function.rst:8 -#, fuzzy msgid "function" -msgstr "Objetos función" +msgstr "función" #: ../Doc/c-api/function.rst:20 msgid "MethodType (in module types)" -msgstr "" +msgstr "MethodType (en module types)" diff --git a/dictionaries/c-api_function.txt b/dictionaries/c-api_function.txt new file mode 100644 index 0000000000..0e1b59889c --- /dev/null +++ b/dictionaries/c-api_function.txt @@ -0,0 +1 @@ +lanzable From c8f6871f80c2034eecdde56788ffe577cfd010f5 Mon Sep 17 00:00:00 2001 From: "Erick G. Islas-Osuna" Date: Sun, 5 Oct 2025 03:22:48 -0600 Subject: [PATCH 14/40] =?UTF-8?q?Translate=20`c-api/tuple.po`=20?= =?UTF-8?q?=F0=9F=A4=96=20(#3409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed missing msgstr entries for c-api/tuple.po: - Tuple object type descriptions - PyTypeObject instance descriptions - Tuple type checking functions Updated Last-Translator field and Po-Revision-Date. Closes #3256 --- c-api/tuple.po | 136 +++++++++++++++++++++++++------------------------ 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/c-api/tuple.po b/c-api/tuple.po index 2d17c26756..53caecd921 100644 --- a/c-api/tuple.po +++ b/c-api/tuple.po @@ -11,8 +11,7 @@ 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: 2022-10-29 23:58-0400\n" -"Last-Translator: Rodrigo Tobar \n" +"Last-Translator: Erick G. Islas-Osuna \n" "Language: es\n" "Language-Team: python-doc-es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" @@ -55,43 +54,42 @@ msgstr "" "subtipo del tipo tupla. Esta función siempre finaliza con éxito." #: ../Doc/c-api/tuple.rst:36 -#, fuzzy msgid "" "Return a new tuple object of size *len*, or ``NULL`` with an exception set " "on failure." msgstr "" -"Retorna un nuevo objeto tupla de tamaño *len* o ``NULL`` en caso de falla." +"Retorna un nuevo objeto tupla de tamaño *len*, o ``NULL`` con una excepción establecida " +"en caso de falla." #: ../Doc/c-api/tuple.rst:42 -#, fuzzy msgid "" "Return a new tuple object of size *n*, or ``NULL`` with an exception set on " "failure. The tuple values are initialized to the subsequent *n* C arguments " "pointing to Python objects. ``PyTuple_Pack(2, a, b)`` is equivalent to " "``Py_BuildValue(\"(OO)\", a, b)``." msgstr "" -"Retorna un nuevo objeto tupla de tamaño *n*, o ``NULL`` en caso de falla. " -"Los valores de tupla se inicializan en los argumentos C posteriores *n* que " -"apuntan a objetos de Python. ``PyTuple_Pack (2, a, b)`` es equivalente a " +"Retorna un nuevo objeto tupla de tamaño *n*, o ``NULL`` con una excepción establecida en " +"caso de falla. Los valores de tupla se inicializan con los siguientes *n* argumentos C " +"que apuntan a objetos de Python. ``PyTuple_Pack(2, a, b)`` es equivalente a " "``Py_BuildValue(\"(OO)\", a, b)``." #: ../Doc/c-api/tuple.rst:50 -#, fuzzy msgid "" "Take a pointer to a tuple object, and return the size of that tuple. On " "error, return ``-1`` and with an exception set." -msgstr "Toma un puntero a un objeto de tupla y retorna el tamaño de esa tupla." +msgstr "" +"Toma un puntero a un objeto tupla y retorna el tamaño de esa tupla. En caso " +"de error, retorna ``-1`` con una excepción establecida." #: ../Doc/c-api/tuple.rst:56 -#, fuzzy msgid "Like :c:func:`PyTuple_Size`, but without error checking." -msgstr "Como :c:func:`PyTuple_GetItem`, pero no verifica sus argumentos." +msgstr "Como :c:func:`PyTuple_Size`, pero sin verificación de errores." #: ../Doc/c-api/tuple.rst:61 msgid "" "Return the object at position *pos* in the tuple pointed to by *p*. If " -"*pos* is negative or out of bounds, return ``NULL`` and set an :exc:" -"`IndexError` exception." +"*pos* is negative or out of bounds, return ``NULL`` and set " +"an :exc:`IndexError` exception." msgstr "" "Retorna el objeto en la posición *pos* en la tupla señalada por *p*. Si " "*pos* es negativo o está fuera de los límites, retorna ``NULL`` y establece " @@ -101,9 +99,13 @@ msgstr "" msgid "" "The returned reference is borrowed from the tuple *p* (that is: it is only " "valid as long as you hold a reference to *p*). To get a :term:`strong " -"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` or :c:" -"func:`PySequence_GetItem`." +"reference`, use :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` " +"or :c:func:`PySequence_GetItem`." msgstr "" +"La referencia retornada es prestada de la tupla *p* (es decir: solo es " +"válida mientras mantengas una referencia a *p*). Para obtener una :term:`referencia " +"fuerte`, usa :c:func:`Py_NewRef(PyTuple_GetItem(...)) ` " +"o :c:func:`PySequence_GetItem`." #: ../Doc/c-api/tuple.rst:73 msgid "Like :c:func:`PyTuple_GetItem`, but does no checking of its arguments." @@ -114,16 +116,16 @@ msgid "" "Return the slice of the tuple pointed to by *p* between *low* and *high*, or " "``NULL`` with an exception set on failure." msgstr "" +"Retorna la rebanada de la tupla apuntada por *p* entre *low* y *high*, o " +"``NULL`` con una excepción establecida en caso de falla." #: ../Doc/c-api/tuple.rst:81 -#, fuzzy msgid "" "This is the equivalent of the Python expression ``p[low:high]``. Indexing " "from the end of the tuple is not supported." msgstr "" -"Retorna la porción de la tupla señalada por *p* entre *low* y *high*, o " -"``NULL`` en caso de falla. Este es el equivalente de la expresión de Python " -"``p[low:high]``. La indexación desde el final de la tupla no es compatible." +"Esto es equivalente a la expresión de Python ``p[low:high]``. La indexación " +"desde el final de la tupla no es compatible." #: ../Doc/c-api/tuple.rst:87 msgid "" @@ -154,20 +156,25 @@ msgstr "" #: ../Doc/c-api/tuple.rst:102 ../Doc/c-api/tuple.rst:217 #: ../Doc/c-api/tuple.rst:235 msgid "" -"Bounds checking is performed as an assertion if Python is built in :ref:" -"`debug mode ` or :option:`with assertions <--with-assertions>`." +"Bounds checking is performed as an assertion if Python is built " +"in :ref:`debug mode ` or :option:`with assertions <--with-" +"assertions>`." msgstr "" +"La comprobación de límites se realiza como una aserción si Python se " +"construye en :ref:`modo de depuración ` o :option:`con " +"aserciones <--with-assertions>`." #: ../Doc/c-api/tuple.rst:107 msgid "" -"This function \"steals\" a reference to *o*, and, unlike :c:func:" -"`PyTuple_SetItem`, does *not* discard a reference to any item that is being " -"replaced; any reference in the tuple at position *pos* will be leaked." +"This function \"steals\" a reference to *o*, and, " +"unlike :c:func:`PyTuple_SetItem`, does *not* discard a reference to any item " +"that is being replaced; any reference in the tuple at position *pos* will be " +"leaked." msgstr "" -"Esta función \"roba\" una referencia a *o* y, a diferencia de :c:func:" -"`PyTuple_SetItem`, *no* descarta una referencia a ningún elemento que se " -"está reemplazando; cualquier referencia en la tupla en la posición *pos* se " -"filtrará." +"Esta función \"roba\" una referencia a *o* y, a diferencia " +"de :c:func:`PyTuple_SetItem`, *no* descarta una referencia a ningún elemento " +"que se está reemplazando; cualquier referencia en la tupla en la posición " +"*pos* se filtrará." #: ../Doc/c-api/tuple.rst:115 msgid "" @@ -180,8 +187,8 @@ msgid "" "Client code should never assume that the resulting value of ``*p`` will be " "the same as before calling this function. If the object referenced by ``*p`` " "is replaced, the original ``*p`` is destroyed. On failure, returns ``-1`` " -"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` or :exc:" -"`SystemError`." +"and sets ``*p`` to ``NULL``, and raises :exc:`MemoryError` " +"or :exc:`SystemError`." msgstr "" "Se puede usar para cambiar el tamaño de una tupla. *newsize* será el nuevo " "tamaño de la tupla. Debido a que se *supone* que las tuplas son inmutables, " @@ -201,10 +208,10 @@ msgstr "Objetos de secuencia de estructura" #: ../Doc/c-api/tuple.rst:132 msgid "" -"Struct sequence objects are the C equivalent of :func:`~collections." -"namedtuple` objects, i.e. a sequence whose items can also be accessed " -"through attributes. To create a struct sequence, you first have to create a " -"specific struct sequence type." +"Struct sequence objects are the C equivalent " +"of :func:`~collections.namedtuple` objects, i.e. a sequence whose items can " +"also be accessed through attributes. To create a struct sequence, you first " +"have to create a specific struct sequence type." msgstr "" "Los objetos de secuencia de estructura son el equivalente en C de los " "objetos :func:`~collections.namedtuple`, es decir, una secuencia a cuyos " @@ -215,8 +222,8 @@ msgstr "" #: ../Doc/c-api/tuple.rst:139 msgid "" "Create a new struct sequence type from the data in *desc*, described below. " -"Instances of the resulting type can be created with :c:func:" -"`PyStructSequence_New`." +"Instances of the resulting type can be created " +"with :c:func:`PyStructSequence_New`." msgstr "" "Crea un nuevo tipo de secuencia de estructura a partir de los datos en " "*desc*, que se describen a continuación. Las instancias del tipo resultante " @@ -224,7 +231,7 @@ msgstr "" #: ../Doc/c-api/tuple.rst:142 ../Doc/c-api/tuple.rst:210 msgid "Return ``NULL`` with an exception set on failure." -msgstr "" +msgstr "Retorna ``NULL`` con una excepción establecida en caso de falla." #: ../Doc/c-api/tuple.rst:147 msgid "Initializes a struct sequence type *type* from *desc* in place." @@ -232,13 +239,12 @@ msgstr "" "Inicializa una secuencia de estructura tipo *type* desde *desc* en su lugar." #: ../Doc/c-api/tuple.rst:152 -#, fuzzy msgid "" "Like :c:func:`PyStructSequence_InitType`, but returns ``0`` on success and " "``-1`` with an exception set on failure." msgstr "" -"Lo mismo que ``PyStructSequence_InitType``, pero retorna ``0`` en caso de " -"éxito y ``-1`` en caso de error." +"Como :c:func:`PyStructSequence_InitType`, pero retorna ``0`` en caso de " +"éxito y ``-1`` con una excepción establecida en caso de falla." #: ../Doc/c-api/tuple.rst:160 msgid "Contains the meta information of a struct sequence type to create." @@ -267,21 +273,22 @@ msgstr "" #: ../Doc/c-api/tuple.rst:181 msgid "" "Describes a field of a struct sequence. As a struct sequence is modeled as a " -"tuple, all fields are typed as :c:expr:`PyObject*`. The index in the :c:" -"member:`~PyStructSequence_Desc.fields` array of the :c:type:" -"`PyStructSequence_Desc` determines which field of the struct sequence is " -"described." +"tuple, all fields are typed as :c:expr:`PyObject*`. The index in " +"the :c:member:`~PyStructSequence_Desc.fields` array of " +"the :c:type:`PyStructSequence_Desc` determines which field of the struct " +"sequence is described." msgstr "" "Describe un campo de una secuencia de estructura. Como una secuencia de " -"estructura se modela como una tupla, todos los campos se escriben como :c:" -"expr:`PyObject*`. El índice en el arreglo :c:member:`~PyStructSequence_Desc." -"fields` de :c:type:`PyStructSequence_Desc` determina qué campo de la " -"secuencia de estructura se describe." +"estructura se modela como una tupla, todos los campos se escriben " +"como :c:expr:`PyObject*`. El índice en el " +"arreglo :c:member:`~PyStructSequence_Desc.fields` " +"de :c:type:`PyStructSequence_Desc` determina qué campo de la secuencia de " +"estructura se describe." #: ../Doc/c-api/tuple.rst:189 msgid "" -"Name for the field or ``NULL`` to end the list of named fields, set to :c:" -"data:`PyStructSequence_UnnamedField` to leave unnamed." +"Name for the field or ``NULL`` to end the list of named fields, set " +"to :c:data:`PyStructSequence_UnnamedField` to leave unnamed." msgstr "" "Nombre para el campo o ``NULL`` para finalizar la lista de campos con " "nombre, establece en :c:data:`PyStructSequence_UnnamedField` para dejar sin " @@ -301,29 +308,26 @@ msgstr "El tipo se cambió de ``char *``." #: ../Doc/c-api/tuple.rst:207 msgid "" -"Creates an instance of *type*, which must have been created with :c:func:" -"`PyStructSequence_NewType`." +"Creates an instance of *type*, which must have been created " +"with :c:func:`PyStructSequence_NewType`." msgstr "" -"Crea una instancia de *type*, que debe haberse creado con :c:func:" -"`PyStructSequence_NewType`." +"Crea una instancia de *type*, que debe haberse creado " +"con :c:func:`PyStructSequence_NewType`." #: ../Doc/c-api/tuple.rst:215 -#, fuzzy msgid "" "Return the object at position *pos* in the struct sequence pointed to by *p*." msgstr "" "Retorna el objeto en la posición *pos* en la secuencia de estructura " -"apuntada por *p*. No se realiza la comprobación de límites." +"apuntada por *p*." #: ../Doc/c-api/tuple.rst:223 -#, fuzzy msgid "Alias to :c:func:`PyStructSequence_GetItem`." -msgstr "Macro equivalente de :c:func:`PyStructSequence_GetItem`." +msgstr "Alias de :c:func:`PyStructSequence_GetItem`." #: ../Doc/c-api/tuple.rst:225 -#, fuzzy msgid "Now implemented as an alias to :c:func:`PyStructSequence_GetItem`." -msgstr "Macro equivalente de :c:func:`PyStructSequence_GetItem`." +msgstr "Ahora implementado como un alias de :c:func:`PyStructSequence_GetItem`." #: ../Doc/c-api/tuple.rst:231 msgid "" @@ -340,19 +344,17 @@ msgid "This function \"steals\" a reference to *o*." msgstr "Esta función \"roba\" una referencia a *o*." #: ../Doc/c-api/tuple.rst:245 -#, fuzzy msgid "Alias to :c:func:`PyStructSequence_SetItem`." -msgstr "Macro equivalente de :c:func:`PyStructSequence_GetItem`." +msgstr "Alias de :c:func:`PyStructSequence_SetItem`." #: ../Doc/c-api/tuple.rst:247 -#, fuzzy msgid "Now implemented as an alias to :c:func:`PyStructSequence_SetItem`." -msgstr "Macro equivalente de :c:func:`PyStructSequence_GetItem`." +msgstr "Ahora implementado como un alias de :c:func:`PyStructSequence_SetItem`." #: ../Doc/c-api/tuple.rst:8 msgid "object" -msgstr "object" +msgstr "objeto" #: ../Doc/c-api/tuple.rst:8 msgid "tuple" -msgstr "tuple" +msgstr "tupla" From a918cce799db7627f0c3673332a348ebd2f7b305 Mon Sep 17 00:00:00 2001 From: Joseph Salgado <49181840+xooseph@users.noreply.github.com> Date: Sun, 12 Oct 2025 20:13:36 -0600 Subject: [PATCH 15/40] Translate `c-api/complex` (#3417) Closes #3248 --- c-api/complex.po | 85 ++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/c-api/complex.po b/c-api/complex.po index 08c7e38f6c..5dc96c0222 100644 --- a/c-api/complex.po +++ b/c-api/complex.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-12-09 10:18+0800\n" +"PO-Revision-Date: 2025-10-07 00:11-0600\n" "Last-Translator: Rodrigo Tobar \n" -"Language: es\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.7\n" #: ../Doc/c-api/complex.rst:6 msgid "Complex Number Objects" @@ -53,7 +54,6 @@ msgstr "" "desreferenciarlas a través de punteros. Esto es consistente en toda la API." #: ../Doc/c-api/complex.rst:26 -#, fuzzy msgid "" "The C structure which corresponds to the value portion of a Python complex " "number object. Most of the functions for dealing with complex number " @@ -63,11 +63,11 @@ msgstr "" "La estructura C que corresponde a la porción de valor de un objeto de número " "complejo de Python. La mayoría de las funciones para tratar con objetos de " "números complejos utilizan estructuras de este tipo como valores de entrada " -"o salida, según corresponda. Se define como::" +"o salida, según corresponda." #: ../Doc/c-api/complex.rst:33 msgid "The structure is defined as::" -msgstr "" +msgstr "La estructura se define como::" #: ../Doc/c-api/complex.rst:35 msgid "" @@ -76,6 +76,10 @@ msgid "" " double imag;\n" "} Py_complex;" msgstr "" +"typedef struct {\n" +" double real;\n" +" double imag;\n" +"} Py_complex;" #: ../Doc/c-api/complex.rst:43 msgid "" @@ -118,13 +122,12 @@ msgstr "" "C :c:type:`Py_complex`." #: ../Doc/c-api/complex.rst:70 -#, fuzzy msgid "" "If *divisor* is null, this method returns zero and sets :c:data:`errno` to :" "c:macro:`!EDOM`." msgstr "" "Si *divisor* es nulo, este método retorna cero y establece :c:data:`errno` " -"en :c:data:`EDOM`." +"en :c:macro:`!EDOM`." #: ../Doc/c-api/complex.rst:76 msgid "" @@ -135,13 +138,12 @@ msgstr "" "C :c:type:`Py_complex`." #: ../Doc/c-api/complex.rst:79 -#, fuzzy msgid "" "If *num* is null and *exp* is not a positive real number, this method " "returns zero and sets :c:data:`errno` to :c:macro:`!EDOM`." msgstr "" "Si *num* es nulo y *exp* no es un número real positivo, este método retorna " -"cero y establece :c:data:`errno` a :c:data:`EDOM`." +"cero y establece :c:data:`errno` a :c:macro:`!EDOM`." #: ../Doc/c-api/complex.rst:84 msgid "Complex Numbers as Python Objects" @@ -182,28 +184,27 @@ msgstr "" "éxito." #: ../Doc/c-api/complex.rst:112 -#, fuzzy msgid "" "Create a new Python complex number object from a C :c:type:`Py_complex` " "value. Return ``NULL`` with an exception set on error." msgstr "" "Crea un nuevo objeto de número complejo de Python a partir de un valor C :c:" -"type:`Py_complex`." +"type:`Py_complex`. Retorna ``NULL`` con una excepción establecida en caso de " +"error." #: ../Doc/c-api/complex.rst:118 -#, fuzzy msgid "" "Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " "``NULL`` with an exception set on error." -msgstr "Retorna un nuevo objeto :c:type:`PyComplexObject` de *real* e *imag*." +msgstr "" +"Retorna un nuevo objeto :c:type:`PyComplexObject` de *real* e *imag*. " +"Retorna ``NULL`` con una excepción establecida en caso de error." #: ../Doc/c-api/complex.rst:124 -#, fuzzy msgid "Return the real part of *op* as a C :c:expr:`double`." -msgstr "Retorna la parte real de *op* como :c:type:`double` en C." +msgstr "Retorna la parte real de *op* como :c:expr:`double` en C." #: ../Doc/c-api/complex.rst:126 -#, fuzzy msgid "" "If *op* is not a Python complex number object but has a :meth:`~object." "__complex__` method, this method will first be called to convert *op* to a " @@ -211,30 +212,29 @@ msgid "" "it falls back to call :c:func:`PyFloat_AsDouble` and returns its result." msgstr "" "Si *op* no es un objeto de número complejo de Python pero tiene un método :" -"meth:`__complex__`, primero se llamará a este método para convertir *op* en " -"un objeto de número complejo de Python. Si ``__complex__()`` no está " -"definido, vuelve a :meth:`__float__`. Si ``__float__()`` no está definido, " -"entonces recurre a :meth:`__index__`. En caso de falla, este método retorna " -"``-1.0`` como un valor real." +"meth:`~object.__complex__`, primero se llamará a este método para convertir " +"*op* en un objeto de número complejo de Python. Si :meth:`!__complex__` no " +"está definido, entonces recurre a :c:func:`PyFloat_AsDouble` y retorna su " +"resultado." #: ../Doc/c-api/complex.rst:132 ../Doc/c-api/complex.rst:148 msgid "" "Upon failure, this method returns ``-1.0`` with an exception set, so one " "should call :c:func:`PyErr_Occurred` to check for errors." msgstr "" +"En caso de falla, este método retorna ``-1.0`` con una excepción " +"establecida, por lo que se debe llamar :c:func:`PyErr_Occurred` para " +"verificar si hay errores." #: ../Doc/c-api/complex.rst:135 ../Doc/c-api/complex.rst:151 -#, fuzzy msgid "Use :meth:`~object.__complex__` if available." -msgstr "Use :meth:`__index__` si está disponible." +msgstr "Use :meth:`~object.__complex__` si está disponible." #: ../Doc/c-api/complex.rst:140 -#, fuzzy msgid "Return the imaginary part of *op* as a C :c:expr:`double`." -msgstr "Retorna la parte imaginaria de *op* como un :c:type:`double` de C." +msgstr "Retorna la parte imaginaria de *op* como un :c:expr:`double` de C." #: ../Doc/c-api/complex.rst:142 -#, fuzzy msgid "" "If *op* is not a Python complex number object but has a :meth:`~object." "__complex__` method, this method will first be called to convert *op* to a " @@ -243,18 +243,16 @@ msgid "" "success." msgstr "" "Si *op* no es un objeto de número complejo de Python pero tiene un método :" -"meth:`__complex__`, primero se llamará a este método para convertir *op* en " -"un objeto de número complejo de Python. Si ``__complex__()`` no está " -"definido, vuelve a :meth:`__float__`. Si ``__float__()`` no está definido, " -"entonces recurre a :meth:`__index__`. En caso de falla, este método retorna " -"``-1.0`` como un valor real." +"meth:`~object.__complex__`, primero se llamará a este método para convertir " +"*op* en un objeto de número complejo de Python. Si :meth:`!__complex__` no " +"está definido, entonces recurre a :c:func:`PyFloat_AsDouble` y retorna " +"``0.0`` en caso de éxito." #: ../Doc/c-api/complex.rst:156 msgid "Return the :c:type:`Py_complex` value of the complex number *op*." msgstr "Retorna el valor :c:type:`Py_complex` del número complejo *op*." #: ../Doc/c-api/complex.rst:158 -#, fuzzy msgid "" "If *op* is not a Python complex number object but has a :meth:`~object." "__complex__` method, this method will first be called to convert *op* to a " @@ -263,11 +261,10 @@ msgid "" "defined then it falls back to :meth:`~object.__index__`." msgstr "" "Si *op* no es un objeto de número complejo de Python pero tiene un método :" -"meth:`__complex__`, primero se llamará a este método para convertir *op* en " -"un objeto de número complejo de Python. Si ``__complex__()`` no está " -"definido, vuelve a :meth:`__float__`. Si ``__float__()`` no está definido, " -"entonces recurre a :meth:`__index__`. En caso de falla, este método retorna " -"``-1.0`` como un valor real." +"meth:`~object.__complex__`, primero se llamará a este método para convertir " +"*op* en un objeto de número complejo de Python. Si :meth:`!__complex__` no " +"está definido, entonces recurre a :meth:`~object.__float__`. Si :meth:`!" +"__float__` no está definido, entonces recurre a :meth:`~object.__index__`." #: ../Doc/c-api/complex.rst:164 msgid "" @@ -275,17 +272,19 @@ msgid "" "`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should " "call :c:func:`PyErr_Occurred` to check for errors." msgstr "" +"En caso de falla, este método retorna :c:type:`Py_complex` con :c:member:" +"`~Py_complex.real` establecido en ``-1.0`` y con una excepción establecida, " +"por lo que se debe llamar a :c:func:`PyErr_Occurred` para verificar si hay " +"errores." #: ../Doc/c-api/complex.rst:168 -#, fuzzy msgid "Use :meth:`~object.__index__` if available." -msgstr "Use :meth:`__index__` si está disponible." +msgstr "Use :meth:`~object.__index__` si está disponible." #: ../Doc/c-api/complex.rst:8 msgid "object" -msgstr "" +msgstr "object" #: ../Doc/c-api/complex.rst:8 -#, fuzzy msgid "complex number" -msgstr "Objetos de números complejos" +msgstr "complex number" From eda657fe30e8ecb6e9545ec8b0b08ba8c1132e7f Mon Sep 17 00:00:00 2001 From: Joseph Salgado <49181840+xooseph@users.noreply.github.com> Date: Sun, 12 Oct 2025 23:45:47 -0600 Subject: [PATCH 16/40] Translate `c-api/gcsupport` (#3418) Closes #3247 --------- Co-authored-by: rtobar --- c-api/gcsupport.po | 94 +++++++++++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 35 deletions(-) diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index dc2b6536ef..0e2615e57a 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.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-10-26 08:09+0200\n" +"PO-Revision-Date: 2025-10-07 00:51-0600\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\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.7\n" #: ../Doc/c-api/gcsupport.rst:6 msgid "Supporting Cyclic Garbage Collection" @@ -42,7 +43,6 @@ msgstr "" "proporcionar ningún soporte explícito para la recolección de basura." #: ../Doc/c-api/gcsupport.rst:15 -#, fuzzy msgid "" "To create a container type, the :c:member:`~PyTypeObject.tp_flags` field of " "the type object must include the :c:macro:`Py_TPFLAGS_HAVE_GC` and provide " @@ -51,14 +51,14 @@ msgid "" "implementation must also be provided." msgstr "" "Para crear un tipo de contenedor, el campo :c:member:`~PyTypeObject." -"tp_flags` del objeto tipo debe incluir :const:`Py_TPFLAGS_HAVE_GC` y " +"tp_flags` del objeto tipo debe incluir :c:macro:`Py_TPFLAGS_HAVE_GC` y " "proporcionar una implementación del manejador :c:member:`~PyTypeObject." -"tp_traverse` . Si las instancias del tipo son mutables, también se debe " +"tp_traverse`. Si las instancias del tipo son mutables, también se debe " "proporcionar una implementación a :c:member:`~PyTypeObject.tp_clear`." #: ../Doc/c-api/gcsupport.rst:24 msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" -msgstr "" +msgstr ":c:macro:`Py_TPFLAGS_HAVE_GC`" #: ../Doc/c-api/gcsupport.rst:22 msgid "" @@ -76,13 +76,12 @@ msgstr "" "Los constructores para tipos de contenedores deben cumplir con dos reglas:" #: ../Doc/c-api/gcsupport.rst:28 -#, fuzzy msgid "" "The memory for the object must be allocated using :c:macro:`PyObject_GC_New` " "or :c:macro:`PyObject_GC_NewVar`." msgstr "" -"La memoria para el objeto debe asignarse usando :c:func:`PyObject_GC_New` o :" -"c:func:`PyObject_GC_NewVar`." +"La memoria para el objeto debe asignarse usando :c:macro:`PyObject_GC_New` " +"o :c:macro:`PyObject_GC_NewVar`." #: ../Doc/c-api/gcsupport.rst:31 msgid "" @@ -126,7 +125,6 @@ msgstr "" "de su subclase o subclases." #: ../Doc/c-api/gcsupport.rst:47 -#, fuzzy msgid "" "When calling :c:func:`PyType_Ready` or some of the APIs that indirectly call " "it like :c:func:`PyType_FromSpecWithBases` or :c:func:`PyType_FromSpec` the " @@ -140,27 +138,25 @@ msgstr "" "lo llaman como :c:func:`PyType_FromSpecWithBases` o :c:func:" "`PyType_FromSpec` el intérprete automáticamente llenara los campos :c:member:" "`~PyTypeObject.tp_flags`, :c:member:`~PyTypeObject.tp_traverse` y :c:member:" -"`~PyTypeObject.tp_clear` si el tipo si el tipo hereda de una clase que " -"implementa el protocolo del recolector de basura y la clase secundaria *no* " -"incluye el *flag* :const:`Py_TPFLAGS_HAVE_GC`." +"`~PyTypeObject.tp_clear` si el tipo hereda de una clase que implementa el " +"protocolo del recolector de basura y la clase secundaria *no* incluye el " +"*flag* :c:macro:`Py_TPFLAGS_HAVE_GC`." #: ../Doc/c-api/gcsupport.rst:57 -#, fuzzy msgid "" "Analogous to :c:macro:`PyObject_New` but for container objects with the :c:" "macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -"Análogo a :c:func:`PyObject_New` pero para objetos de contenedor con el " -"*flag* :const:`Py_TPFLAGS_HAVE_GC` establecido." +"Análogo a :c:macro:`PyObject_New` pero para objetos de contenedor con el " +"*flag* :c:macro:`Py_TPFLAGS_HAVE_GC` establecido." #: ../Doc/c-api/gcsupport.rst:62 -#, fuzzy msgid "" "Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" "c:macro:`Py_TPFLAGS_HAVE_GC` flag set." msgstr "" -"Análogo a :c:func:`PyObject_NewVar` pero para objetos de contenedor con el " -"*flag* :const:`Py_TPFLAGS_HAVE_GC` establecido." +"Análogo a :c:macro:`PyObject_NewVar` pero para objetos de contenedor con el " +"*flag* :c:macro:`Py_TPFLAGS_HAVE_GC` establecido." #: ../Doc/c-api/gcsupport.rst:67 msgid "" @@ -169,12 +165,18 @@ msgid "" "The allocated memory is initialized to zeros, except for the :c:type:`Python " "object header `." msgstr "" +"Análogo a :c:macro:`PyObject_GC_New` pero asigna *extra_size* bytes al " +"final del objeto (en el desplazamiento :c:member:`~PyTypeObject." +"tp_basicsize`). La memoria asignada se inicializa a ceros, excepto para el :" +"c:type:`encabezado del objeto Python `." #: ../Doc/c-api/gcsupport.rst:73 msgid "" "The extra data will be deallocated with the object, but otherwise it is not " "managed by Python." msgstr "" +"Los datos extras se desasignarán con el objeto, pero por lo demás no se " +"gestionan por Python." #: ../Doc/c-api/gcsupport.rst:77 msgid "" @@ -183,23 +185,28 @@ msgid "" "number of fields, prefer using :c:type:`PyVarObject` and :c:member:" "`~PyTypeObject.tp_itemsize` instead." msgstr "" +"La función está marcada como inestable porque aún no se ha decidido el " +"mecanismo final para reservar datos extra después de una instancia. Para " +"asignar un número variable de campos, se recomienda usar en su lugar :c:type:" +"`PyVarObject` y :c:member:`~PyTypeObject.tp_itemsize`." #: ../Doc/c-api/gcsupport.rst:88 -#, fuzzy msgid "" "Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the " "resized object of type ``TYPE*`` (refers to any C type) or ``NULL`` on " "failure." msgstr "" -"Cambia el tamaño de un objeto asignado por :c:func:`PyObject_NewVar`. " -"Retorna el objeto redimensionado o ``NULL`` en caso de falla. *op* aún no " -"debe ser rastreado por el recolector de basura." +"Cambia el tamaño de un objeto asignado por :c:macro:`PyObject_NewVar`. " +"Retorna el objeto redimensionado de tipo ``TYPE*`` (se refiere a cualquier " +"tipo de C) o ``NULL`` en caso de falla." #: ../Doc/c-api/gcsupport.rst:92 msgid "" "*op* must be of type :c:expr:`PyVarObject *` and must not be tracked by the " "collector yet. *newsize* must be of type :c:type:`Py_ssize_t`." msgstr "" +"*op* debe ser de tipo :c:expr:`PyVarObject *` y aún no debe ser rastreado " +"por el recolector. *newsize* debe ser de tipo :c:type:`Py_ssize_t`." #: ../Doc/c-api/gcsupport.rst:99 msgid "" @@ -257,13 +264,12 @@ msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "Esto es análogo a la función de Python :func:`gc.is_finalized`." #: ../Doc/c-api/gcsupport.rst:136 -#, fuzzy msgid "" "Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" "c:macro:`PyObject_GC_NewVar`." msgstr "" -"Libera memoria asignada a un objeto usando :c:func:`PyObject_GC_New` o :c:" -"func:`PyObject_GC_NewVar`." +"Libera memoria asignada a un objeto usando :c:macro:`PyObject_GC_New` o :c:" +"macro:`PyObject_GC_NewVar`." #: ../Doc/c-api/gcsupport.rst:142 msgid "" @@ -283,13 +289,12 @@ msgstr "" "`~PyTypeObject.tp_traverse` no sea válido." #: ../Doc/c-api/gcsupport.rst:151 -#, fuzzy msgid "" "The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." msgstr "" -"Los macros :c:func:`_PyObject_GC_TRACK` y :c:func:`_PyObject_GC_UNTRACK` se " -"han eliminado de la API pública de C." +"Los macros :c:func:`!_PyObject_GC_TRACK` y :c:func:`!_PyObject_GC_UNTRACK` " +"se han eliminado de la API pública de C." #: ../Doc/c-api/gcsupport.rst:154 msgid "" @@ -372,6 +377,13 @@ msgid "" " return 0;\n" "}" msgstr "" +"static int\n" +"my_traverse(Noddy *self, visitproc visit, void *arg)\n" +"{\n" +" Py_VISIT(self->foo);\n" +" Py_VISIT(self->bar);\n" +" return 0;\n" +"}" #: ../Doc/c-api/gcsupport.rst:198 msgid "" @@ -456,30 +468,32 @@ msgstr "" "Retorna el estado actual, 0 para deshabilitado y 1 para habilitado." #: ../Doc/c-api/gcsupport.rst:256 -#, fuzzy msgid "Querying Garbage Collector State" -msgstr "Controlar el estado del recolector de basura" +msgstr "Consultar el estado del recolector de basura" #: ../Doc/c-api/gcsupport.rst:258 -#, fuzzy msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." msgstr "" -"La C-API proporciona las siguientes funciones para controlar las ejecuciones " -"de recolección de basura." +"La C-API proporciona la siguiente interfaz para consultar información sobre " +"el recolector de basura." #: ../Doc/c-api/gcsupport.rst:263 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." msgstr "" +"Ejecuta la *callback* suministrada en todos los objetos activos con " +"capacidad para GC. *arg* se pasa a todas las invocaciones de *callback*." #: ../Doc/c-api/gcsupport.rst:267 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." msgstr "" +"Si la devolución de llamada (des)asigna nuevos objetos, no está definido si " +"serán visitados." #: ../Doc/c-api/gcsupport.rst:270 msgid "" @@ -487,6 +501,10 @@ msgid "" "collection in the callback may lead to undefined behaviour e.g. visiting the " "same objects multiple times or not at all." msgstr "" +"La recolección de basura está deshabilitada durante la operación. Ejecutar " +"una recolección explícitamente en la devolución de llamada puede provocar un " +"comportamiento indefinido, por ejemplo, visitar los mismos objetos varias " +"veces o no visitarlos en absoluto." #: ../Doc/c-api/gcsupport.rst:278 msgid "" @@ -496,3 +514,9 @@ msgid "" "``1`` to stop iteration. Other return values are reserved for now so " "behavior on returning anything else is undefined." msgstr "" +"Tipo de la función de visitante que se pasará a :c:func:" +"`PyUnstable_GC_VisitObjects`. *arg* es el mismo que el *arg* pasado a " +"``PyUnstable_GC_VisitObjects``. Retorna ``0`` para continuar la iteración, " +"retorna ``1`` para detener la iteración. Los demás valores de retorno se " +"reservan por ahora, por lo que el comportamiento al retornar cualquier otro " +"valor no está definido." From 8c4a2258ff0359e0409faccb4429636bf17a7b49 Mon Sep 17 00:00:00 2001 From: Joseph Salgado <49181840+xooseph@users.noreply.github.com> Date: Mon, 13 Oct 2025 16:26:59 -0600 Subject: [PATCH 17/40] Translate `c-api/call.po` (#3422) Closes #3238 --------- Co-authored-by: rtobar --- c-api/call.po | 82 +++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/c-api/call.po b/c-api/call.po index b85e126d4d..02cf7974b8 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -9,15 +9,16 @@ msgstr "" "Project-Id-Version: Python en Español 3.9\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2021-12-09 10:27+0800\n" +"PO-Revision-Date: 2025-10-13 01:01-0600\n" "Last-Translator: Rodrigo Tobar \n" -"Language: es\n" "Language-Team: \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.7\n" #: ../Doc/c-api/call.rst:6 msgid "Call Protocol" @@ -45,6 +46,7 @@ msgstr "" msgid "" "PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);" msgstr "" +"PyObject *tp_call(PyObject *callable, PyObject *args, PyObject *kwargs);" #: ../Doc/c-api/call.rst:19 msgid "" @@ -69,13 +71,12 @@ msgstr "" "manera." #: ../Doc/c-api/call.rst:29 -#, fuzzy msgid "" "To call an object, use :c:func:`PyObject_Call` or another :ref:`call API " "`." msgstr "" -"Para llamar a un objeto, use :c:func:`PyObject_Call` u otro :ref:`call API " -"`." +"Para llamar a un objeto, use :c:func:`PyObject_Call` u otra :ref:`llamada a " +"la API `." #: ../Doc/c-api/call.rst:36 msgid "The Vectorcall Protocol" @@ -127,6 +128,12 @@ msgid "" "versions, vectorcall should only be used with :c:macro:`immutable " "` or static types." msgstr "" +"Ahora el indicador :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` se elimina de una " +"clase cuando se reasigna el método de la clase :py:meth:`~object.__call__`. " +"(Esto configura internamente solo :c:member:`~PyTypeObject.tp_call` y, por " +"lo tanto, puede hacer que se comporte de forma diferente a la función " +"vectorcall.) En versiones anteriores de Python, vectorcall solo debería " +"usarse con tipos :c:macro:`immutables ` o estáticos." #: ../Doc/c-api/call.rst:69 msgid "" @@ -141,7 +148,6 @@ msgstr "" "tiene sentido implementar vectorcall." #: ../Doc/c-api/call.rst:74 -#, fuzzy msgid "" "Classes can implement the vectorcall protocol by enabling the :c:macro:" "`Py_TPFLAGS_HAVE_VECTORCALL` flag and setting :c:member:`~PyTypeObject." @@ -150,7 +156,7 @@ msgid "" "signature:" msgstr "" "Las clases pueden implementar el protocolo vectorcall habilitando el " -"indicador :const:`Py_TPFLAGS_HAVE_VECTORCALL` y la configuración :c:member:" +"indicador :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` y la configuración :c:member:" "`~PyTypeObject.tp_vectorcall_offset` al desplazamiento dentro de la " "estructura del objeto donde aparece un *vectorcallfunc*. Este es un puntero " "a una función con la siguiente firma:" @@ -179,13 +185,13 @@ msgid "*nargsf* is the number of positional arguments plus possibly the" msgstr "*nargsf* es el número de argumentos posicionales más posiblemente el" #: ../Doc/c-api/call.rst:87 -#, fuzzy msgid "" ":c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` flag. To get the actual number of " "positional arguments from *nargsf*, use :c:func:`PyVectorcall_NARGS`." msgstr "" -"flag :const:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Para obtener el número real de " -"argumentos posicionales de *nargsf*, use :c:func:`PyVectorcall_NARGS`." +"indicador :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Para obtener el número " +"real de argumentos posicionales de *nargsf*, use :c:func:" +"`PyVectorcall_NARGS`." #: ../Doc/c-api/call.rst:94 msgid "*kwnames* is a tuple containing the names of the keyword arguments;" @@ -210,7 +216,7 @@ msgid "" "argument 1 (not 0) in the allocated vector. The callee must restore the " "value of ``args[-1]`` before returning." msgstr "" -"Si este flag se establece en un argumento vectorcall *nargsf*, el " +"Si este indicador se establece en un argumento vectorcall *nargsf*, el " "destinatario de la llamada puede cambiar temporalmente ``args[-1]``. En " "otras palabras, *args* apunta al argumento 1 (no 0) en el vector asignado. " "El destinatario de la llamada debe restaurar el valor de ``args[-1]`` antes " @@ -221,11 +227,10 @@ msgid "" "For :c:func:`PyObject_VectorcallMethod`, this flag means instead that " "``args[0]`` may be changed." msgstr "" -"Para :c:func:`PyObject_VectorcallMethod`, este flag significa en cambio que " -"``args[0]`` puede cambiarse." +"Para :c:func:`PyObject_VectorcallMethod`, este indicador significa en cambio " +"que ``args[0]`` puede cambiarse." #: ../Doc/c-api/call.rst:106 -#, fuzzy msgid "" "Whenever they can do so cheaply (without additional allocation), callers are " "encouraged to use :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET`. Doing so will " @@ -233,7 +238,7 @@ msgid "" "include a prepended *self* argument) very efficiently." msgstr "" "Siempre que puedan hacerlo de forma económica (sin asignación adicional), se " -"anima a las personas que llaman a utilizar :const:" +"anima a las personas que llaman a utilizar :c:macro:" "`PY_VECTORCALL_ARGUMENTS_OFFSET`. Si lo hace, permitirá que las personas que " "llaman, como los métodos enlazados, realicen sus llamadas posteriores (que " "incluyen un argumento *self* antepuesto) de manera muy eficiente." @@ -286,7 +291,7 @@ msgstr "" #: ../Doc/c-api/call.rst:140 msgid "(Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET)" -msgstr "" +msgstr "(Py_ssize_t)(nargsf & ~PY_VECTORCALL_ARGUMENTS_OFFSET)" #: ../Doc/c-api/call.rst:142 msgid "" @@ -325,7 +330,6 @@ msgstr "" "posicionales y de palabras clave dados en una tupla y dict, respectivamente." #: ../Doc/c-api/call.rst:164 -#, fuzzy msgid "" "This is a specialized function, intended to be put in the :c:member:" "`~PyTypeObject.tp_call` slot or be used in an implementation of ``tp_call``. " @@ -334,8 +338,8 @@ msgid "" msgstr "" "Esta es una función especializada, destinada a colocarse en el slot :c:" "member:`~PyTypeObject.tp_call` o usarse en una implementación de " -"``tp_call``. No comprueba el flag :const:`Py_TPFLAGS_HAVE_VECTORCALL` y no " -"vuelve a ``tp_call``." +"``tp_call``. No comprueba el indicador :c:macro:`Py_TPFLAGS_HAVE_VECTORCALL` " +"y no vuelve a ``tp_call``." #: ../Doc/c-api/call.rst:175 msgid "Object Calling API" @@ -567,12 +571,11 @@ msgstr "" "ser *NULL*, lo que indica que no se proporcionan argumentos." #: ../Doc/c-api/call.rst:276 -#, fuzzy msgid "" "Note that if you only pass :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallFunctionObjArgs` is a faster alternative." msgstr "" -"Tenga en cuenta que si solo pasa :c:type:`PyObject *` args, :c:func:" +"Tenga en cuenta que si solo pasa :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallFunctionObjArgs` es una alternativa más rápida." #: ../Doc/c-api/call.rst:279 @@ -603,12 +606,11 @@ msgstr "" "arg2, ...)``." #: ../Doc/c-api/call.rst:297 -#, fuzzy msgid "" "Note that if you only pass :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallMethodObjArgs` is a faster alternative." msgstr "" -"Tenga en cuenta que si solo pasa :c:type:`PyObject *` args, :c:func:" +"Tenga en cuenta que si solo pasa :c:expr:`PyObject *` args, :c:func:" "`PyObject_CallMethodObjArgs` es una alternativa más rápida." #: ../Doc/c-api/call.rst:300 @@ -616,14 +618,13 @@ msgid "The types of *name* and *format* were changed from ``char *``." msgstr "Los tipos de *name* y *format* se cambiaron desde ``char *``." #: ../Doc/c-api/call.rst:306 -#, fuzzy msgid "" "Call a callable Python object *callable*, with a variable number of :c:expr:" "`PyObject *` arguments. The arguments are provided as a variable number of " "parameters followed by *NULL*." msgstr "" -"Llame a un objeto de Python invocable *callable*, con un número variable de " -"argumentos :c:type:`PyObject *`. Los argumentos se proporcionan como un " +"Llama a un objeto de Python invocable *callable*, con un número variable de " +"argumentos :c:expr:`PyObject *`. Los argumentos se proporcionan como un " "número variable de parámetros seguidos de *NULL*." #: ../Doc/c-api/call.rst:313 @@ -635,7 +636,6 @@ msgstr "" "arg2, ...)``." #: ../Doc/c-api/call.rst:319 -#, fuzzy msgid "" "Call a method of the Python object *obj*, where the name of the method is " "given as a Python string object in *name*. It is called with a variable " @@ -644,7 +644,7 @@ msgid "" msgstr "" "Llama a un método del objeto de Python *obj*, donde el nombre del método se " "proporciona como un objeto de cadena de caracteres de Python en *name*. Se " -"llama con un número variable de argumentos :c:type:`PyObject *`. Los " +"llama con un número variable de argumentos :c:expr:`PyObject *`. Los " "argumentos se proporcionan como un número variable de parámetros seguidos de " "*NULL*." @@ -662,7 +662,7 @@ msgid "" "*arg*, where the name of the method is given as a Python string object in " "*name*." msgstr "" -"Llame a un método del objeto de Python *obj* con un único argumento " +"Llama a un método del objeto de Python *obj* con un único argumento " "posicional *arg*, donde el nombre del método se proporciona como un objeto " "de cadena de caracteres de Python en *name*." @@ -701,7 +701,6 @@ msgstr "" "posicionales." #: ../Doc/c-api/call.rst:379 -#, fuzzy msgid "" "Call a method using the vectorcall calling convention. The name of the " "method is given as a Python string *name*. The object whose method is called " @@ -713,23 +712,22 @@ msgid "" "`PyObject_Vectorcall`." msgstr "" "Llama a un método usando la convención de llamada vectorcall. El nombre del " -"método se proporciona como una cadena de Python *name*. El objeto cuyo " -"método se llama es *args[0]*, y el arreglo *args* que comienza en *args [1]* " -"representa los argumentos de la llamada. Debe haber al menos un argumento " -"posicional. *nargsf* es el número de argumentos posicionales que incluyen " -"*args [0]*, más :const:`PY_VECTORCALL_ARGUMENTS_OFFSET` si el valor de " -"``args[0]`` puede cambiarse temporalmente. Los argumentos de palabras clave " -"se pueden pasar como en :c:func:`PyObject_Vectorcall`." +"método se proporciona como una cadena de caracteres de Python *name*. El " +"objeto cuyo método se llama es *args[0]*, y el arreglo *args* que comienza " +"en *args [1]* representa los argumentos de la llamada. Debe haber al menos " +"un argumento posicional. *nargsf* es el número de argumentos posicionales " +"que incluyen *args [0]*, más :c:macro:`PY_VECTORCALL_ARGUMENTS_OFFSET` si el " +"valor de ``args[0]`` puede cambiarse temporalmente. Los argumentos de " +"palabras clave se pueden pasar como en :c:func:`PyObject_Vectorcall`." #: ../Doc/c-api/call.rst:388 -#, fuzzy msgid "" "If the object has the :c:macro:`Py_TPFLAGS_METHOD_DESCRIPTOR` feature, this " "will call the unbound method object with the full *args* vector as arguments." msgstr "" -"Si el objeto tiene la característica :const:`Py_TPFLAGS_METHOD_DESCRIPTOR`, " -"esto llamará al objeto de método independiente con el vector *args* completo " -"como argumentos." +"Si el objeto tiene la característica :c:macro:" +"`Py_TPFLAGS_METHOD_DESCRIPTOR`, esto llamará al objeto de método " +"independiente con el vector *args* completo como argumentos." #: ../Doc/c-api/call.rst:399 msgid "Call Support API" From fa544fe9f3ca26469b89913db1e532e538dfbdd5 Mon Sep 17 00:00:00 2001 From: Joseph Salgado <49181840+xooseph@users.noreply.github.com> Date: Tue, 14 Oct 2025 00:39:49 -0600 Subject: [PATCH 18/40] Translate `c-api/bytes.po` (#3423) Closes #3241 --------- Co-authored-by: rtobar --- c-api/bytes.po | 66 +++++++++++++++++------------------- dictionaries/c-api_bytes.txt | 1 + 2 files changed, 32 insertions(+), 35 deletions(-) create mode 100644 dictionaries/c-api_bytes.txt diff --git a/c-api/bytes.po b/c-api/bytes.po index f0501d4743..6af47b82a9 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.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: 2022-11-01 11:48+0100\n" +"PO-Revision-Date: 2025-10-13 01:23-0600\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\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.7\n" #: ../Doc/c-api/bytes.rst:6 msgid "Bytes Objects" @@ -113,7 +114,7 @@ msgstr "Comentario" #: ../Doc/c-api/bytes.rst:67 #, python-format msgid "``%%``" -msgstr "" +msgstr "``%%``" #: ../Doc/c-api/bytes.rst:67 msgid "*n/a*" @@ -122,12 +123,12 @@ msgstr "*n/a*" #: ../Doc/c-api/bytes.rst:67 #, python-format msgid "The literal % character." -msgstr "El carácter literal *%*." +msgstr "El carácter literal %." #: ../Doc/c-api/bytes.rst:69 #, python-format msgid "``%c``" -msgstr "" +msgstr "``%c``" #: ../Doc/c-api/bytes.rst:69 ../Doc/c-api/bytes.rst:72 #: ../Doc/c-api/bytes.rst:90 ../Doc/c-api/bytes.rst:93 @@ -141,7 +142,7 @@ msgstr "Un solo byte, representado como un C int." #: ../Doc/c-api/bytes.rst:72 #, python-format msgid "``%d``" -msgstr "" +msgstr "``%d``" #: ../Doc/c-api/bytes.rst:72 #, python-format @@ -151,7 +152,7 @@ msgstr "Equivalente a ``printf(\"%d\")``. [1]_" #: ../Doc/c-api/bytes.rst:75 #, python-format msgid "``%u``" -msgstr "" +msgstr "``%u``" #: ../Doc/c-api/bytes.rst:75 msgid "unsigned int" @@ -165,7 +166,7 @@ msgstr "Equivalente a ``printf(\"%u\")``. [1]_" #: ../Doc/c-api/bytes.rst:78 #, python-format msgid "``%ld``" -msgstr "" +msgstr "``%ld``" #: ../Doc/c-api/bytes.rst:78 msgid "long" @@ -179,7 +180,7 @@ msgstr "Equivalente a ``printf(\"%ld\")``. [1]_" #: ../Doc/c-api/bytes.rst:81 #, python-format msgid "``%lu``" -msgstr "" +msgstr "``%lu``" #: ../Doc/c-api/bytes.rst:81 msgid "unsigned long" @@ -192,7 +193,7 @@ msgstr "Equivalente a ``printf(\"%lu\")``. [1]_" #: ../Doc/c-api/bytes.rst:84 msgid "``%zd``" -msgstr "" +msgstr "``%zd``" #: ../Doc/c-api/bytes.rst:84 msgid ":c:type:`\\ Py_ssize_t`" @@ -204,7 +205,7 @@ msgstr "Equivalente a ``printf(\"%zd\")``. [1]_" #: ../Doc/c-api/bytes.rst:87 msgid "``%zu``" -msgstr "" +msgstr "``%zu``" #: ../Doc/c-api/bytes.rst:87 msgid "size_t" @@ -217,7 +218,7 @@ msgstr "Equivalente a ``printf(\"%zu\")``. [1]_" #: ../Doc/c-api/bytes.rst:90 #, python-format msgid "``%i``" -msgstr "" +msgstr "``%i``" #: ../Doc/c-api/bytes.rst:90 #, python-format @@ -227,7 +228,7 @@ msgstr "Equivalente a ``printf(\"%i\")``. [1]_" #: ../Doc/c-api/bytes.rst:93 #, python-format msgid "``%x``" -msgstr "" +msgstr "``%x``" #: ../Doc/c-api/bytes.rst:93 #, python-format @@ -237,7 +238,7 @@ msgstr "Equivalente a ``printf(\"%x\")``. [1]_" #: ../Doc/c-api/bytes.rst:96 #, python-format msgid "``%s``" -msgstr "" +msgstr "``%s``" #: ../Doc/c-api/bytes.rst:96 msgid "const char\\*" @@ -249,7 +250,7 @@ msgstr "Un arreglo de caracteres C terminados en nulo." #: ../Doc/c-api/bytes.rst:99 msgid "``%p``" -msgstr "" +msgstr "``%p``" #: ../Doc/c-api/bytes.rst:99 msgid "const void\\*" @@ -331,13 +332,12 @@ msgstr "" "Forma macro de :c:func:`PyBytes_AsString` pero sin verificación de errores." #: ../Doc/c-api/bytes.rst:156 -#, fuzzy msgid "" "Return the null-terminated contents of the object *obj* through the output " "variables *buffer* and *length*. Returns ``0`` on success." msgstr "" "Retorna los contenidos terminados en nulo del objeto *obj* a través de las " -"variables de salida *buffer* y *length*." +"variables de salida *buffer* y *length*. Retorna ``0`` en caso de éxito." #: ../Doc/c-api/bytes.rst:160 msgid "" @@ -389,18 +389,16 @@ msgstr "" "establecerá la excepción apropiada." #: ../Doc/c-api/bytes.rst:187 -#, fuzzy msgid "" "Create a new bytes object in *\\*bytes* containing the contents of *newpart* " "appended to *bytes*. This version releases the :term:`strong reference` to " "*newpart* (i.e. decrements its reference count)." msgstr "" "Crea un nuevo objeto de bytes en *\\*bytes* que contenga el contenido de " -"*newpart* agregado a *bytes*. Esta versión disminuye el recuento de " -"referencias de *newpart*." +"*newpart* agregado a *bytes*. Esta versión libera la :term:`strong " +"reference` a *newpart* (es decir, disminuye su recuento de referencias)." #: ../Doc/c-api/bytes.rst:194 -#, fuzzy msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " @@ -411,22 +409,20 @@ msgid "" "the original bytes object at *\\*bytes* is deallocated, *\\*bytes* is set to " "``NULL``, :exc:`MemoryError` is set, and ``-1`` is returned." msgstr "" -"Una forma de cambiar el tamaño de un objeto bytes aunque sea \"inmutable\". " -"Solo use esto para construir un nuevo objeto bytes; no use esto si los bytes " -"ya pueden ser conocidos en otras partes del código. Es un error llamar a " -"esta función si el recuento en el objeto bytes de entrada no es uno. Pasa la " -"dirección de un objeto de bytes existente como un *lvalue* (puede escribirse " -"en él) y el nuevo tamaño deseado. En caso de éxito, *\\*bytes* retiene el " -"objeto de bytes redimensionados y se retorna ``0``; la dirección en " -"*\\*bytes* puede diferir de su valor de entrada. Si la reasignación falla, " -"el objeto de bytes original en *\\*bytes* se desasigna, *\\*bytes* se " -"establece en ``NULL``, :exc:`MemoryError` se establece y se retorna ``-1`` ." +"Redimensiona un objeto bytes. *newsize* será la nueva longitud del objeto " +"bytes. Se puede considerar como crear un nuevo objeto bytes y destruir el " +"anterior, solo que de forma más eficiente. Pasa la dirección de un objeto " +"bytes existente como lvalue (se puede escribir en él) y el nuevo tamaño " +"deseado. En caso de éxito, *\\*bytes* contiene el objeto bytes " +"redimensionado y se retorna ``0``; la dirección en *\\*bytes* puede diferir " +"de su valor de entrada. Si la reasignación falla, el objeto bytes original " +"en *\\*bytes* se desasigna, *\\*bytes* se establece en ``NULL``, se " +"establece :exc:`MemoryError` y se retorna ``-1``." #: ../Doc/c-api/bytes.rst:11 -#, fuzzy msgid "object" -msgstr "Objetos bytes" +msgstr "object" #: ../Doc/c-api/bytes.rst:11 msgid "bytes" -msgstr "" +msgstr "bytes" diff --git a/dictionaries/c-api_bytes.txt b/dictionaries/c-api_bytes.txt new file mode 100644 index 0000000000..406d3ca16d --- /dev/null +++ b/dictionaries/c-api_bytes.txt @@ -0,0 +1 @@ +lvalue From e99246784983df5d60e1a44aca7bade6e8da440f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 11:52:55 +0200 Subject: [PATCH 19/40] Translate whatsnew/2.6 (#3314) Closes #3185 --- whatsnew/2.6.po | 1078 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 820 insertions(+), 258 deletions(-) diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 852739d146..186b888cec 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -13,12 +13,12 @@ msgstr "" "POT-Creation-Date: 2024-11-21 16:38-0300\n" "PO-Revision-Date: 2024-01-21 18:29+0100\n" "Last-Translator: \n" -"Language: es\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" #: ../Doc/whatsnew/2.6.rst:5 @@ -170,7 +170,6 @@ msgstr "" "sea necesario." #: ../Doc/whatsnew/2.6.rst:117 -#, fuzzy msgid "" "A new command-line switch, :option:`!-3`, enables warnings about features " "that will be removed in Python 3.0. You can run code with this switch to " @@ -181,22 +180,22 @@ msgstr "" "Un nuevo modificador de línea de comandos, :option:`!-3`, habilita " "advertencias sobre características que se eliminarán en Python 3.0. Puede " "ejecutar código con este modificador para ver cuánto trabajo será necesario " -"para migrar el código a 3.0. El valor de este modificador está disponible " -"para el código Python como la variable booleana :data:`sys.py3kwarning`, y " -"para el código de extensión C como :c:data:`Py_Py3kWarningFlag`." +"para trasladar el código a la versión 3.0. El valor de este modificador está " +"disponible para el código Python como la variable booleana :data:`sys." +"py3kwarning` y para el código de extensión C como :c:data:`!" +"Py_Py3kWarningFlag`." #: ../Doc/whatsnew/2.6.rst:126 -#, fuzzy msgid "" "The 3\\ *xxx* series of PEPs, which contains proposals for Python 3.0. :pep:" "`3000` describes the development process for Python 3.0. Start with :pep:" "`3100` that describes the general goals for Python 3.0, and then explore the " "higher-numbered PEPs that propose specific features." msgstr "" -"Las series 3xxx de PEP, que contienen propuestas para Python 3.0. :pep:" -"`3000` describe el proceso de desarrollo de Python 3.0. Empiece con :pep:" -"`3100` que describe los objetivos generales de Python 3.0, y luego explore " -"los PEPS con números más altos que proponen características específicas." +"La serie 3\\ *xxx* de PEP, que contiene propuestas para Python 3.0. :pep:" +"`3000` describe el proceso de desarrollo para Python 3.0. Comience con :pep:" +"`3100`, que describe los objetivos generales para Python 3.0, y luego " +"explore los PEP de mayor número que proponen características específicas." #: ../Doc/whatsnew/2.6.rst:134 msgid "Changes to the Development Process" @@ -474,42 +473,41 @@ msgid "" "with expression [as variable]:\n" " with-block" msgstr "" +"with expression [as variable]:\n" +" with-block" #: ../Doc/whatsnew/2.6.rst:269 -#, fuzzy msgid "" "The expression is evaluated, and it should result in an object that supports " "the context management protocol (that is, has :meth:`~object.__enter__` and :" "meth:`~object.__exit__` methods)." msgstr "" -"La expresión se evalúa y debe dar como resultado un objeto que admita el " -"protocolo de administración de contexto (es decir, tiene los métodos :meth:" -"`__enter__` y :meth:`__exit__`)." +"Se evalúa la expresión y debería dar como resultado un objeto que admita el " +"protocolo de gestión de contexto (es decir, que tenga los métodos :meth:" +"`~object.__enter__` y :meth:`~object.__exit__`)." #: ../Doc/whatsnew/2.6.rst:273 -#, fuzzy msgid "" "The object's :meth:`~object.__enter__` is called before *with-block* is " "executed and therefore can run set-up code. It also may return a value that " "is bound to the name *variable*, if given. (Note carefully that *variable* " "is *not* assigned the result of *expression*.)" msgstr "" -"El objeto :meth:`__enter__` se llama antes de que se ejecute *with-block* y, " -"por lo tanto, se puede ejecutar código de configuración. También, si se " -"proporciona, puede retornar un valor que esté vinculado al nombre " -"*variable*. (Tenga en cuenta que a la *variable* *no* se le asigna el " -"resultado de la *expression*)." +"El objeto :meth:`~object.__enter__` se llama antes de que se ejecute *with-" +"block* y, por lo tanto, puede ejecutar el código de configuración. También " +"puede devolver un valor vinculado al nombre *variable*, si se proporciona. " +"(Tenga en cuenta que *variable* es *not* al que se le asigna el resultado de " +"*expression*)." #: ../Doc/whatsnew/2.6.rst:278 -#, fuzzy msgid "" "After execution of the *with-block* is finished, the object's :meth:`~object." "__exit__` method is called, even if the block raised an exception, and can " "therefore run clean-up code." msgstr "" "Una vez finalizada la ejecución de *with-block*, se llama al método :meth:" -"`__exit__` del objeto, incluso si el bloque generó una excepción y, por lo " -"tanto, puede ejecutar código de limpieza." +"`~object.__exit__` del objeto, incluso si el bloque generó una excepción y, " +"por lo tanto, puede ejecutar código de limpieza." #: ../Doc/whatsnew/2.6.rst:282 msgid "" @@ -528,6 +526,10 @@ msgid "" " print line\n" " ... more processing code ..." msgstr "" +"with open('/etc/passwd', 'r') as f:\n" +" for line in f:\n" +" print line\n" +" ... more processing code ..." #: ../Doc/whatsnew/2.6.rst:290 msgid "" @@ -540,13 +542,12 @@ msgstr "" "una excepción en la mitad del bloque." #: ../Doc/whatsnew/2.6.rst:296 -#, fuzzy msgid "" "In this case, *f* is the same object created by :func:`open`, because :meth:" "`~object.__enter__` returns *self*." msgstr "" "En este caso, *f* es el mismo objeto creado por :func:`open`, porque :meth:" -"`file.__enter__` retorna *self*." +"`~object.__enter__` retorna *self*." #: ../Doc/whatsnew/2.6.rst:299 msgid "" @@ -563,6 +564,10 @@ msgid "" " # Critical section of code\n" " ..." msgstr "" +"lock = threading.Lock()\n" +"with lock:\n" +" # Critical section of code\n" +" ..." #: ../Doc/whatsnew/2.6.rst:307 msgid "" @@ -595,6 +600,16 @@ msgid "" " # The original context is restored on exiting the block.\n" " print v.sqrt()" msgstr "" +"from decimal import Decimal, Context, localcontext\n" +"\n" +"# Displays with default precision of 28 digits\n" +"v = Decimal('578')\n" +"print v.sqrt()\n" +"\n" +"with localcontext(Context(prec=16)):\n" +" # All code in this block uses a precision of 16 digits.\n" +" # The original context is restored on exiting the block.\n" +" print v.sqrt()" #: ../Doc/whatsnew/2.6.rst:329 msgid "Writing Context Managers" @@ -620,7 +635,6 @@ msgid "A high-level explanation of the context management protocol is:" msgstr "Una explicación de alto nivel del protocolo de gestor de contexto es:" #: ../Doc/whatsnew/2.6.rst:339 -#, fuzzy msgid "" "The expression is evaluated and should result in an object called a " "\"context manager\". The context manager must have :meth:`~object." @@ -628,25 +642,23 @@ msgid "" msgstr "" "La expresión se evalúa y debería dar como resultado un objeto llamado " "\"gestor de contexto\". El gestor de contexto debe tener los métodos :meth:" -"`__enter__` y :meth:`__exit__`." +"`~object.__enter__` y :meth:`~object.__exit__`." #: ../Doc/whatsnew/2.6.rst:343 -#, fuzzy msgid "" "The context manager's :meth:`~object.__enter__` method is called. The value " "returned is assigned to *VAR*. If no ``as VAR`` clause is present, the " "value is simply discarded." msgstr "" -"Se llama al método :meth:`__enter__` del gestor de contexto. El valor " -"retornado se asigna a *VAR*. Si no hay una cláusula ``as VAR``, el valor " -"simplemente se descarta." +"Se llama al método :meth:`~object.__enter__` del gestor de contexto. El " +"valor retornado se asigna a *VAR*. Si no hay una cláusula ``as VAR``, el " +"valor simplemente se descarta." #: ../Doc/whatsnew/2.6.rst:347 msgid "The code in *BLOCK* is executed." msgstr "Se ejecuta el código en *BLOCK*." #: ../Doc/whatsnew/2.6.rst:349 -#, fuzzy msgid "" "If *BLOCK* raises an exception, the context manager's :meth:`~object." "__exit__` method is called with three arguments, the exception details " @@ -658,24 +670,23 @@ msgid "" "author of the code containing the ':keyword:`with`' statement will never " "realize anything went wrong." msgstr "" -"Si *BLOCK* lanza una excepción, se llama al método :meth:`__exit__` del " -"gestor de contexto con tres argumentos, los detalles de la excepción " -"(``type, value, traceback``, los mismos valores retornados por :func:`sys." -"exc_info`, que también puede ser ``None`` si no se produjo ninguna " -"excepción). El valor de retorno del método controla si se vuelve a generar " -"una excepción: cualquier valor *false* vuelve a lanzar la excepción, y " -"``True`` resultará en inhibirla. Rara vez querrá suprimir la excepción, " -"porque si lo hace, el autor del código que contenga la sentencia ':keyword:" -"`with`' nunca se dará cuenta de que algo salió mal." +"Si *BLOCK* genera una excepción, se llama al método :meth:`~object.__exit__` " +"del administrador de contexto con tres argumentos: los detalles de la " +"excepción (``type, value, traceback``, los mismos valores devueltos por :" +"func:`sys.exc_info`, que también pueden ser ``None`` si no se produjo " +"ninguna excepción). El valor de retorno del método controla si se vuelve a " +"generar una excepción: cualquier valor falso vuelve a generar la excepción y " +"``True`` provocará su supresión. Solo en raras ocasiones querrá suprimir la " +"excepción, porque si lo hace, el autor del código que contiene la " +"declaración ':keyword:`with`' nunca se dará cuenta de que algo salió mal." #: ../Doc/whatsnew/2.6.rst:358 -#, fuzzy msgid "" "If *BLOCK* didn't raise an exception, the :meth:`~object.__exit__` method " "is still called, but *type*, *value*, and *traceback* are all ``None``." msgstr "" -"Si *BLOCK* no lanzó una excepción, el método :meth:`__exit__` continúa " -"llamándose, pero *type*, *value* y *traceback* son todos ``None``." +"Si *BLOCK* no lanzó una excepción, el método :meth:`~object.__exit__` " +"continúa llamándose, pero *type*, *value* y *traceback* son todos ``None``." #: ../Doc/whatsnew/2.6.rst:361 msgid "" @@ -717,6 +728,11 @@ msgid "" " cursor.execute('delete from ...')\n" " # ... more operations ..." msgstr "" +"db_connection = DatabaseConnection()\n" +"with db_connection as cursor:\n" +" cursor.execute('insert into ...')\n" +" cursor.execute('delete from ...')\n" +" # ... more operations ..." #: ../Doc/whatsnew/2.6.rst:379 msgid "" @@ -739,9 +755,16 @@ msgid "" " def rollback(self):\n" " \"Rolls back current transaction\"" msgstr "" +"class DatabaseConnection:\n" +" # Database interface\n" +" def cursor(self):\n" +" \"Returns a cursor object and starts a new transaction\"\n" +" def commit(self):\n" +" \"Commits current transaction\"\n" +" def rollback(self):\n" +" \"Rolls back current transaction\"" #: ../Doc/whatsnew/2.6.rst:392 -#, fuzzy msgid "" "The :meth:`~object.__enter__` method is pretty easy, having only to start a " "new transaction. For this application the resulting cursor object would be " @@ -749,11 +772,11 @@ msgid "" "cursor`` to their ':keyword:`with`' statement to bind the cursor to a " "variable name. ::" msgstr "" -"El método :meth:`__enter__` es bastante fácil, ya que solo tiene que iniciar " -"una nueva transacción. Para esta aplicación, el objeto cursor resultante " -"sería un resultado útil, por lo que el método lo retornará. Luego, el " -"usuario puede agregar ``as cursor`` a su sentencia ':keyword:`with`' para " -"vincular el cursor a un nombre de variable. ::" +"El método :meth:`~object.__enter__` es bastante sencillo, ya que solo hay " +"que iniciar una nueva transacción. Para esta aplicación, el objeto cursor " +"resultante sería un resultado útil, por lo que el método lo devolverá. El " +"usuario puede entonces añadir ``as cursor`` a su declaración ':keyword:" +"`with`' para vincular el cursor a un nombre de variable. ::" #: ../Doc/whatsnew/2.6.rst:397 msgid "" @@ -764,19 +787,24 @@ msgid "" " cursor = self.cursor()\n" " return cursor" msgstr "" +"class DatabaseConnection:\n" +" ...\n" +" def __enter__(self):\n" +" # Code to start a new transaction\n" +" cursor = self.cursor()\n" +" return cursor" #: ../Doc/whatsnew/2.6.rst:404 -#, fuzzy msgid "" "The :meth:`~object.__exit__` method is the most complicated because it's " "where most of the work has to be done. The method has to check if an " "exception occurred. If there was no exception, the transaction is " "committed. The transaction is rolled back if there was an exception." msgstr "" -"El método :meth:`__exit__` es el más complicado porque es donde se debe " -"realizar la mayor parte del trabajo. El método debe verificar si ocurrió una " -"excepción. Si no hubo excepción, la transacción se confirma. La transacción " -"se revierte si hubo una excepción." +"El método :meth:`~object.__exit__` es el más complicado porque es donde se " +"debe realizar la mayor parte del trabajo. El método debe verificar si se " +"produjo una excepción. Si no hubo excepción, se confirma la transacción. Si " +"hubo una excepción, se revierte la transacción." #: ../Doc/whatsnew/2.6.rst:409 msgid "" @@ -804,6 +832,16 @@ msgid "" " self.rollback()\n" " # return False" msgstr "" +"class DatabaseConnection:\n" +" ...\n" +" def __exit__(self, type, value, tb):\n" +" if tb is None:\n" +" # No exception, so commit\n" +" self.commit()\n" +" else:\n" +" # Exception occurred, so rollback.\n" +" self.rollback()\n" +" # return False" #: ../Doc/whatsnew/2.6.rst:429 msgid "The contextlib module" @@ -818,7 +856,6 @@ msgstr "" "son útiles al escribir objetos para usar con la sentencia ':keyword:`with`'." #: ../Doc/whatsnew/2.6.rst:434 -#, fuzzy msgid "" "The decorator is called :func:`contextmanager`, and lets you write a single " "generator function instead of defining a new class. The generator should " @@ -830,14 +867,14 @@ msgid "" "method. Any exception raised in the block will be raised by the :keyword:`!" "yield` statement." msgstr "" -"El decorador se llama :func:`contextmanager`, y te permite escribir una " -"única función generadora en lugar de definir una clase nueva. El generador " -"debería producir exactamente un valor. El código hasta :keyword:`yield` se " -"ejecutará como el método :meth:`__enter__`, y el valor obtenido será el " -"valor de retorno del método que se vinculará a la variable en la clausula :" -"keyword:`!as` (si la hay) de la sentencia ':keyword:`with`'. El código " -"después de :keyword:`!yield` se ejecutará en el método :meth:`__exit__` . " -"Cualquier excepción lanzada en el bloque será generada por la sentencia :" +"El decorador se llama :func:`contextmanager` y le permite escribir una única " +"función generadora en lugar de definir una nueva clase. El generador debe " +"producir exactamente un valor. El código hasta :keyword:`yield` se ejecutará " +"como el método :meth:`~object.__enter__` y el valor producido será el valor " +"de retorno del método que se vinculará a la variable en la cláusula :keyword:" +"`!as` de la declaración ':keyword:`with`', si la hay. El código después de :" +"keyword:`!yield` se ejecutará en el método :meth:`~object.__exit__`. " +"Cualquier excepción generada en el bloque será generada por la declaración :" "keyword:`!yield`." #: ../Doc/whatsnew/2.6.rst:443 @@ -867,6 +904,22 @@ msgid "" "with db_transaction(db) as cursor:\n" " ..." msgstr "" +"from contextlib import contextmanager\n" +"\n" +"@contextmanager\n" +"def db_transaction(connection):\n" +" cursor = connection.cursor()\n" +" try:\n" +" yield cursor\n" +" except:\n" +" connection.rollback()\n" +" raise\n" +" else:\n" +" connection.commit()\n" +"\n" +"db = DatabaseConnection()\n" +"with db_transaction(db) as cursor:\n" +" ..." #: ../Doc/whatsnew/2.6.rst:463 msgid "" @@ -888,6 +941,9 @@ msgid "" "with nested (db_transaction(db), lock) as (cursor, locked):\n" " ..." msgstr "" +"lock = threading.Lock()\n" +"with nested (db_transaction(db), lock) as (cursor, locked):\n" +" ..." #: ../Doc/whatsnew/2.6.rst:472 msgid "" @@ -908,6 +964,12 @@ msgid "" " for line in f:\n" " sys.stdout.write(line)" msgstr "" +"importar urllib, sys\n" +"desde contextlib importar closing\n" +"\n" +"con closing(urllib.urlopen('http://www.yahoo.com')) como f:\n" +"para línea en f:\n" +"sys.stdout.write(line)" #: ../Doc/whatsnew/2.6.rst:490 msgid ":pep:`343` - The \"with\" statement" @@ -1124,6 +1186,35 @@ msgid "" " result = queue.get()\n" " print 'Factorial', N, '=', result" msgstr "" +"import time\n" +"from multiprocessing import Process, Queue\n" +"\n" +"\n" +"def factorial(queue, N):\n" +" \"Compute a factorial.\"\n" +" # If N is a multiple of 4, this function will take much longer.\n" +" if (N % 4) == 0:\n" +" time.sleep(.05 * N/4)\n" +"\n" +" # Calculate the result\n" +" fact = 1L\n" +" for i in range(1, N+1):\n" +" fact = fact * i\n" +"\n" +" # Put the result on the queue\n" +" queue.put(fact)\n" +"\n" +"if __name__ == '__main__':\n" +" queue = Queue()\n" +"\n" +" N = 5\n" +"\n" +" p = Process(target=factorial, args=(queue, N))\n" +" p.start()\n" +" p.join()\n" +"\n" +" result = queue.get()\n" +" print 'Factorial', N, '=', result" #: ../Doc/whatsnew/2.6.rst:614 msgid "" @@ -1171,6 +1262,15 @@ msgid "" "for v in result:\n" " print v" msgstr "" +"from multiprocessing import Pool\n" +"\n" +"def factorial(N, dictionary):\n" +" \"Compute a factorial.\"\n" +" ...\n" +"p = Pool(5)\n" +"result = p.map(factorial, range(1, 1000, 10))\n" +"for v in result:\n" +" print v" #: ../Doc/whatsnew/2.6.rst:640 msgid "This produces the following output::" @@ -1185,6 +1285,12 @@ msgid "" "33452526613163807108170062053440751665152000000000\n" "..." msgstr "" +"1\n" +"39916800\n" +"51090942171709440000\n" +"8222838654177922817725562880000000\n" +"33452526613163807108170062053440751665152000000000\n" +"..." #: ../Doc/whatsnew/2.6.rst:649 msgid "" @@ -1242,6 +1348,37 @@ msgid "" " for k, v in sorted(d.items()):\n" " print k, v" msgstr "" +"import time\n" +"from multiprocessing import Pool, Manager\n" +"\n" +"def factorial(N, dictionary):\n" +" \"Compute a factorial.\"\n" +" # Calculate the result\n" +" fact = 1L\n" +" for i in range(1, N+1):\n" +" fact = fact * i\n" +"\n" +" # Store result in dictionary\n" +" dictionary[N] = fact\n" +"\n" +"if __name__ == '__main__':\n" +" p = Pool(5)\n" +" mgr = Manager()\n" +" d = mgr.dict() # Create shared dictionary\n" +"\n" +" # Run tasks using the pool\n" +" for N in range(1, 1000, 10):\n" +" p.apply_async(factorial, (N, d))\n" +"\n" +" # Mark pool as closed -- no more tasks can be added.\n" +" p.close()\n" +"\n" +" # Wait for tasks to exit\n" +" p.join()\n" +"\n" +" # Output results\n" +" for k, v in sorted(d.items()):\n" +" print k, v" #: ../Doc/whatsnew/2.6.rst:693 msgid "This will produce the output::" @@ -1256,6 +1393,12 @@ msgid "" "41 33452526613163807108170062053440751665152000000000\n" "51 15511187532873822802242430164693032110632597200169861120000..." msgstr "" +"1 1\n" +"11 39916800\n" +"21 51090942171709440000\n" +"31 8222838654177922817725562880000000\n" +"41 33452526613163807108170062053440751665152000000000\n" +"51 15511187532873822802242430164693032110632597200169861120000..." #: ../Doc/whatsnew/2.6.rst:704 msgid "The documentation for the :mod:`multiprocessing` module." @@ -1310,6 +1453,14 @@ msgid "" "... last_login = \"5 Mar 2008 07:20\")\n" "'User ID: root Last seen: 5 Mar 2008 07:20'" msgstr "" +">>> # Substitute positional argument 0 into the string.\n" +">>> \"User ID: {0}\".format(\"root\")\n" +"'User ID: root'\n" +">>> # Use the named keyword arguments\n" +">>> \"User ID: {uid} Last seen: {last_login}\".format(\n" +"... uid=\"root\",\n" +"... last_login = \"5 Mar 2008 07:20\")\n" +"'User ID: root Last seen: 5 Mar 2008 07:20'" #: ../Doc/whatsnew/2.6.rst:735 msgid "Curly brackets can be escaped by doubling them::" @@ -1320,6 +1471,8 @@ msgid "" ">>> \"Empty dict: {{}}\".format()\n" "\"Empty dict: {}\"" msgstr "" +">>> \"Empty dict: {{}}\".format()\n" +"\"Empty dict: {}\"" #: ../Doc/whatsnew/2.6.rst:740 msgid "" @@ -1345,6 +1498,16 @@ msgid "" ">>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)\n" "'Content-type: video/mp4'" msgstr "" +">>> import sys\n" +">>> print 'Platform: {0.platform}\\nPython version: {0.version}'." +"format(sys)\n" +"Platform: darwin\n" +"Python version: 2.6a1+ (trunk:61261M, Mar 5 2008, 20:29:41)\n" +"[GCC 4.0.1 (Apple Computer, Inc. build 5367)]'\n" +"\n" +">>> import mimetypes\n" +">>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)\n" +"'Content-type: video/mp4'" #: ../Doc/whatsnew/2.6.rst:754 msgid "" @@ -1382,6 +1545,15 @@ msgid "" ">>> fmt.format('Banquet', 125)\n" "'Banquet $ 125'" msgstr "" +">>> # Field 0: left justify, pad to 15 characters\n" +">>> # Field 1: right justify, pad to 6 characters\n" +">>> fmt = '{0:15} ${1:>6}'\n" +">>> fmt.format('Registration', 35)\n" +"'Registration $ 35'\n" +">>> fmt.format('Tutorial', 50)\n" +"'Tutorial $ 50'\n" +">>> fmt.format('Banquet', 125)\n" +"'Banquet $ 125'" #: ../Doc/whatsnew/2.6.rst:774 msgid "Format specifiers can reference other fields through nesting::" @@ -1399,6 +1571,13 @@ msgid "" ">>> fmt.format('Invoice #1234', width)\n" "'Invoice #1234 '" msgstr "" +">>> fmt = '{0:{1}}'\n" +">>> width = 15\n" +">>> fmt.format('Invoice #1234', width)\n" +"'Invoice #1234 '\n" +">>> width = 35\n" +">>> fmt.format('Invoice #1234', width)\n" +"'Invoice #1234 '" #: ../Doc/whatsnew/2.6.rst:784 msgid "The alignment of a field within the desired width can be specified:" @@ -1463,6 +1642,10 @@ msgid "" ">>> '{0:e}'.format(3.75)\n" "'3.750000e+00'" msgstr "" +">>> '{0:g}'.format(3.75)\n" +"'3.75'\n" +">>> '{0:e}'.format(3.75)\n" +"'3.750000e+00'" #: ../Doc/whatsnew/2.6.rst:804 msgid "" @@ -1589,6 +1772,11 @@ msgid "" " else:\n" " return str(self)" msgstr "" +"def __format__(self, format_spec):\n" +" if isinstance(format_spec, unicode):\n" +" return unicode(str(self))\n" +" else:\n" +" return str(self)" #: ../Doc/whatsnew/2.6.rst:836 msgid "" @@ -1603,6 +1791,8 @@ msgid "" ">>> format(75.6564, '.2f')\n" "'75.66'" msgstr "" +">>> format(75.6564, '.2f')\n" +"'75.66'" #: ../Doc/whatsnew/2.6.rst:847 msgid ":ref:`formatstrings`" @@ -1648,6 +1838,8 @@ msgid "" ">>> from __future__ import print_function\n" ">>> print('# of entries', len(dictionary), file=sys.stderr)" msgstr "" +">>> from __future__ import print_function\n" +">>> print('# de entradas', len(diccionario), file=sys.stderr)" #: ../Doc/whatsnew/2.6.rst:869 msgid "The signature of the new function is::" @@ -1708,6 +1900,11 @@ msgid "" "except TypeError, ValueError: # Wrong!\n" " ..." msgstr "" +"La firma de la nueva función es::" +"try:\n" +" ...\n" +"except TypeError, ValueError: # ¡Incorrecto!\n" +" ..." #: ../Doc/whatsnew/2.6.rst:902 msgid "" @@ -1731,6 +1928,10 @@ msgid "" "except (TypeError, ValueError):\n" " ..." msgstr "" +"try:\n" +" ...\n" +"except (TypeError, ValueError):\n" +" ..." #: ../Doc/whatsnew/2.6.rst:914 msgid "" @@ -1759,6 +1960,10 @@ msgid "" "except TypeError as exc:\n" " ..." msgstr "" +"try:\n" +" ...\n" +"except TypeError as exc:\n" +" ..." #: ../Doc/whatsnew/2.6.rst:927 msgid "" @@ -1851,6 +2056,12 @@ msgid "" "\n" "print len(s) # 12 Unicode characters" msgstr "" +"from __future__ import unicode_literals\n" +"\n" +"s = ('\\u751f\\u3080\\u304e\\u3000\\u751f\\u3054'\n" +" '\\u3081\\u3000\\u751f\\u305f\\u307e\\u3054')\n" +"\n" +"print len(s) # 12 Unicode characters" #: ../Doc/whatsnew/2.6.rst:977 msgid "" @@ -1890,6 +2101,16 @@ msgid "" ">>> unicode(str(b), 'utf-8')\n" "u'\\u31ef \\u3244'" msgstr "" +">>> bytearray([65, 66, 67])\n" +"bytearray(b'ABC')\n" +">>> b = bytearray(u'\\u21ef\\u3244', 'utf-8')\n" +">>> b\n" +"bytearray(b'\\xe2\\x87\\xaf\\xe3\\x89\\x84')\n" +">>> b[0] = '\\xe3'\n" +">>> b\n" +"bytearray(b'\\xe3\\x87\\xaf\\xe3\\x89\\x84')\n" +">>> unicode(str(b), 'utf-8')\n" +"u'\\u31ef \\u3244'" #: ../Doc/whatsnew/2.6.rst:999 msgid "" @@ -1910,6 +2131,11 @@ msgid "" ">>> b\n" "bytearray(b'ABCde')" msgstr "" +">>> b = bytearray('ABC')\n" +">>> b.append('d')\n" +">>> b.append(ord('e'))\n" +">>> b\n" +"bytearray(b'ABCde')" #: ../Doc/whatsnew/2.6.rst:1012 msgid "" @@ -2043,7 +2269,6 @@ msgstr "" "nada en el disco." #: ../Doc/whatsnew/2.6.rst:1083 -#, fuzzy msgid "" "(In Python 2.6, :class:`io.StringIO` is implemented in pure Python, so it's " "pretty slow. You should therefore stick with the existing :mod:`!StringIO` " @@ -2051,12 +2276,11 @@ msgid "" "module will be rewritten into C for speed, and perhaps the C implementation " "will be backported to the 2.x releases.)" msgstr "" -"(En Python 2.6, :class:`io.StringIO` está implementado en Python puro, por " -"lo que es bastante lento. Por lo tanto, deberías seguir con el módulo :mod:" -"`StringIO` existente o con :mod:`cStringIO` por ahora. En algún momento el " -"módulo :mod:`io` de Python 3.0 será reescrito en C para aumentar la " -"velocidad, y quizás la implementación en C será retroalimentada a las " -"versiones 2.x)" +"(En Python 2.6, :class:`io.StringIO` se implementa en Python puro, por lo " +"que es bastante lento. Por lo tanto, debe quedarse con el módulo :mod:`!" +"StringIO` o :mod:`!cStringIO` existente por ahora. En algún momento, el " +"módulo :mod:`io` de Python 3.0 se reescribirá en C para mayor velocidad, y " +"tal vez la implementación de C se incorpore a las versiones 2.x)." #: ../Doc/whatsnew/2.6.rst:1089 msgid "" @@ -2267,6 +2491,10 @@ msgid "" "class Storage(collections.MutableMapping):\n" " ..." msgstr "" +"import collections\n" +"\n" +"class Storage(collections.MutableMapping):\n" +" ..." #: ../Doc/whatsnew/2.6.rst:1196 msgid "" @@ -2286,6 +2514,12 @@ msgid "" "\n" "collections.MutableMapping.register(Storage)" msgstr "" +"import collections\n" +"\n" +"class Storage:\n" +" ...\n" +"\n" +"collections.MutableMapping.register(Storage)" #: ../Doc/whatsnew/2.6.rst:1207 msgid "" @@ -2308,6 +2542,10 @@ msgid "" "PrintableType.register(float)\n" "PrintableType.register(str)" msgstr "" +"# Register Python's types\n" +"PrintableType.register(int)\n" +"PrintableType.register(float)\n" +"PrintableType.register(str)" #: ../Doc/whatsnew/2.6.rst:1219 msgid "" @@ -2334,6 +2572,9 @@ msgid "" " if not isinstance(d, collections.MutableMapping):\n" " raise ValueError(\"Mapping object expected, not %r\" % d)" msgstr "" +"def func(d):\n" +" if not isinstance(d, collections.MutableMapping):\n" +" raise ValueError(\"Mapping object expected, not %r\" % d)" #: ../Doc/whatsnew/2.6.rst:1230 msgid "" @@ -2378,6 +2619,22 @@ msgid "" " def draw(self, x, y, scale):\n" " ..." msgstr "" +"from abc import ABCMeta, abstractmethod\n" +"\n" +"class Drawable():\n" +" __metaclass__ = ABCMeta\n" +"\n" +" @abstractmethod\n" +" def draw(self, x, y, scale=1.0):\n" +" pass\n" +"\n" +" def draw_doubled(self, x, y):\n" +" self.draw(x, y, scale=2.0)\n" +"\n" +"\n" +"class Square(Drawable):\n" +" def draw(self, x, y, scale):\n" +" ..." #: ../Doc/whatsnew/2.6.rst:1258 msgid "" @@ -2421,6 +2678,15 @@ msgid "" "draw\n" ">>>" msgstr "" +">>> class Circle(Drawable):\n" +"... pass\n" +"...\n" +">>> c = Circle()\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: Can't instantiate abstract class Circle with abstract methods " +"draw\n" +">>>" #: ../Doc/whatsnew/2.6.rst:1281 msgid "" @@ -2439,6 +2705,12 @@ msgid "" "def readonly(self):\n" " return self._x" msgstr "" +"from abc import abstractproperty\n" +"...\n" +"\n" +"@abstractproperty\n" +"def readonly(self):\n" +" return self._x" #: ../Doc/whatsnew/2.6.rst:1291 msgid "Subclasses must then define a :meth:`readonly` property." @@ -2486,6 +2758,10 @@ msgid "" ">>> 0b101111\n" "47" msgstr "" +">>> 0o21, 2*8 + 1\n" +"(17, 17)\n" +">>> 0b101111\n" +"47" #: ../Doc/whatsnew/2.6.rst:1320 msgid "" @@ -2506,6 +2782,12 @@ msgid "" ">>> bin(173)\n" "'0b10101101'" msgstr "" +">>> oct(42)\n" +"'052'\n" +">>> future_builtins.oct(42)\n" +"'0o52'\n" +">>> bin(173)\n" +"'0b10101101'" #: ../Doc/whatsnew/2.6.rst:1331 msgid "" @@ -2530,6 +2812,14 @@ msgid "" ">>> int('0b1101', 0)\n" "13" msgstr "" +">>> int ('0o52', 0)\n" +"42\n" +">>> int('1101', 2)\n" +"13\n" +">>> int('0b1101', 2)\n" +"13\n" +">>> int('0b1101', 0)\n" +"13" #: ../Doc/whatsnew/2.6.rst:1349 msgid ":pep:`3127` - Integer Literal Support and Syntax" @@ -2558,6 +2848,10 @@ msgid "" "class A:\n" " pass" msgstr "" +"@foo\n" +"@bar\n" +"class A:\n" +" pass" #: ../Doc/whatsnew/2.6.rst:1367 msgid "This is equivalent to::" @@ -2570,6 +2864,10 @@ msgid "" "\n" "A = foo(bar(A))" msgstr "" +"class A:\n" +" pass\n" +"\n" +"A = foo(bar(A))" #: ../Doc/whatsnew/2.6.rst:1376 msgid ":pep:`3129` - Class Decorators" @@ -2731,17 +3029,25 @@ msgid "" ">>> a/b\n" "Fraction(5, 3)" msgstr "" +">>> from fractions import Fraction\n" +">>> a = Fraction(2, 3)\n" +">>> b = Fraction(2, 5)\n" +">>> float(a), float(b)\n" +"(0.66666666666666663, 0.40000000000000002)\n" +">>> a+b\n" +"Fraction(16, 15)\n" +">>> a/b\n" +"Fraction(5, 3)" #: ../Doc/whatsnew/2.6.rst:1455 -#, fuzzy msgid "" "For converting floating-point numbers to rationals, the float type now has " "an :meth:`as_integer_ratio` method that returns the numerator and " "denominator for a fraction that evaluates to the same floating-point value::" msgstr "" -"Para convertir números de punto flotante en racionales, el tipo float tiene " -"ahora un método :meth:`as_integer_ratio()` que devuelve el numerador y el " -"denominador de una fracción que se evalúa al mismo valor de punto flotante::" +"Para convertir números de punto flotante en racionales, el tipo float ahora " +"tiene un método :meth:`as_integer_ratio` que devuelve el numerador y el " +"denominador de una fracción que evalúa el mismo valor de punto flotante:" #: ../Doc/whatsnew/2.6.rst:1460 msgid "" @@ -2752,6 +3058,12 @@ msgid "" ">>> (1./3) .as_integer_ratio()\n" "(6004799503160661L, 18014398509481984L)" msgstr "" +">>> (2.5) .as_integer_ratio()\n" +"(5, 2)\n" +">>> (3.1415) .as_integer_ratio()\n" +"(7074029114692207L, 2251799813685248L)\n" +">>> (1./3) .as_integer_ratio()\n" +"(6004799503160661L, 18014398509481984L)" #: ../Doc/whatsnew/2.6.rst:1467 msgid "" @@ -2838,6 +3150,14 @@ msgid "" ">>> f(**ud)\n" "['a', 'b']" msgstr "" +">>> def f(**kw):\n" +"... print sorted(kw)\n" +"...\n" +">>> ud=UserDict.UserDict()\n" +">>> ud['a'] = 1\n" +">>> ud['b'] = 'string'\n" +">>> f(**ud)\n" +"['a', 'b']" #: ../Doc/whatsnew/2.6.rst:1511 msgid "(Contributed by Alexander Belopolsky; :issue:`1686487`.)" @@ -2858,7 +3178,12 @@ msgid "" "...\n" ">>> f(1,2,3, *(4,5,6), keyword=13)\n" "(1, 2, 3, 4, 5, 6) {'keyword': 13}" -msgstr "" +msgstr "" +">>> def f(*args, **kw):\n" +"... print args, kw\n" +"...\n" +">>> f(1,2,3, *(4,5,6), keyword=13)\n" +"(1, 2, 3, 4, 5, 6) {'keyword': 13}" #: ../Doc/whatsnew/2.6.rst:1522 msgid "" @@ -2897,6 +3222,11 @@ msgid "" ">>> t.count(0)\n" "2" msgstr "" +">>> t = (0,1,2,3,4,0,1,2)\n" +">>> t.index(3)\n" +"3\n" +">>> t.count(0)\n" +"2" #: ../Doc/whatsnew/2.6.rst:1540 msgid "(Contributed by Raymond Hettinger)" @@ -2950,6 +3280,27 @@ msgid "" " def x(self, value):\n" " self._x = value / 2" msgstr "" +"class C(object):\n" +" @property\n" +" def x(self):\n" +" return self._x\n" +"\n" +" @x.setter\n" +" def x(self, value):\n" +" self._x = value\n" +"\n" +" @x.deleter\n" +" def x(self):\n" +" del self._x\n" +"\n" +"class D(C):\n" +" @C.x.getter\n" +" def x(self):\n" +" return self._x * 2\n" +"\n" +" @x.setter\n" +" def x(self, value):\n" +" self._x = value / 2" #: ../Doc/whatsnew/2.6.rst:1576 msgid "" @@ -2969,6 +3320,11 @@ msgid "" ">>> s.difference('246', '789')\n" "set(['1', '0', '3', '5'])" msgstr "" +">>> s=set('1234567890')\n" +">>> s.intersection('abc123', 'cdf246') # Intersection between all inputs\n" +"set(['2'])\n" +">>> s.difference('246', '789')\n" +"set(['1', '0', '3', '5'])" #: ../Doc/whatsnew/2.6.rst:1590 ../Doc/whatsnew/2.6.rst:1875 #: ../Doc/whatsnew/2.6.rst:1896 @@ -3027,6 +3383,14 @@ msgid "" ">>> b.hex()\n" "'0x1.5555555555555p-2'" msgstr "" +">>> a = 3.75\n" +">>> a.hex()\n" +"'0x1.e000000000000p+1'\n" +">>> float.fromhex('0x1.e000000000000p+1')\n" +"3.75\n" +">>> b=1./3\n" +">>> b.hex()\n" +"'0x1.5555555555555p-2'" #: ../Doc/whatsnew/2.6.rst:1619 msgid "" @@ -3147,7 +3511,6 @@ msgstr "" "`1591665`)" #: ../Doc/whatsnew/2.6.rst:1673 -#, fuzzy msgid "" "Instance method objects have new attributes for the object and function " "comprising the method; the new synonym for :attr:`!im_self` is :attr:" @@ -3156,10 +3519,10 @@ msgid "" "3.0." msgstr "" "Los objetos de método de instancia tienen nuevos atributos para el objeto y " -"la función que comprende el método; el nuevo sinónimo de :attr:`im_self` es :" -"attr:`__self__`, y :attr:`im_func` también está disponible como :attr:" -"`__func__`. Los nombres antiguos todavía se soportan en Python 2.6, pero han " -"desaparecido en la 3.0." +"la función que componen el método; el nuevo sinónimo de :attr:`!im_self` es :" +"attr:`~method.__self__`, y :attr:`!im_func` también está disponible como :" +"attr:`~method.__func__`. Los nombres antiguos aún se admiten en Python 2.6, " +"pero ya no están disponibles en la versión 3.0." #: ../Doc/whatsnew/2.6.rst:1679 msgid "" @@ -3277,14 +3640,13 @@ msgstr "" "de la cadena Unicode." #: ../Doc/whatsnew/2.6.rst:1735 -#, fuzzy msgid "" "The ``with`` statement now stores the :meth:`~object.__exit__` method on the " "stack, producing a small speedup. (Implemented by Jeffrey Yasskin.)" msgstr "" -"La sentencia ``with`` ahora almacena el método :meth:`__exit__` en la pila, " -"produciendo un pequeño aumento de velocidad. (Implementado por Jeffrey " -"Yasskin)" +"La declaración ``with`` ahora almacena el método :meth:`~object.__exit__` en " +"la pila, lo que produce una pequeña mejora en la velocidad. (Implementado " +"por Jeffrey Yasskin)." #: ../Doc/whatsnew/2.6.rst:1738 msgid "" @@ -3378,16 +3740,15 @@ msgstr "" "detalles." #: ../Doc/whatsnew/2.6.rst:1786 -#, fuzzy msgid "" "The :mod:`!asyncore` and :mod:`!asynchat` modules are being actively " "maintained again, and a number of patches and bugfixes were applied. " "(Maintained by Josiah Carlson; see :issue:`1736190` for one patch.)" msgstr "" -"Los módulos :mod:`asyncore` y :mod:`asynchat` están siendo mantenidos " -"activamente de nuevo, y se han aplicado varios parches y correcciones de " -"errores. (Mantenido por Josiah Carlson; véase :issue:`1736190` para un " -"parche)" +"Los módulos :mod:`!asyncore` y :mod:`!asynchat` están recibiendo " +"mantenimiento activo nuevamente y se aplicaron varios parches y correcciones " +"de errores. (Mantenimiento a cargo de Josiah Carlson; consulte :issue:" +"`1736190` para obtener un parche)." #: ../Doc/whatsnew/2.6.rst:1791 msgid "" @@ -3416,30 +3777,28 @@ msgstr "" "Barnes.)" #: ../Doc/whatsnew/2.6.rst:1803 -#, fuzzy msgid "" "The :mod:`!cgi` module will now read variables from the query string of an " "HTTP POST request. This makes it possible to use form actions with URLs " "that include query strings such as \"/cgi-bin/add.py?category=1\". " "(Contributed by Alexandre Fiori and Nubis; :issue:`1817`.)" msgstr "" -"El módulo :mod:`cgi` leerá ahora las variables de la cadena de consulta de " -"una petición HTTP POST. Esto permite utilizar acciones de formulario con " -"URLs que incluyen cadenas de consulta como \"/cgi-bin/add.py?category=1\". " -"(Contribución de Alexandre Fiori y Nubis; :issue:`1817`.)" +"El módulo :mod:`!cgi` ahora leerá variables de la cadena de consulta de una " +"solicitud HTTP POST. Esto permite utilizar acciones de formulario con URL " +"que incluyen cadenas de consulta como \"/cgi-bin/add.py?category=1\". " +"(Contribuido por Alexandre Fiori y Nubis; :issue:`1817`)." #: ../Doc/whatsnew/2.6.rst:1809 -#, fuzzy msgid "" "The :func:`parse_qs` and :func:`parse_qsl` functions have been relocated " "from the :mod:`!cgi` module to the :mod:`urlparse ` module. " "The versions still available in the :mod:`!cgi` module will trigger :exc:" "`PendingDeprecationWarning` messages in 2.6 (:issue:`600362`)." msgstr "" -"Las funciones :func:`parse_qs` y :func:`parse_qsl` han sido reubicadas del " -"módulo :mod:`cgi` al módulo :mod:`urlparse`. Las versiones aún disponibles " -"en el módulo :mod:`cgi` activarán los mensajes :exc:" -"`PendingDeprecationWarning` en la versión 2.6 (:issue:`600362`)." +"Las funciones :func:`parse_qs` y :func:`parse_qsl` se han reubicado del " +"módulo :mod:`!cgi` al módulo :mod:`urlparse `. Las versiones " +"que aún están disponibles en el módulo :mod:`!cgi` activarán los mensajes :" +"exc:`PendingDeprecationWarning` en la versión 2.6 (:issue:`600362`)." #: ../Doc/whatsnew/2.6.rst:1815 msgid "" @@ -3554,6 +3913,23 @@ msgid "" ">>> v2\n" "variable(id=1, name='amplitude', type='int', size=4)" msgstr "" +">>> var_type = collections.namedtuple('variable',\n" +"... 'id name type size')\n" +">>> # Names are separated by spaces or commas.\n" +">>> # 'id, name, type, size' would also work.\n" +">>> var_type._fields\n" +"('id', 'name', 'type', 'size')\n" +"\n" +">>> var = var_type(1, 'frequency', 'int', 4)\n" +">>> print var[0], var.id # Equivalent\n" +"1 1\n" +">>> print var[2], var.type # Equivalent\n" +"int int\n" +">>> var._asdict()\n" +"{'size': 4, 'type': 'int', 'id': 1, 'name': 'frequency'}\n" +">>> v2 = var._replace(name='amplitude')\n" +">>> v2\n" +"variable(id=1, name='amplitude', type='int', size=4)" #: ../Doc/whatsnew/2.6.rst:1870 msgid "" @@ -3592,9 +3968,18 @@ msgid "" ">>> dq\n" "deque([2, 3, 4], maxlen=3)" msgstr "" +">>> from collections import deque\n" +">>> dq=deque(maxlen=3)\n" +">>> dq\n" +"deque([], maxlen=3)\n" +">>> dq.append(1); dq.append(2); dq.append(3)\n" +">>> dq\n" +"deque([1, 2, 3], maxlen=3)\n" +">>> dq.append(4)\n" +">>> dq\n" +"deque([2, 3, 4], maxlen=3)" #: ../Doc/whatsnew/2.6.rst:1898 -#, fuzzy msgid "" "The :mod:`Cookie ` module's :class:`~http.cookies.Morsel` " "objects now support an :attr:`~http.cookies.Morsel.httponly` attribute. In " @@ -3602,10 +3987,11 @@ msgid "" "manipulated by JavaScript code. (Contributed by Arvin Schnell; :issue:" "`1638033`.)" msgstr "" -"Los objetos :mod:`Cookie` del módulo :class:`Morsel` soportan ahora un " -"atributo :attr:`httponly`. En algunos navegadores, las cookies con este " -"atributo no pueden ser accedidas o manipuladas por el código JavaScript. " -"(Contribución de Arvin Schnell; :issue:`1638033`.)" +"Los objetos :class:`~http.cookies.Morsel` del módulo :mod:`Cookie ` ahora admiten un atributo :attr:`~http.cookies.Morsel.httponly`. " +"En algunos navegadores, el código JavaScript no puede acceder ni manipular " +"las cookies con este atributo establecido. (Contribuido por Arvin Schnell; :" +"issue:`1638033`)." #: ../Doc/whatsnew/2.6.rst:1903 msgid "" @@ -3623,6 +4009,9 @@ msgid "" "# and affecting the rest of the line.\n" "stdscr.chgat(0, 21, curses.A_BOLD)" msgstr "" +"# Boldface text starting at y=0,x=21\n" +"# and affecting the rest of the line.\n" +"stdscr.chgat(0, 21, curses.A_BOLD)" #: ../Doc/whatsnew/2.6.rst:1913 msgid "" @@ -3670,6 +4059,12 @@ msgid "" ">>> Decimal(1000).log10()\n" "Decimal(\"3\")" msgstr "" +">>> Decimal(1).exp()\n" +"Decimal(\"2.718281828459045235360287471\")\n" +">>> Decimal(\"2.7182818\").ln()\n" +"Decimal(\"0.9999999895305022877376682436\")\n" +">>> Decimal(1000).log10()\n" +"Decimal(\"3\")" #: ../Doc/whatsnew/2.6.rst:1935 msgid "" @@ -3770,6 +4165,8 @@ msgid "" ">>> list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))\n" "[1, 2, 3, 5, 8, 9, 16]" msgstr "" +">>> list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))\n" +"[1, 2, 3, 5, 8, 9, 16]" #: ../Doc/whatsnew/2.6.rst:1978 msgid "" @@ -3794,16 +4191,16 @@ msgstr "" "el método :meth:`list.sort`. (Contribución de Raymond Hettinger)" #: ../Doc/whatsnew/2.6.rst:1989 -#, fuzzy msgid "" "An optional ``timeout`` parameter, specifying a timeout measured in seconds, " "was added to the :class:`httplib.HTTPConnection ` and :class:`HTTPSConnection ` " "class constructors. (Added by Facundo Batista.)" msgstr "" -"Se ha añadido un parámetro opcional ``timeout``, que especifica un tiempo de " -"espera medido en segundos, a los constructores de las clases :class:`httplib." -"HTTPConnection` y :class:`HTTPSConnection`. (Añadido por Facundo Batista)" +"Se agregó un parámetro opcional ``timeout`` a los constructores de clases :" +"class:`httplib.HTTPConnection ` y :class:" +"`HTTPSConnection `, que especifica un tiempo de " +"espera medido en segundos. (Agregado por Facundo Batista)." #: ../Doc/whatsnew/2.6.rst:1994 msgid "" @@ -3844,6 +4241,8 @@ msgid "" ">>> tuple(itertools.izip_longest([1,2,3], [1,2,3,4,5]))\n" "((1, 1), (2, 2), (3, 3), (None, 4), (None, 5))" msgstr "" +">>> tuple(itertools.izip_longest([1,2,3], [1,2,3,4,5]))\n" +"((1, 1), (2, 2), (3, 3), (None, 4), (None, 5))" #: ../Doc/whatsnew/2.6.rst:2013 msgid "" @@ -3862,6 +4261,10 @@ msgid "" " (2, 4), (2, 5), (2, 6),\n" " (3, 4), (3, 5), (3, 6)]" msgstr "" +">>> list(itertools.product([1,2,3], [4,5,6]))\n" +"[(1, 4), (1, 5), (1, 6),\n" +" (2, 4), (2, 5), (2, 6),\n" +" (3, 4), (3, 5), (3, 6)]" #: ../Doc/whatsnew/2.6.rst:2022 msgid "" @@ -3880,6 +4283,9 @@ msgid "" "[(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2),\n" " (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)]" msgstr "" +">>> list(itertools.product([1,2], repeat=3))\n" +"[(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2),\n" +" (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)]" #: ../Doc/whatsnew/2.6.rst:2031 msgid "With two iterables, *2N*-tuples are returned. ::" @@ -3893,6 +4299,11 @@ msgid "" " (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),\n" " (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]" msgstr "" +">>> list(itertools.product([1,2], [3,4], repeat=2))\n" +"[(1, 3, 1, 3), (1, 3, 1, 4), (1, 3, 2, 3), (1, 3, 2, 4),\n" +" (1, 4, 1, 3), (1, 4, 1, 4), (1, 4, 2, 3), (1, 4, 2, 4),\n" +" (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),\n" +" (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]" #: ../Doc/whatsnew/2.6.rst:2039 msgid "" @@ -3912,6 +4323,13 @@ msgid "" "[('1', '2', '3'), ('1', '2', '4'),\n" " ('1', '3', '4'), ('2', '3', '4')]" msgstr "" +">>> list(itertools.combinations('123', 2))\n" +"[('1', '2'), ('1', '3'), ('2', '3')]\n" +">>> list(itertools.combinations('123', 3))\n" +"[('1', '2', '3')]\n" +">>> list(itertools.combinations('1234', 3))\n" +"[('1', '2', '3'), ('1', '2', '4'),\n" +" ('1', '3', '4'), ('2', '3', '4')]" #: ../Doc/whatsnew/2.6.rst:2050 msgid "" @@ -3931,6 +4349,11 @@ msgid "" " (3, 1), (3, 2), (3, 4),\n" " (4, 1), (4, 2), (4, 3)]" msgstr "" +">>> list(itertools.permutations([1,2,3,4], 2))\n" +"[(1, 2), (1, 3), (1, 4),\n" +" (2, 1), (2, 3), (2, 4),\n" +" (3, 1), (3, 2), (3, 4),\n" +" (4, 1), (4, 2), (4, 3)]" #: ../Doc/whatsnew/2.6.rst:2060 msgid "" @@ -3951,6 +4374,8 @@ msgid "" ">>> list(itertools.chain.from_iterable([[1,2,3], [4,5,6]]))\n" "[1, 2, 3, 4, 5, 6]" msgstr "" +">>> list(itertools.chain.from_iterable([[1,2,3], [4,5,6]]))\n" +"[1, 2, 3, 4, 5, 6]" #: ../Doc/whatsnew/2.6.rst:2070 msgid "(All contributed by Raymond Hettinger.)" @@ -4112,6 +4537,10 @@ msgid "" ">>> replacer('old wine in old bottles')\n" "'new wine in new bottles'" msgstr "" +">>> # Equivalent to lambda s: s.replace('old', 'new')\n" +">>> replacer = operator.methodcaller('replace', 'old', 'new')\n" +">>> replacer('old wine in old bottles')\n" +"'new wine in new bottles'" #: ../Doc/whatsnew/2.6.rst:2145 msgid "(Contributed by Georg Brandl, after a suggestion by Gregory Petrosyan.)" @@ -4135,6 +4564,12 @@ msgid "" ">>> inst_name(help)\n" "'_Helper'" msgstr "" +">>> inst_name = operator.attrgetter(\n" +"... '__class__.__name__')\n" +">>> inst_name('')\n" +"'str'\n" +">>> inst_name(help)\n" +"'_Helper'" #: ../Doc/whatsnew/2.6.rst:2157 msgid "(Contributed by Georg Brandl, after a suggestion by Barry Warsaw.)" @@ -4302,6 +4737,16 @@ msgid "" " +-- StandardError\n" " ..." msgstr "" +">>> import pkgutil\n" +">>> print pkgutil.get_data('test', 'exception_hierarchy.txt')\n" +"BaseException\n" +" +-- SystemExit\n" +" +-- KeyboardInterrupt\n" +" +-- GeneratorExit\n" +" +-- Exception\n" +" +-- StopIteration\n" +" +-- StandardError\n" +" ..." #: ../Doc/whatsnew/2.6.rst:2236 msgid "(Contributed by Paul Moore; :issue:`2439`.)" @@ -4389,15 +4834,14 @@ msgstr "" "`3487`.)" #: ../Doc/whatsnew/2.6.rst:2276 -#, fuzzy msgid "" "The :mod:`rlcompleter` module's :meth:`Completer.complete` method will now " "ignore exceptions triggered while evaluating a name. (Fixed by Lorenz " "Quack; :issue:`2250`.)" msgstr "" -"El método :meth:`Completer.complete()` del módulo :mod:`rlcompleter` ahora " -"ignorará las excepciones que se produzcan al evaluar un nombre. (Corregido " -"por Lorenz Quack; :issue:`2250`.)" +"El método :meth:`Completer.complete` del módulo :mod:`rlcompleter` ahora " +"ignorará las excepciones activadas al evaluar un nombre. (Corregido por " +"Lorenz Quack; :issue:`2250`)." #: ../Doc/whatsnew/2.6.rst:2280 msgid "" @@ -4462,6 +4906,8 @@ msgid "" "shutil.copytree('Doc/library', '/tmp/library',\n" " ignore=shutil.ignore_patterns('*~', '.svn'))" msgstr "" +"shutil.copytree('Doc/library', '/tmp/library',\n" +" ignore=shutil.ignore_patterns('*~', '.svn'))" #: ../Doc/whatsnew/2.6.rst:2310 msgid "(Contributed by Tarek Ziadé; :issue:`2663`.)" @@ -4602,7 +5048,6 @@ msgstr "" "funcione con IPv6." #: ../Doc/whatsnew/2.6.rst:2374 -#, fuzzy msgid "" "The base classes in the :mod:`SocketServer ` module now " "support calling a :meth:`~socketserver.BaseServer.handle_timeout` method " @@ -4613,13 +5058,15 @@ msgid "" "check for a shutdown request. (Contributed by Pedro Werneck and Jeffrey " "Yasskin; :issue:`742598`, :issue:`1193577`.)" msgstr "" -"Las clases base del módulo :mod:`SocketServer` ahora soportan la llamada a " -"un método :meth:`handle_timeout` después de un periodo de inactividad " -"especificado por el atributo :attr:`timeout` del servidor. (Contribuido por " -"Michael Pomraning.) El método :meth:`serve_forever` ahora toma un intervalo " -"de sondeo opcional medido en segundos, controlando la frecuencia con la que " -"el servidor comprobará si hay una solicitud de cierre. (Contribuido por " -"Pedro Werneck y Jeffrey Yasskin; :issue:`742598`, :issue:`1193577`.)" +"Las clases base del módulo :mod:`SocketServer ` ahora admiten " +"la llamada a un método :meth:`~socketserver.BaseServer.handle_timeout` " +"después de un período de inactividad especificado por el atributo :attr:" +"`~socketserver.BaseServer.timeout` del servidor. (Contribuido por Michael " +"Pomraning.) El método :meth:`~socketserver.BaseServer.serve_forever` ahora " +"utiliza un intervalo de sondeo opcional medido en segundos, que controla la " +"frecuencia con la que el servidor comprobará si hay una solicitud de " +"apagado. (Contribuido por Pedro Werneck y Jeffrey Yasskin; :issue:`742598`, :" +"issue:`1193577`.)" #: ../Doc/whatsnew/2.6.rst:2383 msgid "" @@ -4638,7 +5085,6 @@ msgstr "" "el carácter de formato ``'?'``. (Aportado por David Remahl.)" #: ../Doc/whatsnew/2.6.rst:2391 -#, fuzzy msgid "" "The :class:`~subprocess.Popen` objects provided by the :mod:`subprocess` " "module now have :meth:`~subprocess.Popen.terminate`, :meth:`~subprocess." @@ -4647,11 +5093,12 @@ msgid "" "and all these methods are aliases for the Win32 API function :c:func:`!" "TerminateProcess`. (Contributed by Christian Heimes.)" msgstr "" -"Los objetos :class:`Popen` proporcionados por el módulo :mod:`subprocess` " -"tienen ahora métodos :meth:`terminate`, :meth:`kill` y :meth:`send_signal`. " -"En Windows, :meth:`send_signal` sólo soporta la señal :const:`SIGTERM`, y " -"todos estos métodos son alias de la función de la API Win32 :c:func:" -"`TerminateProcess`. (Contribuido por Christian Heimes.)" +"Los objetos :class:`~subprocess.Popen` proporcionados por el módulo :mod:" +"`subprocess` ahora tienen los métodos :meth:`~subprocess.Popen.terminate`, :" +"meth:`~subprocess.Popen.kill` y :meth:`~subprocess.Popen.send_signal`. En " +"Windows, :meth:`!send_signal` solo admite la señal :py:const:`~signal." +"SIGTERM` y todos estos métodos son alias de la función API Win32 :c:func:`!" +"TerminateProcess`. (Contribuido por Christian Heimes)." #: ../Doc/whatsnew/2.6.rst:2398 msgid "" @@ -4748,6 +5195,8 @@ msgid "" "tar = tarfile.open(\"output.tar\", \"w\",\n" " format=tarfile.PAX_FORMAT)" msgstr "" +"tar = tarfile.open(\"output.tar\", \"w\",\n" +" format=tarfile.PAX_FORMAT)" #: ../Doc/whatsnew/2.6.rst:2444 msgid "" @@ -4787,15 +5236,14 @@ msgid "(All changes contributed by Lars Gustäbel)." msgstr "(Todos los cambios han sido aportados por Lars Gustäbel)." #: ../Doc/whatsnew/2.6.rst:2462 -#, fuzzy msgid "" "An optional ``timeout`` parameter was added to the :class:`!telnetlib." "Telnet` class constructor, specifying a timeout measured in seconds. (Added " "by Facundo Batista.)" msgstr "" "Se agregó un parámetro opcional ``timeout`` al constructor de la clase :" -"class:`telnetlib.Telnet`, especificando un tiempo de espera medido en " -"segundos. (Añadido por Facundo Batista)" +"class:`!telnetlib.Telnet`, que especifica un tiempo de espera medido en " +"segundos. (Agregado por Facundo Batista)." #: ../Doc/whatsnew/2.6.rst:2466 msgid "" @@ -4834,17 +5282,17 @@ msgstr "" "Belopolsky; :issue:`2021`.)" #: ../Doc/whatsnew/2.6.rst:2481 -#, fuzzy msgid "" "The :mod:`test.test_support ` module gained a number of " "context managers useful for writing tests. :func:`~test.support.os_helper." "EnvironmentVarGuard` is a context manager that temporarily changes " "environment variables and automatically restores them to their old values." msgstr "" -"El módulo :mod:`test.test_support` obtuvo una serie de gestores de contexto " -"útiles para escribir pruebas. :func:`EnvironmentVarGuard` es un gestor de " -"contexto que cambia temporalmente las variables de entorno y las restaura " -"automáticamente a sus valores anteriores." +"El módulo :mod:`test.test_support ` ha incorporado una serie " +"de administradores de contexto útiles para escribir pruebas. :func:`~test." +"support.os_helper.EnvironmentVarGuard` es un administrador de contexto que " +"cambia temporalmente las variables de entorno y las restaura automáticamente " +"a sus valores anteriores." #: ../Doc/whatsnew/2.6.rst:2487 msgid "" @@ -4865,6 +5313,10 @@ msgid "" " f = urllib.urlopen('https://sf.net')\n" " ..." msgstr "" +"with test_support.TransientResource(IOError,\n" +" errno=errno.ETIMEDOUT):\n" +" f = urllib.urlopen('https://sf.net')\n" +" ..." #: ../Doc/whatsnew/2.6.rst:2498 msgid "" @@ -4884,6 +5336,11 @@ msgid "" " assert str(wrec.message) == \"function is outdated\"\n" " assert len(wrec.warnings) == 1, \"Multiple warnings raised\"" msgstr "" +"with test_support.check_warnings() as wrec:\n" +" warnings.simplefilter(\"always\")\n" +" # ... code that triggers a warning ...\n" +" assert str(wrec.message) == \"function is outdated\"\n" +" assert len(wrec.warnings) == 1, \"Multiple warnings raised\"" #: ../Doc/whatsnew/2.6.rst:2508 msgid "(Contributed by Brett Cannon.)" @@ -4915,6 +5372,19 @@ msgid "" " whitespace.\n" ">>>" msgstr "" +">>> S = \"\"\"This sentence has a bunch of\n" +"... extra whitespace.\"\"\"\n" +">>> print textwrap.fill(S, width=15)\n" +"This sentence\n" +"has a bunch\n" +"of extra\n" +"whitespace.\n" +">>> print textwrap.fill(S, drop_whitespace=False, width=15)\n" +"This sentence\n" +" has a bunch\n" +" of extra\n" +" whitespace.\n" +">>>" #: ../Doc/whatsnew/2.6.rst:2529 msgid "(Contributed by Dwayne Bailey; :issue:`1581073`.)" @@ -5008,11 +5478,9 @@ msgstr "" "nuevo sistema de coordenadas." #: ../Doc/whatsnew/2.6.rst:2569 -#, fuzzy msgid "Turtles now have an :meth:`undo` method that can roll back actions." msgstr "" -"Las tortugas ahora tienen un método :meth:`undo()` que puede revertir las " -"acciones." +"Las tortugas ahora tienen un método :meth:`undo` que puede revertir acciones." #: ../Doc/whatsnew/2.6.rst:2570 msgid "" @@ -5043,7 +5511,6 @@ msgid "(:issue:`1513695`)" msgstr "(:issue:`1513695`)" #: ../Doc/whatsnew/2.6.rst:2579 -#, fuzzy msgid "" "An optional ``timeout`` parameter was added to the :func:`urllib.urlopen " "` function and the :class:`urllib.ftpwrapper` class " @@ -5051,10 +5518,11 @@ msgid "" "function. The parameter specifies a timeout measured in seconds. For " "example::" msgstr "" -"Se ha añadido un parámetro opcional ``timeout`` a la función :func:`urllib." -"urlopen` y al constructor de la clase :class:`urllib.ftpwrapper`, así como a " -"la función :func:`urllib2.urlopen`. El parámetro especifica un tiempo de " -"espera medido en segundos. Por ejemplo::" +"Se agregó un parámetro opcional ``timeout`` a la función :func:`urllib." +"urlopen ` y al constructor de la clase :class:" +"`urllib.ftpwrapper`, así como a la función :func:`urllib2.urlopen `. El parámetro especifica un tiempo de espera medido en " +"segundos. Por ejemplo:" #: ../Doc/whatsnew/2.6.rst:2585 msgid "" @@ -5065,6 +5533,12 @@ msgid "" "urllib2.URLError: \n" ">>>" msgstr "" +">>> u = urllib2.urlopen(\"http://slow.example.com\",\n" +" timeout=3)\n" +"Traceback (most recent call last):\n" +" ...\n" +"urllib2.URLError: \n" +">>>" #: ../Doc/whatsnew/2.6.rst:2592 msgid "(Added by Facundo Batista.)" @@ -5103,7 +5577,6 @@ msgstr "" "`3781`)." #: ../Doc/whatsnew/2.6.rst:2607 -#, fuzzy msgid "" "The XML-RPC :class:`SimpleXMLRPCServer ` and :class:" "`DocXMLRPCServer ` classes can now be prevented from " @@ -5114,13 +5587,14 @@ msgid "" "begin listening for connections. (Contributed by Peter Parente; :issue:" "`1599845`.)" msgstr "" -"Las clases XML-RPC :class:`SimpleXMLRPCServer` y :class:`DocXMLRPCServer` " -"pueden ahora evitar que se abran inmediatamente y se vinculen a su socket " -"pasando ``False`` como parámetro del constructor *bind_and_activate*. Esto " -"puede usarse para modificar el atributo :attr:`allow_reuse_address` de la " -"instancia antes de llamar a los métodos :meth:`server_bind` y :meth:" -"`server_activate` para abrir el socket y comenzar a escuchar conexiones. " -"(Contribuido por Peter Parente; :issue:`1599845`.)" +"Ahora es posible evitar que las clases XML-RPC :class:`SimpleXMLRPCServer " +"` y :class:`DocXMLRPCServer ` se abran y " +"enlacen inmediatamente con su socket al pasar ``False`` como parámetro del " +"constructor *bind_and_activate*. Esto se puede utilizar para modificar el " +"atributo :attr:`allow_reuse_address` de la instancia antes de llamar a los " +"métodos :meth:`server_bind` y :meth:`server_activate` para abrir el socket y " +"comenzar a escuchar conexiones. (Contribuido por Peter Parente; :issue:" +"`1599845`)." #: ../Doc/whatsnew/2.6.rst:2616 msgid "" @@ -5141,7 +5615,6 @@ msgstr "" "proyecto para el Summer of Code 2007 de Google)" #: ../Doc/whatsnew/2.6.rst:2624 -#, fuzzy msgid "" "The :mod:`xmlrpclib ` module no longer automatically " "converts :class:`datetime.date` and :class:`datetime.time` to the :class:" @@ -5153,15 +5626,15 @@ msgid "" "by using ```` in XML-RPC responses (contributed by Riku Lindblad; :issue:" "`2985`)." msgstr "" -"El módulo :mod:`xmlrpclib` ya no convierte automáticamente las instancias :" +"El módulo :mod:`xmlrpclib ` ya no convierte automáticamente :" "class:`datetime.date` y :class:`datetime.time` al tipo :class:`xmlrpclib." -"DateTime`; la semántica de conversión no era necesariamente correcta para " -"todas las aplicaciones. El código que utiliza :mod:`xmlrpclib` debe " -"convertir las instancias :class:`date` y :class:`~datetime.time`. (:issue:" -"`1330538`) El código también puede manejar fechas anteriores a 1900 " -"(contribución de Ralf Schmitt; :issue:`2014`) y enteros de 64 bits " -"representados mediante el uso de ```` en las respuestas XML-RPC " -"(contribución de Riku Lindblad; :issue:`2985`)." +"DateTime `; la semántica de conversión no era " +"necesariamente correcta para todas las aplicaciones. El código que utiliza :" +"mod:`!xmlrpclib` debería convertir las instancias :class:`date` y :class:" +"`~datetime.time`. (:issue:`1330538`) El código también puede manejar fechas " +"anteriores a 1900 (contribuido por Ralf Schmitt; :issue:`2014`) y números " +"enteros de 64 bits representados mediante el uso de ```` en respuestas " +"XML-RPC (contribuido por Riku Lindblad; :issue:`2985`)." #: ../Doc/whatsnew/2.6.rst:2634 msgid "" @@ -5185,6 +5658,14 @@ msgid "" "# Unpack all the files in the archive.\n" "z.extractall()" msgstr "" +"z = zipfile.ZipFile('python-251.zip')\n" +"\n" +"# Unpack a single file, writing it relative\n" +"# to the /tmp directory.\n" +"z.extract('Python/sysmodule.c', '/tmp')\n" +"\n" +"# Unpack all the files in the archive.\n" +"z.extractall()" #: ../Doc/whatsnew/2.6.rst:2648 msgid "(Contributed by Alan McIntyre; :issue:`467924`.)" @@ -5249,6 +5730,15 @@ msgid "" "\"\"\")\n" "print ast.dump(t)" msgstr "" +"import ast\n" +"\n" +"t = ast.parse(\"\"\"\n" +"d = {}\n" +"for i in 'abcdefghijklm':\n" +" d[i + i] = ord(i) - ord('a') + 1\n" +"print d\n" +"\"\"\")\n" +"print ast.dump(t)" #: ../Doc/whatsnew/2.6.rst:2685 msgid "This outputs a deeply nested tree::" @@ -5287,6 +5777,36 @@ msgid "" " ], nl=True)\n" " ])" msgstr "" +"Module(body=[\n" +" Assign(targets=[\n" +" Name(id='d', ctx=Store())\n" +" ], value=Dict(keys=[], values=[]))\n" +" For(target=Name(id='i', ctx=Store()),\n" +" iter=Str(s='abcdefghijklm'), body=[\n" +" Assign(targets=[\n" +" Subscript(value=\n" +" Name(id='d', ctx=Load()),\n" +" slice=\n" +" Index(value=\n" +" BinOp(left=Name(id='i', ctx=Load()), op=Add(),\n" +" right=Name(id='i', ctx=Load()))), ctx=Store())\n" +" ], value=\n" +" BinOp(left=\n" +" BinOp(left=\n" +" Call(func=\n" +" Name(id='ord', ctx=Load()), args=[\n" +" Name(id='i', ctx=Load())\n" +" ], keywords=[], starargs=None, kwargs=None),\n" +" op=Sub(), right=Call(func=\n" +" Name(id='ord', ctx=Load()), args=[\n" +" Str(s='a')\n" +" ], keywords=[], starargs=None, kwargs=None)),\n" +" op=Add(), right=Num(n=1)))\n" +" ], orelse=[])\n" +" Print(dest=None, values=[\n" +" Name(id='d', ctx=Load())\n" +" ], nl=True)\n" +" ])" #: ../Doc/whatsnew/2.6.rst:2718 msgid "" @@ -5315,6 +5835,13 @@ msgid "" " ...\n" "ValueError: malformed string" msgstr "" +">>> literal = '(\"a\", \"b\", {2:4, 3:8, 1:2})'\n" +">>> print ast.literal_eval(literal)\n" +"('a', 'b', {1: 2, 2: 4, 3: 8})\n" +">>> print ast.literal_eval('\"a\" + \"b\"')\n" +"Traceback (most recent call last):\n" +" ...\n" +"ValueError: malformed string" #: ../Doc/whatsnew/2.6.rst:2734 msgid "" @@ -5414,6 +5941,13 @@ msgid "" ">>> json.loads(in_json) # Decode into a Python object\n" "{\"spam\": \"foo\", \"parrot\": 42}" msgstr "" +">>> import json\n" +">>> data = {\"spam\": \"foo\", \"parrot\": 42}\n" +">>> in_json = json.dumps(data) # Encode the data\n" +">>> in_json\n" +"'{\"parrot\": 42, \"spam\": \"foo\"}'\n" +">>> json.loads(in_json) # Decode into a Python object\n" +"{\"spam\": \"foo\", \"parrot\": 42}" #: ../Doc/whatsnew/2.6.rst:2788 msgid "" @@ -5484,6 +6018,27 @@ msgid "" "# read/writePlist accepts file-like objects as well as paths.\n" "plistlib.writePlist(data_struct, sys.stdout)" msgstr "" +"import sys\n" +"import plistlib\n" +"import datetime\n" +"\n" +"# Create data structure\n" +"data_struct = dict(lastAccessed=datetime.datetime.now(),\n" +" version=1,\n" +" categories=('Personal','Shared','Private'))\n" +"\n" +"# Create string containing XML.\n" +"plist_str = plistlib.writePlistToString(data_struct)\n" +"new_struct = plistlib.readPlistFromString(plist_str)\n" +"print data_struct\n" +"print new_struct\n" +"\n" +"# Write data structure to a file and read it back.\n" +"plistlib.writePlist(data_struct, '/tmp/customizations.plist')\n" +"new_struct = plistlib.readPlist('/tmp/customizations.plist')\n" +"\n" +"# read/writePlist accepts file-like objects as well as paths.\n" +"plistlib.writePlist(data_struct, sys.stdout)" #: ../Doc/whatsnew/2.6.rst:2837 msgid "ctypes Enhancements" @@ -5624,15 +6179,14 @@ msgstr "" "produce un :exc:`TypeError`." #: ../Doc/whatsnew/2.6.rst:2911 -#, fuzzy msgid "" "Changes to the :class:`Exception` interface as dictated by :pep:`352` " "continue to be made. For 2.6, the :attr:`!message` attribute is being " "deprecated in favor of the :attr:`~BaseException.args` attribute." msgstr "" -"Los cambios en la interfaz :class:`Exception` dictados por :pep:`352` siguen " -"realizándose. En la versión 2.6, el atributo :attr:`message` queda obsoleto " -"en favor del atributo :attr:`args`." +"Se siguen realizando cambios en la interfaz :class:`Exception` según lo " +"dictado por :pep:`352`. En la versión 2.6, el atributo :attr:`!message` se " +"está reemplazando por el atributo :attr:`~BaseException.args`." #: ../Doc/whatsnew/2.6.rst:2916 msgid "" @@ -5646,7 +6200,6 @@ msgstr "" "se importen." #: ../Doc/whatsnew/2.6.rst:2921 -#, fuzzy msgid "" "The list of deprecated modules is: :mod:`!audiodev`, :mod:`!bgenlocations`, :" "mod:`!buildtools`, :mod:`!bundlebuilder`, :mod:`!Canvas`, :mod:`!compiler`, :" @@ -5656,76 +6209,68 @@ msgid "" "mod:`!statvfs`, :mod:`!sunaudiodev`, :mod:`!test.testall`, and :mod:`!" "toaiff`." msgstr "" -"La lista de módulos obsoletos es: :mod:`audiodev`, :mod:`bgenlocations`, :" -"mod:`buildtools`, :mod:`bundlebuilder`, :mod:`Canvas`, :mod:`compiler`, :mod:" -"`dircache`, :mod:`dl`, :mod:`fpformat`, :mod:`gensuitemodule`, :mod:" -"`ihooks`, :mod:`imageop`, :mod:`imgfile`, :mod:`linuxaudiodev`, :mod:" -"`mhlib`, :mod:`mimetools`, :mod:`multifile`, :mod:`new`, :mod:`pure`, :mod:" -"`statvfs`, :mod:`sunaudiodev`, :mod:`test.testall`, y :mod:`toaiff`." +"La lista de módulos obsoletos es: :mod:`!audiodev`, :mod:`!bgenlocations`, :" +"mod:`!buildtools`, :mod:`!bundlebuilder`, :mod:`!Canvas`, :mod:`!compiler`, :" +"mod:`!dircache`, :mod:`!dl`, :mod:`!fpformat`, :mod:`!gensuitemodule`, :mod:" +"`!ihooks`, :mod:`!imageop`, :mod:`!imgfile`, :mod:`!linuxaudiodev`, :mod:`!" +"mhlib`, :mod:`!mimetools`, :mod:`!multifile`, :mod:`!new`, :mod:`!pure`, :" +"mod:`!statvfs`, :mod:`!sunaudiodev`, :mod:`!test.testall` y :mod:`!toaiff`." #: ../Doc/whatsnew/2.6.rst:2946 -#, fuzzy msgid "The :mod:`!gopherlib` module has been removed." -msgstr "El módulo :mod:`gopherlib` ha sido eliminado." +msgstr "El módulo :mod:`!gopherlib` ha sido eliminado." #: ../Doc/whatsnew/2.6.rst:2948 -#, fuzzy msgid "" "The :mod:`!MimeWriter` module and :mod:`!mimify` module have been " "deprecated; use the :mod:`email` package instead." msgstr "" -"El módulo :mod:`MimeWriter` y el módulo :mod:`mimify` han quedado obsoletos; " -"utilice en su lugar el paquete :mod:`email`." +"El módulo :mod:`!MimeWriter` y el módulo :mod:`!mimify` han quedado " +"obsoletos; utilice en su lugar el paquete :mod:`email`." #: ../Doc/whatsnew/2.6.rst:2952 -#, fuzzy msgid "" "The :mod:`!md5` module has been deprecated; use the :mod:`hashlib` module " "instead." msgstr "" -"El módulo :mod:`md5` ha quedado obsoleto; utilice en su lugar el módulo :mod:" -"`hashlib`." +"El módulo :mod:`!md5` ha quedado obsoleto; utilice en su lugar el módulo :" +"mod:`hashlib`." #: ../Doc/whatsnew/2.6.rst:2955 -#, fuzzy msgid "" "The :mod:`!posixfile` module has been deprecated; :func:`fcntl.lockf` " "provides better locking." msgstr "" -"El módulo :mod:`posixfile` ha quedado obsoleto; :func:`fcntl.lockf` " +"El módulo :mod:`!posixfile` ha quedado obsoleto; :func:`fcntl.lockf` " "proporciona un mejor bloqueo." #: ../Doc/whatsnew/2.6.rst:2958 -#, fuzzy msgid "" "The :mod:`!popen2` module has been deprecated; use the :mod:`subprocess` " "module." msgstr "" -"El módulo :mod:`popen2` ha quedado obsoleto; utilice el módulo :mod:" +"El módulo :mod:`!popen2` ha quedado obsoleto; utilice el módulo :mod:" "`subprocess`." #: ../Doc/whatsnew/2.6.rst:2961 -#, fuzzy msgid "The :mod:`!rgbimg` module has been removed." -msgstr "Se ha eliminado el módulo :mod:`rgbimg`." +msgstr "Se ha eliminado el módulo :mod:`!rgbimg`." #: ../Doc/whatsnew/2.6.rst:2963 -#, fuzzy msgid "" "The :mod:`!sets` module has been deprecated; it's better to use the built-" "in :class:`set` and :class:`frozenset` types." msgstr "" -"El módulo :mod:`sets` ha quedado obsoleto; es mejor utilizar los tipos " +"El módulo :mod:`!sets` ha quedado obsoleto; es mejor utilizar los tipos " "incorporados :class:`set` y :class:`frozenset`." #: ../Doc/whatsnew/2.6.rst:2966 -#, fuzzy msgid "" "The :mod:`!sha` module has been deprecated; use the :mod:`hashlib` module " "instead." msgstr "" -"El módulo :mod:`sha` ha quedado obsoleto; utilice en su lugar el módulo :mod:" -"`hashlib`." +"El módulo :mod:`!sha` ha quedado obsoleto; utilice en su lugar el módulo :" +"mod:`hashlib`." #: ../Doc/whatsnew/2.6.rst:2974 msgid "Build and C API Changes" @@ -5781,6 +6326,10 @@ msgid "" "directory containing the script named by ``sys.argv[0]`` depending on the " "value of an *updatepath* parameter." msgstr "" +"Una nueva función agregada en Python 2.6.6, :c:func:`!PySys_SetArgvEx`, " +"establece el valor de ``sys.argv`` y opcionalmente puede actualizar ``sys." +"path`` para incluir el directorio que contiene el script nombrado por ``sys." +"argv[0]`` dependiendo del valor de un parámetro *updatepath*." #: ../Doc/whatsnew/2.6.rst:3000 msgid "" @@ -5792,6 +6341,14 @@ msgid "" "(say, a file named :file:`os.py`) that your application would then import " "and run." msgstr "" +"Esta función se agregó para cerrar un agujero de seguridad en las " +"aplicaciones que incorporan Python. La función anterior, :c:func:`!" +"PySys_SetArgv`, siempre actualizaba ``sys.path`` y, a veces, añadía el " +"directorio actual. Esto significaba que, si ejecutaba una aplicación que " +"incorporaba Python en un directorio controlado por otra persona, los " +"atacantes podían colocar un módulo troyano en el directorio (por ejemplo, un " +"archivo llamado :file:`os.py`) que su aplicación luego importaría y " +"ejecutaría." #: ../Doc/whatsnew/2.6.rst:3008 msgid "" @@ -5804,12 +6361,22 @@ msgid "" "and call ``PyRun_SimpleString(\"sys.path.pop(0)\\n\")`` afterwards to " "discard the first ``sys.path`` component." msgstr "" +"Si mantiene una aplicación C/C++ que incorpora Python, verifique si está " +"llamando a :c:func:`!PySys_SetArgv` y considere cuidadosamente si la " +"aplicación debería usar :c:func:`!PySys_SetArgvEx` con *updatepath* " +"configurado como falso. Tenga en cuenta que el uso de esta función romperá " +"la compatibilidad con las versiones 2.6.5 y anteriores de Python; si tiene " +"que continuar trabajando con versiones anteriores, puede dejar la llamada a :" +"c:func:`!PySys_SetArgv` y llamar a ``PyRun_SimpleString(\"sys.path." +"pop(0)\\n\")`` después para descartar el primer componente ``sys.path``." #: ../Doc/whatsnew/2.6.rst:3018 msgid "" "Security issue reported as :cve:`2008-5983`; discussed in :gh:`50003`, and " "fixed by Antoine Pitrou." msgstr "" +"Problema de seguridad informado como :cve:`2008-5983`; discutido en :gh:" +"`50003` y solucionado por Antoine Pitrou." #: ../Doc/whatsnew/2.6.rst:3021 msgid "" @@ -5876,7 +6443,6 @@ msgstr "" "genera un :exc:`ImportError`. (Contribuido por Christian Heimes.)" #: ../Doc/whatsnew/2.6.rst:3052 -#, fuzzy msgid "" "Several functions return information about the platform's floating-point " "support. :c:func:`PyFloat_GetMax` returns the maximum representable " @@ -5887,14 +6453,14 @@ msgid "" "and the next largest value representable), and several others. (Contributed " "by Christian Heimes; :issue:`1534`.)" msgstr "" -"Varias funciones devuelven información sobre el soporte de punto flotante de " -"la plataforma. :c:func:`PyFloat_GetMax` devuelve el máximo valor de punto " -"flotante representable, y :c:func:`PyFloat_GetMin` devuelve el mínimo valor " -"positivo. :c:func:`PyFloat_GetInfo` devuelve un objeto que contiene más " -"información del fichero :file:`float.h`, como ``\"mant_dig\"`` (número de " -"dígitos en la mantisa), ``\"epsilon\"`` (diferencia más pequeña entre 1.0 y " -"el siguiente valor más grande representable), y varios otros. (Contribución " -"de Christian Heimes; :issue:`1534`.)" +"Varias funciones devuelven información sobre la compatibilidad de punto " +"flotante de la plataforma. :c:func:`PyFloat_GetMax` devuelve el valor máximo " +"representable de punto flotante y :c:func:`PyFloat_GetMin` devuelve el valor " +"positivo mínimo. :c:func:`PyFloat_GetInfo` devuelve un objeto que contiene " +"más información del archivo :file:`float.h`, como ``\"mant_dig\"`` (número " +"de dígitos en la mantisa), ``\"epsilon\"`` (diferencia más pequeña entre 1.0 " +"y el siguiente valor más grande representable) y varios otros. (Contribuido " +"por Christian Heimes; :issue:`1534`.)" #: ../Doc/whatsnew/2.6.rst:3063 msgid "" @@ -6036,7 +6602,6 @@ msgstr "" "Christian Heimes con la ayuda de Amaury Forgeot d'Arc y Martin von Löwis)" #: ../Doc/whatsnew/2.6.rst:3131 -#, fuzzy msgid "" "The :mod:`msvcrt` module now supports both the normal and wide char variants " "of the console I/O API. The :func:`~msvcrt.getwch` function reads a " @@ -6044,11 +6609,11 @@ msgid "" "function. The :func:`~msvcrt.putwch` function takes a Unicode character and " "writes it to the console. (Contributed by Christian Heimes.)" msgstr "" -"El módulo :mod:`msvcrt` soporta ahora las variantes normal y wide char de la " -"API de E/S de la consola. La función :func:`getwch` lee una pulsación de " -"tecla y devuelve un valor Unicode, al igual que la función :func:`getwche`. " -"La función :func:`putwch` toma un carácter Unicode y lo escribe en la " -"consola. (Contribución de Christian Heimes)" +"El módulo :mod:`msvcrt` ahora admite las variantes de caracteres normales y " +"anchos de la API de E/S de la consola. La función :func:`~msvcrt.getwch` lee " +"una pulsación de tecla y devuelve un valor Unicode, al igual que la función :" +"func:`~msvcrt.getwche`. La función :func:`~msvcrt.putwch` toma un carácter " +"Unicode y lo escribe en la consola. (Contribuido por Christian Heimes)." #: ../Doc/whatsnew/2.6.rst:3138 msgid "" @@ -6061,18 +6626,16 @@ msgstr "" "del usuario. (Contribución de Josiah Carlson; :issue:`957650`.)" #: ../Doc/whatsnew/2.6.rst:3142 -#, fuzzy msgid "" "The :mod:`socket` module's socket objects now have an :meth:`~socket.socket." "ioctl` method that provides a limited interface to the :c:func:`WSAIoctl` " "system interface." msgstr "" -"Los objetos socket del módulo :mod:`socket` tienen ahora un método :meth:" -"`ioctl` que proporciona una interfaz limitada a la interfaz del sistema :c:" -"func:`WSAIoctl`." +"Los objetos de socket del módulo :mod:`socket` ahora tienen un método :meth:" +"`~socket.socket.ioctl` que proporciona una interfaz limitada a la interfaz " +"del sistema :c:func:`WSAIoctl`." #: ../Doc/whatsnew/2.6.rst:3146 -#, fuzzy msgid "" "The :mod:`_winreg ` module now has a function, :func:`~winreg." "ExpandEnvironmentStrings`, that expands environment variable references such " @@ -6080,15 +6643,14 @@ msgid "" "module now support the context protocol, so they can be used in :keyword:" "`with` statements. (Contributed by Christian Heimes.)" msgstr "" -"El módulo :mod:`_winreg` tiene ahora una función, :func:" -"`ExpandEnvironmentStrings`, que expande las referencias a variables de " -"entorno como ``%NAME%`` en una cadena de entrada. Los objetos handle " -"proporcionados por este módulo ahora soportan el protocolo de contexto, por " -"lo que pueden ser utilizados en sentencias :keyword:`with`. (Contribuido por " -"Christian Heimes.)" +"El módulo :mod:`_winreg ` ahora tiene una función, :func:`~winreg." +"ExpandEnvironmentStrings`, que expande las referencias de variables de " +"entorno como ``%NAME%`` en una cadena de entrada. Los objetos de control " +"proporcionados por este módulo ahora admiten el protocolo de contexto, por " +"lo que se pueden utilizar en instrucciones :keyword:`with`. (Contribuido por " +"Christian Heimes)." #: ../Doc/whatsnew/2.6.rst:3153 -#, fuzzy msgid "" ":mod:`_winreg ` also has better support for x64 systems, exposing " "the :func:`~winreg.DisableReflectionKey`, :func:`~winreg." @@ -6096,23 +6658,21 @@ msgid "" "which enable and disable registry reflection for 32-bit processes running on " "64-bit systems. (:issue:`1753245`)" msgstr "" -":mod:`_winreg` también tiene un mejor soporte para los sistemas x64, " -"exponiendo las funciones :func:`DisableReflectionKey`, :func:" -"`EnableReflectionKey`, y :func:`QueryReflectionKey`, que habilitan y " -"deshabilitan la reflexión del registro para los procesos de 32 bits que se " -"ejecutan en sistemas de 64 bits. (:issue:`1753245`)" +":mod:`_winreg ` también tiene un mejor soporte para sistemas x64, " +"exponiendo las funciones :func:`~winreg.DisableReflectionKey`, :func:" +"`~winreg.EnableReflectionKey` y :func:`~winreg.QueryReflectionKey`, que " +"habilitan y deshabilitan la reflexión del registro para procesos de 32 bits " +"que se ejecutan en sistemas de 64 bits. (:issue:`1753245`)" #: ../Doc/whatsnew/2.6.rst:3159 -#, fuzzy msgid "" "The :mod:`!msilib` module's :class:`!Record` object gained :meth:`!" "GetInteger` and :meth:`!GetString` methods that return field values as an " "integer or a string. (Contributed by Floris Bruynooghe; :issue:`2125`.)" msgstr "" -"El objeto :class:`Record` del módulo :mod:`msilib` ha ganado los métodos :" -"meth:`GetInteger` y :meth:`GetString` que devuelven los valores de los " -"campos como un entero o una cadena. (Contribución de Floris Bruynooghe; :" -"issue:`2125`.)" +"El objeto :class:`!Record` del módulo :mod:`!msilib` obtuvo los métodos :" +"meth:`!GetInteger` y :meth:`!GetString` que devuelven valores de campo como " +"un entero o una cadena. (Contribuido por Floris Bruynooghe; :issue:`2125`)." #: ../Doc/whatsnew/2.6.rst:3167 msgid "Port-Specific Changes: Mac OS X" @@ -6129,18 +6689,16 @@ msgstr "" "`!--with-framework-name=` al script :program:`configure`." #: ../Doc/whatsnew/2.6.rst:3174 -#, fuzzy msgid "" "The :mod:`!macfs` module has been removed. This in turn required the :func:" "`!macostools.touched` function to be removed because it depended on the :mod:" "`!macfs` module. (:issue:`1490190`)" msgstr "" -"Se ha eliminado el módulo :mod:`macfs`. Esto, a su vez, ha requerido la " -"eliminación de la función :func:`macostools.touched` porque dependía del " -"módulo :mod:`macfs`. (:issue:`1490190`)" +"Se ha eliminado el módulo :mod:`!macfs`. Esto a su vez requirió que se " +"eliminara la función :func:`!macostools.touched` porque dependía del módulo :" +"mod:`!macfs`. (:issue:`1490190`)" #: ../Doc/whatsnew/2.6.rst:3178 -#, fuzzy msgid "" "Many other Mac OS modules have been deprecated and will be removed in Python " "3.0: :mod:`!_builtinSuites`, :mod:`!aepack`, :mod:`!aetools`, :mod:`!" @@ -6154,23 +6712,23 @@ msgid "" "OSATerminology`, :mod:`!pimp`, :mod:`!PixMapWrapper`, :mod:`!StdSuites`, :" "mod:`!SystemEvents`, :mod:`!Terminal`, and :mod:`!terminalcommand`." msgstr "" -"Muchos otros módulos de Mac OS han quedado obsoletos y serán eliminados en " -"Python 3.0: :mod:`_builtinSuites`, :mod:`aepack`, :mod:`aetools`, :mod:" -"`aetypes`, :mod:`applesingle`, :mod:`appletrawmain`, :mod:`appletrunner`, :" -"mod:`argvemulator`, :mod:`Audio_mac`, :mod:`autoGIL`, :mod:`Carbon`, :mod:" -"`cfmfile`, :mod:`CodeWarrior`, :mod:`ColorPicker`, :mod:`EasyDialogs`, :mod:" -"`Explorer`, :mod:`Finder`, :mod:`FrameWork`, :mod:`findertools`, :mod:`ic`, :" -"mod:`icglue`, :mod:`icopen`, :mod:`macerrors`, :mod:`MacOS`, :mod:`macfs`, :" -"mod:`macostools`, :mod:`macresource`, :mod:`MiniAEFrame`, :mod:`Nav`, :mod:" -"`Netscape`, :mod:`OSATerminology`, :mod:`pimp`, :mod:`PixMapWrapper`, :mod:" -"`StdSuites`, :mod:`SystemEvents`, :mod:`Terminal`, y :mod:`terminalcommand`." +"Muchos otros módulos de Mac OS han quedado obsoletos y se eliminarán en " +"Python 3.0: :mod:`!_builtinSuites`, :mod:`!aepack`, :mod:`!aetools`, :mod:`!" +"aetypes`, :mod:`!applesingle`, :mod:`!appletrawmain`, :mod:`!appletrunner`, :" +"mod:`!argvemulator`, :mod:`!Audio_mac`, :mod:`!autoGIL`, :mod:`!Carbon`, :" +"mod:`!cfmfile`, :mod:`!CodeWarrior`, :mod:`!ColorPicker`, :mod:`!" +"EasyDialogs`, :mod:`!Explorer`, :mod:`!Finder`, :mod:`!FrameWork`, :mod:`!" +"findertools`, :mod:`!ic`, :mod:`!icglue`, :mod:`!icopen`, :mod:`!" +"macerrors`, :mod:`!MacOS`, :mod:`!macfs`, :mod:`!macostools`, :mod:`!" +"macresource`, :mod:`!MiniAEFrame`, :mod:`!Nav`, :mod:`!Netscape`, :mod:`!" +"OSATerminology`, :mod:`!pimp`, :mod:`!PixMapWrapper`, :mod:`!StdSuites`, :" +"mod:`!SystemEvents`, :mod:`!Terminal` y :mod:`!terminalcommand`." #: ../Doc/whatsnew/2.6.rst:3221 msgid "Port-Specific Changes: IRIX" msgstr "Cambios específicos en los puertos: IRIX" #: ../Doc/whatsnew/2.6.rst:3223 -#, fuzzy msgid "" "A number of old IRIX-specific modules were deprecated and will be removed in " "Python 3.0: :mod:`!al` and :mod:`!AL`, :mod:`!cd`, :mod:`!cddb`, :mod:`!" @@ -6180,13 +6738,13 @@ msgid "" "jpeg`, :mod:`!panelparser`, :mod:`!readcd`, :mod:`!SV` and :mod:`!sv`, :mod:" "`!torgb`, :mod:`!videoreader`, and :mod:`!WAIT`." msgstr "" -"Una serie de antiguos módulos específicos de IRIX fueron obsoletos y serán " -"eliminados en Python 3.0: :mod:`al` y :mod:`AL`, :mod:`cd`, :mod:`cddb`, :" -"mod:`cdplayer`, :mod:`CL` y :mod:`cl`, :mod:`DEVICE`, :mod:`ERRNO`, :mod:" -"`FILE`, :mod:`FL` y :mod:`fl`, :mod:`flp`, :mod:`fm`, :mod:`GET`, :mod:" -"`GLWS`, :mod:`GL` y :mod:`gl`, :mod:`IN`, :mod:`IOCTL`, :mod:`jpeg`, :mod:" -"`panelparser`, :mod:`readcd`, :mod:`SV` y :mod:`sv`, :mod:`torgb`, :mod:" -"`videoreader` y :mod:`WAIT`." +"Varios módulos antiguos específicos de IRIX quedaron obsoletos y se " +"eliminarán en Python 3.0: :mod:`!al` y :mod:`!AL`, :mod:`!cd`, :mod:`!" +"cddb`, :mod:`!cdplayer`, :mod:`!CL` y :mod:`!cl`, :mod:`!DEVICE`, :mod:`!" +"ERRNO`, :mod:`!FILE`, :mod:`!FL` y :mod:`!fl`, :mod:`!flp`, :mod:`!fm`, :mod:" +"`!GET`, :mod:`!GLWS`, :mod:`!GL` y :mod:`!gl`, :mod:`!IN`, :mod:`!IOCTL`, :" +"mod:`!jpeg`, :mod:`!panelparser`, :mod:`!readcd`, :mod:`!SV` y :mod:`!sv`, :" +"mod:`!torgb`, :mod:`!videoreader` y :mod:`!WAIT`." #: ../Doc/whatsnew/2.6.rst:3253 msgid "Porting to Python 2.6" @@ -6294,7 +6852,6 @@ msgstr "" "Smith; :issue:`1706815`.)" #: ../Doc/whatsnew/2.6.rst:3303 -#, fuzzy msgid "" "The :mod:`xmlrpclib ` module no longer automatically " "converts :class:`datetime.date` and :class:`datetime.time` to the :class:" @@ -6303,12 +6860,12 @@ msgid "" "xmlrpclib` should convert :class:`date` and :class:`~datetime.time` " "instances. (:issue:`1330538`)" msgstr "" -"El módulo :mod:`xmlrpclib` ya no convierte automáticamente las instancias :" +"El módulo :mod:`xmlrpclib ` ya no convierte automáticamente :" "class:`datetime.date` y :class:`datetime.time` al tipo :class:`xmlrpclib." -"DateTime`; la semántica de conversión no era necesariamente correcta para " -"todas las aplicaciones. El código que utiliza :mod:`xmlrpclib` debe " -"convertir las instancias :class:`date` y :class:`~datetime.time`. (:issue:" -"`1330538`)" +"DateTime `; la semántica de conversión no era " +"necesariamente correcta para todas las aplicaciones. El código que utiliza :" +"mod:`!xmlrpclib` debería convertir las instancias :class:`date` y :class:" +"`~datetime.time`. (:issue:`1330538`)" #: ../Doc/whatsnew/2.6.rst:3310 msgid "" @@ -6343,7 +6900,7 @@ msgstr "" #: ../Doc/whatsnew/2.6.rst:3323 msgid "For applications that embed Python:" -msgstr "" +msgstr "Para aplicaciones que incorporan Python:" #: ../Doc/whatsnew/2.6.rst:3325 msgid "" @@ -6353,6 +6910,11 @@ msgid "" "PySys_SetArgv` and carefully consider whether the application should be " "using :c:func:`!PySys_SetArgvEx` with *updatepath* set to false." msgstr "" +"La función :c:func:`!PySys_SetArgvEx` se agregó en Python 2.6.6, lo que " +"permite que las aplicaciones cierren un agujero de seguridad cuando se usa " +"la función :c:func:`!PySys_SetArgv` existente. Verifique si está llamando a :" +"c:func:`!PySys_SetArgv` y considere cuidadosamente si la aplicación debería " +"usar :c:func:`!PySys_SetArgvEx` con *updatepath* configurado como falso." #: ../Doc/whatsnew/2.6.rst:3338 msgid "Acknowledgements" From 9b1e0f5b5de1b636b50ac51c8b047c1445bbd5b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 11:57:52 +0200 Subject: [PATCH 20/40] Translate library/dis (#3328) Closes #3070 --- dictionaries/library_dis.txt | 1 + library/dis.po | 953 +++++++++++++++++++++-------------- 2 files changed, 582 insertions(+), 372 deletions(-) diff --git a/dictionaries/library_dis.txt b/dictionaries/library_dis.txt index 3acc3aa3d8..297f805276 100644 --- a/dictionaries/library_dis.txt +++ b/dictionaries/library_dis.txt @@ -1 +1,2 @@ +especializarlo oparg diff --git a/library/dis.po b/library/dis.po index 86b5a6dd5e..efcbadac43 100644 --- a/library/dis.po +++ b/library/dis.po @@ -11,20 +11,20 @@ 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-11-05 23:34+0800\n" -"Last-Translator: Rodrigo Tobar \n" -"Language: es\n" +"PO-Revision-Date: 2024-11-24 19:55+0100\n" +"Last-Translator: Cristián Maureira-Fredes \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.4.2\n" #: ../Doc/library/dis.rst:2 -#, fuzzy msgid ":mod:`!dis` --- Disassembler for Python bytecode" -msgstr ":mod:`dis` --- Desensamblador para bytecode de Python" +msgstr ":mod:`!dis` --- Desensamblador para bytecode de Python" #: ../Doc/library/dis.rst:7 msgid "**Source code:** :source:`Lib/dis.py`" @@ -72,7 +72,6 @@ msgstr "" "byte." #: ../Doc/library/dis.rst:37 -#, fuzzy msgid "" "Some instructions are accompanied by one or more inline cache entries, which " "take the form of :opcode:`CACHE` instructions. These instructions are hidden " @@ -81,10 +80,13 @@ msgid "" "specialize it for different runtime conditions. The adaptive bytecode can be " "shown by passing ``adaptive=True``." msgstr "" -"Algunas instrucciones van acompañadas de una o más entradas de caché en " -"línea, que adoptan la forma de instrucciones :opcode:`CACHE`. Estas " +"Algunas instrucciones están acompañadas de una o más entradas de caché en " +"línea, que toman la forma de instrucciones :opcode:`CACHE`. Estas " "instrucciones están ocultas de forma predeterminada, pero se pueden mostrar " -"pasando ``show_caches=True`` a cualquier utilidad :mod:`dis`." +"al pasar ``show_caches=True`` a cualquier utilidad :mod:`dis`. Además, el " +"intérprete ahora adapta el código de bytes para especializarlo en diferentes " +"condiciones de ejecución. El código de bytes adaptativo se puede mostrar al " +"pasar ``adaptive=True``." #: ../Doc/library/dis.rst:45 msgid "" @@ -92,6 +94,9 @@ msgid "" "the instruction that appears immediately after the jump instruction's :" "opcode:`CACHE` entries." msgstr "" +"El argumento de un salto es el desplazamiento de la instrucción de destino " +"en relación con la instrucción que aparece inmediatamente después de las " +"entradas :opcode:`CACHE` de la instrucción de salto." #: ../Doc/library/dis.rst:50 msgid "" @@ -99,6 +104,9 @@ msgid "" "transparent for forward jumps but needs to be taken into account when " "reasoning about backward jumps." msgstr "" +"Como consecuencia, la presencia de las instrucciones :opcode:`CACHE` es " +"transparente para los saltos hacia adelante, pero debe tenerse en cuenta al " +"razonar sobre los saltos hacia atrás." #: ../Doc/library/dis.rst:54 msgid "" @@ -106,26 +114,30 @@ msgid "" "targets and exception handlers. The ``-O`` command line option and the " "``show_offsets`` argument were added." msgstr "" +"La salida muestra etiquetas lógicas en lugar de desplazamientos de " +"instrucciones para destinos de salto y controladores de excepciones. Se " +"agregaron la opción de línea de comandos ``-O`` y el argumento " +"``show_offsets``." #: ../Doc/library/dis.rst:59 -#, fuzzy msgid "Example: Given the function :func:`!myfunc`::" -msgstr "Ejemplo: dada la función :func:`myfunc`::" +msgstr "Ejemplo: Dada la función :func:`!myfunc`::" #: ../Doc/library/dis.rst:61 msgid "" "def myfunc(alist):\n" " return len(alist)" msgstr "" +"def myfunc(alist):\n" +" return len(alist)" #: ../Doc/library/dis.rst:64 -#, fuzzy msgid "" "the following command can be used to display the disassembly of :func:`!" "myfunc`:" msgstr "" -"el siguiente comando se puede utilizar para mostrar el desmontaje de :func:" -"`myfunc`:" +"El siguiente comando se puede utilizar para mostrar el desmontaje de :func:`!" +"myfunc`:" #: ../Doc/library/dis.rst:67 msgid "" @@ -137,6 +149,13 @@ msgid "" " CALL 1\n" " RETURN_VALUE" msgstr "" +">>> dis.dis(myfunc)\n" +" 2 RESUME 0\n" +"\n" +" 3 LOAD_GLOBAL 1 (len + NULL)\n" +" LOAD_FAST 0 (alist)\n" +" CALL 1\n" +" RETURN_VALUE" #: ../Doc/library/dis.rst:77 msgid "(The \"2\" is a line number)." @@ -144,32 +163,33 @@ msgstr "(El \"2\" es un número de línea)." #: ../Doc/library/dis.rst:82 msgid "Command-line interface" -msgstr "" +msgstr "Interfaz de línea de comandos" #: ../Doc/library/dis.rst:84 msgid "The :mod:`dis` module can be invoked as a script from the command line:" msgstr "" +"El módulo :mod:`dis` se puede invocar como un script desde la línea de " +"comandos:" #: ../Doc/library/dis.rst:86 msgid "python -m dis [-h] [-C] [-O] [infile]" -msgstr "" +msgstr "python -m dis [-h] [-C] [-O] [infile]" #: ../Doc/library/dis.rst:90 msgid "The following options are accepted:" -msgstr "" +msgstr "Se aceptan las siguientes opciones:" #: ../Doc/library/dis.rst:96 msgid "Display usage and exit." -msgstr "" +msgstr "Mostrar uso y salir." #: ../Doc/library/dis.rst:100 msgid "Show inline caches." -msgstr "" +msgstr "Mostrar cachés en línea." #: ../Doc/library/dis.rst:104 -#, fuzzy msgid "Show offsets of instructions." -msgstr "Instrucciones bytecode de Python" +msgstr "Mostrar desplazamientos de instrucciones." #: ../Doc/library/dis.rst:106 msgid "" @@ -177,6 +197,9 @@ msgid "" "stdout. Otherwise, disassembly is performed on compiled source code received " "from stdin." msgstr "" +"Si se especifica :file:`infile`, su código desensamblado se escribirá en la " +"salida estándar. De lo contrario, el desensamblado se realiza en el código " +"fuente compilado recibido de la entrada estándar." #: ../Doc/library/dis.rst:110 msgid "Bytecode analysis" @@ -241,18 +264,24 @@ msgid "" "If *show_caches* is ``True``, :meth:`.dis` will display inline cache entries " "used by the interpreter to specialize the bytecode." msgstr "" +"Si *show_caches* es ``True``, :meth:`.dis` mostrará las entradas de caché en " +"línea utilizadas por el intérprete para especializar el código de bytes." #: ../Doc/library/dis.rst:141 msgid "" "If *adaptive* is ``True``, :meth:`.dis` will display specialized bytecode " "that may be different from the original bytecode." msgstr "" +"Si *adaptive* es ``True``, :meth:`.dis` mostrará un código de bytes " +"especializado que puede ser diferente del código de bytes original." #: ../Doc/library/dis.rst:144 msgid "" "If *show_offsets* is ``True``, :meth:`.dis` will include instruction offsets " "in the output." msgstr "" +"Si *show_offsets* es ``True``, :meth:`.dis` incluirá desplazamientos de " +"instrucciones en la salida." #: ../Doc/library/dis.rst:149 msgid "" @@ -296,9 +325,8 @@ msgstr "" #: ../Doc/library/dis.rst:173 ../Doc/library/dis.rst:265 #: ../Doc/library/dis.rst:282 ../Doc/library/dis.rst:312 #: ../Doc/library/dis.rst:335 -#, fuzzy msgid "Added the *show_caches* and *adaptive* parameters." -msgstr "Se agregó el parámetro ``show_caches``." +msgstr "Se agregaron los parámetros *show_caches* y *adaptive*." #: ../Doc/library/dis.rst:176 msgid "Example:" @@ -316,6 +344,15 @@ msgid "" "CALL\n" "RETURN_VALUE" msgstr "" +">>> bytecode = dis.Bytecode(myfunc)\n" +">>> for instr in bytecode:\n" +"... print(instr.opname)\n" +"...\n" +"RESUME\n" +"LOAD_GLOBAL\n" +"LOAD_FAST\n" +"CALL\n" +"RETURN_VALUE" #: ../Doc/library/dis.rst:192 msgid "Analysis functions" @@ -380,7 +417,6 @@ msgid "Added *file* parameter." msgstr "Agrega un parámetro *file*." #: ../Doc/library/dis.rst:231 -#, fuzzy msgid "" "Disassemble the *x* object. *x* can denote either a module, a class, a " "method, a function, a generator, an asynchronous generator, a coroutine, a " @@ -395,19 +431,20 @@ msgid "" "before being disassembled. If no object is provided, this function " "disassembles the last traceback." msgstr "" -"Desmontar el objeto *x*. *x* puede denotar un módulo, una clase, un método, " -"una función, un generador, un generador asíncrono, una corutina, un objeto " -"de código, una cadena de código fuente o una secuencia de bytes de código de " -"bytes sin procesar. Para un módulo, desmonta todas las funciones. Para una " -"clase, desmonta todos los métodos (incluidos los métodos de clase y " -"estáticos). Para un objeto de código o secuencia de bytecode sin procesar, " -"imprime una línea por instrucción de bytecode. También desmonta " -"recursivamente objetos de código anidados (el código de comprensiones, " -"expresiones generadoras y funciones anidadas, y el código utilizado para " -"construir clases anidadas). Las cadenas de caracteres se compilan primero en " +"Desensamblar el objeto *x*. *x* puede denotar un módulo, una clase, un " +"método, una función, un generador, un generador asincrónico, una corrutina, " +"un objeto de código, una cadena de código fuente o una secuencia de bytes de " +"código de bytes sin formato. Para un módulo, desensamblar todas las " +"funciones. Para una clase, desensamblar todos los métodos (incluidos los " +"métodos de clase y estáticos). Para un objeto de código o una secuencia de " +"código de bytes sin formato, imprime una línea por cada instrucción de " +"código de bytes. También desensamblar de forma recursiva objetos de código " +"anidados. Estos pueden incluir expresiones de generador, funciones anidadas, " +"los cuerpos de clases anidadas y los objetos de código utilizados para :ref:" +"`annotation scopes `. Las cadenas se compilan primero en " "objetos de código con la función incorporada :func:`compile` antes de " -"desmontarse. Si no se proporciona ningún objeto, esta función desmonta el " -"último rastreo." +"desensamblarse. Si no se proporciona ningún objeto, esta función " +"desensamblará el último seguimiento." #: ../Doc/library/dis.rst:244 ../Doc/library/dis.rst:276 #: ../Doc/library/dis.rst:306 @@ -431,12 +468,16 @@ msgid "" "If *show_caches* is ``True``, this function will display inline cache " "entries used by the interpreter to specialize the bytecode." msgstr "" +"Si *show_caches* es ``True``, esta función mostrará las entradas de caché en " +"línea utilizadas por el intérprete para especializar el código de bytes." #: ../Doc/library/dis.rst:253 msgid "" "If *adaptive* is ``True``, this function will display specialized bytecode " "that may be different from the original bytecode." msgstr "" +"Si *adaptive* es ``True``, esta función mostrará un código de bytes " +"especializado que puede ser diferente del código de bytes original." #: ../Doc/library/dis.rst:259 msgid "Implemented recursive disassembling and added *depth* parameter." @@ -453,9 +494,8 @@ msgstr "" "excepción." #: ../Doc/library/dis.rst:285 ../Doc/library/dis.rst:315 -#, fuzzy msgid "Added the *show_offsets* parameter." -msgstr "Agrega un parámetro *file*." +msgstr "Se agregó el parámetro *show_offsets*." #: ../Doc/library/dis.rst:292 msgid "" @@ -520,7 +560,7 @@ msgstr "" #: ../Doc/library/dis.rst:331 msgid "The *adaptive* parameter works as it does in :func:`dis`." -msgstr "" +msgstr "El parámetro *adaptive* funciona como lo hace en :func:`dis`." #: ../Doc/library/dis.rst:338 msgid "" @@ -529,18 +569,22 @@ msgid "" "populated (regardless of the value of *show_caches*) and it no longer " "generates separate items for the cache entries." msgstr "" +"El parámetro *show_caches* está obsoleto y no tiene efecto. El iterador " +"genera las instancias :class:`Instruction` con el campo *cache_info* " +"completado (independientemente del valor de *show_caches*) y ya no genera " +"elementos separados para las entradas de caché." #: ../Doc/library/dis.rst:346 -#, fuzzy msgid "" "This generator function uses the :meth:`~codeobject.co_lines` method of the :" "ref:`code object ` *code* to find the offsets which are starts " "of lines in the source code. They are generated as ``(offset, lineno)`` " "pairs." msgstr "" -"Esta función generadora utiliza el método ``co_lines`` del objeto de código " -"*code* para encontrar las compensaciones que son los comienzos de las líneas " -"en el código fuente. Se generan como pares ``(offset, lineno)``." +"Esta función generadora utiliza el método :meth:`~codeobject.co_lines` de :" +"ref:`code object ` y *code* para encontrar los desplazamientos " +"que son inicios de líneas en el código fuente. Se generan como pares " +"``(offset, lineno)``." #: ../Doc/library/dis.rst:351 msgid "Line numbers can be decreasing. Before, they were always increasing." @@ -549,19 +593,21 @@ msgstr "" "aumentando." #: ../Doc/library/dis.rst:354 -#, fuzzy msgid "" "The :pep:`626` :meth:`~codeobject.co_lines` method is used instead of the :" "attr:`~codeobject.co_firstlineno` and :attr:`~codeobject.co_lnotab` " "attributes of the :ref:`code object `." msgstr "" -"Se utiliza el método :pep:`626` ``co_lines`` en lugar de los atributos " -"``co_firstlineno`` y ``co_lnotab`` del objeto de código." +"Se utiliza el método :pep:`626` :meth:`~codeobject.co_lines` en lugar de los " +"atributos :attr:`~codeobject.co_firstlineno` y :attr:`~codeobject.co_lnotab` " +"del :ref:`code object `." #: ../Doc/library/dis.rst:359 msgid "" "Line numbers can be ``None`` for bytecode that does not map to source lines." msgstr "" +"Los números de línea pueden ser ``None`` para el código de bytes que no se " +"asigna a las líneas de origen." #: ../Doc/library/dis.rst:365 msgid "" @@ -600,6 +646,10 @@ msgid "" "is also no longer an error to pass an integer ``oparg`` when the ``opcode`` " "does not use it; the ``oparg`` in this case is ignored." msgstr "" +"Si se omite ``oparg`` (o ``None``), ahora se devuelve el efecto de pila para " +"``oparg=0``. Anteriormente, esto era un error para los códigos de operación " +"que usan su argumento. Tampoco es un error pasar un entero ``oparg`` cuando " +"``opcode`` no lo usa; en este caso, se ignora ``oparg``." #: ../Doc/library/dis.rst:393 msgid "Python Bytecode Instructions" @@ -635,12 +685,16 @@ msgid "" "numeric code for the base operation if operation is specialized; otherwise " "equal to :data:`opcode`" msgstr "" +"código numérico para la operación base si la operación es especializada; en " +"caso contrario, igual a :data:`opcode`" #: ../Doc/library/dis.rst:421 msgid "" "human readable name for the base operation if operation is specialized; " "otherwise equal to :data:`opname`" msgstr "" +"Nombre legible para humanos para la operación base si la operación es " +"especializada; de lo contrario, es igual a :data:`opname`" #: ../Doc/library/dis.rst:427 msgid "numeric argument to operation (if any), otherwise ``None``" @@ -649,7 +703,7 @@ msgstr "" #: ../Doc/library/dis.rst:431 msgid "alias for :data:`arg`" -msgstr "" +msgstr "alias para :data:`arg`" #: ../Doc/library/dis.rst:435 msgid "resolved arg value (if any), otherwise ``None``" @@ -672,27 +726,30 @@ msgid "" "start index of operation within bytecode sequence, including prefixed " "``EXTENDED_ARG`` operations if present; otherwise equal to :data:`offset`" msgstr "" +"índice de inicio de la operación dentro de la secuencia de bytecode, " +"incluidas las operaciones con prefijo ``EXTENDED_ARG`` si están presentes; " +"de lo contrario, igual a :data:`offset`" #: ../Doc/library/dis.rst:457 msgid "start index of the cache entries following the operation" -msgstr "" +msgstr "índice de inicio de las entradas de caché después de la operación" #: ../Doc/library/dis.rst:462 msgid "end index of the cache entries following the operation" -msgstr "" +msgstr "índice final de las entradas de caché después de la operación" #: ../Doc/library/dis.rst:467 -#, fuzzy msgid "``True`` if this opcode starts a source line, otherwise ``False``" -msgstr "``True`` si otro código salta aquí, de lo contrario, ``False``" +msgstr "" +"``True`` si este código de operación inicia una línea de origen, de lo " +"contrario ``False``" #: ../Doc/library/dis.rst:472 -#, fuzzy msgid "" "source line number associated with this opcode (if any), otherwise ``None``" msgstr "" -"línea iniciada por este código de operación (si existe), de lo contrario " -"``None``" +"número de línea de origen asociado con este código de operación (si lo hay), " +"de lo contrario ``None``" #: ../Doc/library/dis.rst:477 msgid "``True`` if other code jumps to here, otherwise ``False``" @@ -703,6 +760,8 @@ msgid "" "bytecode index of the jump target if this is a jump operation, otherwise " "``None``" msgstr "" +"índice de código de bytes del objetivo del salto si se trata de una " +"operación de salto, de lo contrario ``None``" #: ../Doc/library/dis.rst:488 msgid "" @@ -718,7 +777,7 @@ msgstr "Se agrega el campo ``positions``." #: ../Doc/library/dis.rst:507 msgid "Changed field ``starts_line``." -msgstr "" +msgstr "Se modificó el campo ``starts_line``." #: ../Doc/library/dis.rst:509 msgid "" @@ -726,6 +785,9 @@ msgid "" "``baseopname``, ``baseopcode``, ``jump_target``, ``oparg``, ``line_number`` " "and ``cache_info``." msgstr "" +"Se agregaron los campos ``start_offset``, ``cache_offset``, ``end_offset``, " +"``baseopname``, ``baseopcode``, ``jump_target``, ``oparg``, ``line_number`` " +"y ``cache_info``." #: ../Doc/library/dis.rst:516 msgid "" @@ -751,6 +813,9 @@ msgid "" "describe operations on it as if it was a Python list. The top of the stack " "corresponds to ``STACK[-1]`` in this language." msgstr "" +"A continuación, nos referiremos a la pila del intérprete como ``STACK`` y " +"describiremos las operaciones en ella como si fuera una lista de Python. La " +"parte superior de la pila corresponde a ``STACK[-1]`` en este lenguaje." #: ../Doc/library/dis.rst:537 msgid "" @@ -761,46 +826,50 @@ msgstr "" "optimizador de bytecode y para generar eventos de seguimiento de línea." #: ../Doc/library/dis.rst:543 -#, fuzzy msgid "Removes the top-of-stack item::" -msgstr "Elimina el elemento de la parte superior de la pila (TOS)." +msgstr "Elimina el elemento de la parte superior de la pila::" #: ../Doc/library/dis.rst:545 msgid "STACK.pop()" -msgstr "" +msgstr "STACK.pop()" #: ../Doc/library/dis.rst:550 msgid "" "Removes the top-of-stack item. Equivalent to ``POP_TOP``. Used to clean up " "at the end of loops, hence the name." msgstr "" +"Elimina el elemento superior de la pila. Equivale a ``POP_TOP``. Se utiliza " +"para limpiar al final de los bucles, de ahí el nombre." #: ../Doc/library/dis.rst:559 msgid "Implements ``del STACK[-2]``. Used to clean up when a generator exits." msgstr "" +"Implementa ``del STACK[-2]``. Se utiliza para limpiar cuando finaliza un " +"generador." #: ../Doc/library/dis.rst:567 -#, fuzzy msgid "" "Push the i-th item to the top of the stack without removing it from its " "original location::" msgstr "" -"Empuje el elemento *i*-th a la parte superior de la pila. El elemento no se " -"elimina de su ubicación original." +"Empuja el elemento i-ésimo hacia la parte superior de la pila sin quitarlo " +"de su ubicación original::" #: ../Doc/library/dis.rst:570 msgid "" "assert i > 0\n" "STACK.append(STACK[-i])" msgstr "" +"assert i > 0\n" +"STACK.append(STACK[-i])" #: ../Doc/library/dis.rst:578 msgid "Swap the top of the stack with the i-th element::" -msgstr "" +msgstr "Intercambia la parte superior de la pila con el elemento i-ésimo::" #: ../Doc/library/dis.rst:580 msgid "STACK[-i], STACK[-1] = STACK[-1], STACK[-i]" -msgstr "" +msgstr "STACK[-i], STACK[-1] = STACK[-1], STACK[-i]" #: ../Doc/library/dis.rst:587 msgid "" @@ -847,78 +916,69 @@ msgstr "" "operación y retornan el resultado a la pila." #: ../Doc/library/dis.rst:611 -#, fuzzy msgid "Implements ``STACK[-1] = -STACK[-1]``." -msgstr "Implementa ``TOS = -TOS``." +msgstr "Implementa ``STACK[-1] = -STACK[-1]``." #: ../Doc/library/dis.rst:616 -#, fuzzy msgid "Implements ``STACK[-1] = not STACK[-1]``." -msgstr "Implementa ``TOS = not TOS``." +msgstr "Implementa ``STACK[-1] = not STACK[-1]``." #: ../Doc/library/dis.rst:618 ../Doc/library/dis.rst:1313 #: ../Doc/library/dis.rst:1329 msgid "This instruction now requires an exact :class:`bool` operand." -msgstr "" +msgstr "Esta instrucción ahora requiere un operando :class:`bool` exacto." #: ../Doc/library/dis.rst:624 -#, fuzzy msgid "Implements ``STACK[-1] = ~STACK[-1]``." -msgstr "Implementa ``TOS = ~TOS``." +msgstr "Implementa ``STACK[-1] = ~STACK[-1]``." #: ../Doc/library/dis.rst:629 -#, fuzzy msgid "Implements ``STACK[-1] = iter(STACK[-1])``." -msgstr "Implementa ``TOS = iter(TOS)``." +msgstr "Implementa ``STACK[-1] = iter(STACK[-1])``." #: ../Doc/library/dis.rst:634 -#, fuzzy msgid "" "If ``STACK[-1]`` is a :term:`generator iterator` or :term:`coroutine` object " "it is left as is. Otherwise, implements ``STACK[-1] = iter(STACK[-1])``." msgstr "" -"Si ``TOS`` es un :term:`iterador generador ` o un " -"objeto :term:`corutina ` se deja como está. De lo contrario, " -"implementa ``TOS = iter(TOS)``." +"Si ``STACK[-1]`` es un objeto :term:`generator iterator` o :term:" +"`coroutine`, se deja como está. De lo contrario, se implementa ``STACK[-1] = " +"iter(STACK[-1])``." #: ../Doc/library/dis.rst:642 -#, fuzzy msgid "Implements ``STACK[-1] = bool(STACK[-1])``." -msgstr "Implementa ``TOS = ~TOS``." +msgstr "Implementa ``STACK[-1] = bool(STACK[-1])``." #: ../Doc/library/dis.rst:647 msgid "**Binary and in-place operations**" msgstr "**Operaciones binarias e in situ**" #: ../Doc/library/dis.rst:649 -#, fuzzy msgid "" "Binary operations remove the top two items from the stack (``STACK[-1]`` and " "``STACK[-2]``). They perform the operation, then put the result back on the " "stack." msgstr "" -"Las operaciones binarias eliminan el elemento superior de la pila (TOS) y el " -"segundo elemento de la pila superior (TOS1) de la pila. Realizan la " -"operación y retornan el resultado a la pila." +"Las operaciones binarias eliminan los dos elementos superiores de la pila " +"(``STACK[-1]`` y ``STACK[-2]``). Realizan la operación y luego vuelven a " +"colocar el resultado en la pila." #: ../Doc/library/dis.rst:652 -#, fuzzy msgid "" "In-place operations are like binary operations, but the operation is done in-" "place when ``STACK[-2]`` supports it, and the resulting ``STACK[-1]`` may be " "(but does not have to be) the original ``STACK[-2]``." msgstr "" -"Las operaciones en el lugar son como operaciones binarias, ya que eliminan " -"TOS y TOS1, y retornan el resultado a la pila, pero la operación se realiza " -"en el lugar cuando TOS1 lo admite, y el TOS resultante puede ser (pero no " -"tiene ser) el TOS1 original." +"Las operaciones en el lugar son como operaciones binarias, pero la operación " +"se realiza en el lugar cuando ``STACK[-2]`` la admite, y el ``STACK[-1]`` " +"resultante puede ser (pero no tiene que ser) el ``STACK[-2]`` original." #: ../Doc/library/dis.rst:659 -#, fuzzy msgid "" "Implements the binary and in-place operators (depending on the value of " "*op*)::" -msgstr "Implementa los operadores binarios e in situ (según el valor de *op*)." +msgstr "" +"Implementa los operadores binarios y locales (según el valor de *op*)::" #: ../Doc/library/dis.rst:662 msgid "" @@ -926,6 +986,9 @@ msgid "" "lhs = STACK.pop()\n" "STACK.append(lhs op rhs)" msgstr "" +"rhs = STACK.pop()\n" +"lhs = STACK.pop()\n" +"STACK.append(lhs op rhs)" #: ../Doc/library/dis.rst:671 ../Doc/library/dis.rst:680 #: ../Doc/library/dis.rst:690 ../Doc/library/dis.rst:698 @@ -935,7 +998,7 @@ msgstr "" #: ../Doc/library/dis.rst:1156 ../Doc/library/dis.rst:1168 #: ../Doc/library/dis.rst:1180 msgid "Implements::" -msgstr "" +msgstr "Implementos::" #: ../Doc/library/dis.rst:673 msgid "" @@ -943,6 +1006,9 @@ msgid "" "container = STACK.pop()\n" "STACK.append(container[key])" msgstr "" +"key = STACK.pop()\n" +"container = STACK.pop()\n" +"STACK.append(container[key])" #: ../Doc/library/dis.rst:682 msgid "" @@ -951,6 +1017,10 @@ msgid "" "value = STACK.pop()\n" "container[key] = value" msgstr "" +"key = STACK.pop()\n" +"container = STACK.pop()\n" +"value = STACK.pop()\n" +"container[key] = value" #: ../Doc/library/dis.rst:692 msgid "" @@ -958,6 +1028,9 @@ msgid "" "container = STACK.pop()\n" "del container[key]" msgstr "" +"key = STACK.pop()\n" +"container = STACK.pop()\n" +"del container[key]" #: ../Doc/library/dis.rst:700 msgid "" @@ -966,6 +1039,10 @@ msgid "" "container = STACK.pop()\n" "STACK.append(container[start:end])" msgstr "" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"container = STACK.pop()\n" +"STACK.append(container[start:end])" #: ../Doc/library/dis.rst:712 msgid "" @@ -975,22 +1052,27 @@ msgid "" "values = STACK.pop()\n" "container[start:end] = value" msgstr "" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"container = STACK.pop()\n" +"values = STACK.pop()\n" +"container[start:end] = value" #: ../Doc/library/dis.rst:721 msgid "**Coroutine opcodes**" msgstr "**Opcodes de corutinas**" #: ../Doc/library/dis.rst:725 -#, fuzzy msgid "" "Implements ``STACK[-1] = get_awaitable(STACK[-1])``, where " "``get_awaitable(o)`` returns ``o`` if ``o`` is a coroutine object or a " "generator object with the :data:`~inspect.CO_ITERABLE_COROUTINE` flag, or " "resolves ``o.__await__``." msgstr "" -"Implementa ``TOS = get_awaitable(TOS)``, donde ``get_awaitable(o)`` retorna " -"``o`` si ``o`` es un objeto de corutina o un objeto generador con el " -"indicador CO_ITERABLE_COROUTINE, o resuelve ``o.__await__``." +"Implementa ``STACK[-1] = get_awaitable(STACK[-1])``, donde " +"``get_awaitable(o)`` devuelve ``o`` si ``o`` es un objeto de corrutina o un " +"objeto generador con el indicador :data:`~inspect.CO_ITERABLE_COROUTINE`, o " +"resuelve ``o.__await__``." #: ../Doc/library/dis.rst:730 msgid "" @@ -1001,36 +1083,33 @@ msgstr "" "instrucción:" #: ../Doc/library/dis.rst:733 -#, fuzzy msgid "``1``: After a call to ``__aenter__``" -msgstr "``1`` Después de una llamada a ``__aenter__``" +msgstr "``1``: Después de una llamada a ``__aenter__``" #: ../Doc/library/dis.rst:734 -#, fuzzy msgid "``2``: After a call to ``__aexit__``" -msgstr "``2`` Después de una llamada a ``__aexit__``" +msgstr "``2``: Después de una llamada a ``__aexit__``" #: ../Doc/library/dis.rst:738 msgid "Previously, this instruction did not have an oparg." msgstr "Anteriormente, esta instrucción no tenía un oparg." #: ../Doc/library/dis.rst:744 -#, fuzzy msgid "Implements ``STACK[-1] = STACK[-1].__aiter__()``." -msgstr "Implementa ``TOS = TOS.__aiter__()``." +msgstr "Implementa ``STACK[-1] = STACK[-1].__aiter__()``." #: ../Doc/library/dis.rst:747 msgid "Returning awaitable objects from ``__aiter__`` is no longer supported." msgstr "Ya no se admite el retorno de objetos *awaitable* de ``__aiter__``." #: ../Doc/library/dis.rst:754 -#, fuzzy msgid "" "Implement ``STACK.append(get_awaitable(STACK[-1].__anext__()))`` to the " "stack. See ``GET_AWAITABLE`` for details about ``get_awaitable``." msgstr "" -"Agrega ``get_awaitable(TOS.__anext__())`` a la pila. Consulte " -"``GET_AWAITABLE`` para obtener detalles sobre ``get_awaitable``." +"Implemente ``STACK.append(get_awaitable(STACK[-1].__anext__()))`` en la " +"pila. Consulte ``GET_AWAITABLE`` para obtener más detalles sobre " +"``get_awaitable``." #: ../Doc/library/dis.rst:762 msgid "" @@ -1039,6 +1118,10 @@ msgid "" "and the raised exception in ``STACK[-1]``. Both are popped. If the exception " "is not :exc:`StopAsyncIteration`, it is re-raised." msgstr "" +"Finaliza un bucle :keyword:`async for`. Controla una excepción generada al " +"esperar un elemento siguiente. La pila contiene el iterable asincrónico en " +"``STACK[-2]`` y la excepción generada en ``STACK[-1]``. Ambos se eliminan. " +"Si la excepción no es :exc:`StopAsyncIteration`, se vuelve a generar." #: ../Doc/library/dis.rst:769 ../Doc/library/dis.rst:877 #: ../Doc/library/dis.rst:888 @@ -1055,19 +1138,22 @@ msgid "" "instance of :exc:`StopIteration`, pop three values from the stack and push " "its ``value`` member. Otherwise, re-raise ``STACK[-1]``." msgstr "" +"Maneja una excepción generada durante una llamada :meth:`~generator.throw` " +"o :meth:`~generator.close` a través del marco actual. Si ``STACK[-1]`` es " +"una instancia de :exc:`StopIteration`, extrae tres valores de la pila y " +"envía su miembro ``value``. De lo contrario, vuelve a generar ``STACK[-1]``." #: ../Doc/library/dis.rst:785 -#, fuzzy msgid "" "Resolves ``__aenter__`` and ``__aexit__`` from ``STACK[-1]``. Pushes " "``__aexit__`` and result of ``__aenter__()`` to the stack::" msgstr "" -"Resuelve ``__aenter__`` y ``__aexit__`` del objeto en la parte superior de " -"la pila. Apila ``__aexit__`` y el resultado de ``__aenter__()`` a la pila." +"Resuelve ``__aenter__`` y ``__aexit__`` a partir de ``STACK[-1]``. Envía " +"``__aexit__`` y el resultado de ``__aenter__()`` a la pila:" #: ../Doc/library/dis.rst:788 msgid "STACK.extend((__aexit__, __aenter__())" -msgstr "" +msgstr "STACK.extend((__aexit__, __aenter__())" #: ../Doc/library/dis.rst:794 msgid "**Miscellaneous opcodes**" @@ -1078,26 +1164,24 @@ msgid "" "item = STACK.pop()\n" "set.add(STACK[-i], item)" msgstr "" +"item = STACK.pop()\n" +"set.add(STACK[-i], item)" #: ../Doc/library/dis.rst:803 -#, fuzzy msgid "Used to implement set comprehensions." -msgstr "" -"Llama a ``set.add(TOS1[-i], TOS)``. Se utiliza para implementar " -"comprensiones de conjuntos." +msgstr "Se utiliza para implementar comprensiones de conjuntos." #: ../Doc/library/dis.rst:810 msgid "" "item = STACK.pop()\n" "list.append(STACK[-i], item)" msgstr "" +"item = STACK.pop()\n" +"list.append(STACK[-i], item)" #: ../Doc/library/dis.rst:813 -#, fuzzy msgid "Used to implement list comprehensions." -msgstr "" -"Llama a ``list.append(TOS1[-i], TOS)``. Se utiliza para implementar listas " -"por comprensión." +msgstr "Se utiliza para implementar listas por comprensión." #: ../Doc/library/dis.rst:820 msgid "" @@ -1105,22 +1189,21 @@ msgid "" "key = STACK.pop()\n" "dict.__setitem__(STACK[-i], key, value)" msgstr "" +"value = STACK.pop()\n" +"key = STACK.pop()\n" +"dict.__setitem__(STACK[-i], key, value)" #: ../Doc/library/dis.rst:824 -#, fuzzy msgid "Used to implement dict comprehensions." -msgstr "" -"Llama a ``set.add(TOS1[-i], TOS)``. Se utiliza para implementar " -"comprensiones de conjuntos." +msgstr "Se utiliza para implementar comprensiones de diccionarios." #: ../Doc/library/dis.rst:827 -#, fuzzy msgid "" "Map value is ``STACK[-1]`` and map key is ``STACK[-2]``. Before, those were " "reversed." msgstr "" -"El valor del mapa es TOS y la clave del mapa es TOS1. Antes, esos fueron " -"revertidos." +"El valor del mapa es ``STACK[-1]`` y la clave del mapa es ``STACK[-2]``. " +"Antes, estaban invertidos." #: ../Doc/library/dis.rst:831 msgid "" @@ -1135,35 +1218,36 @@ msgstr "" "futuras iteraciones del bucle." #: ../Doc/library/dis.rst:839 -#, fuzzy msgid "Returns with ``STACK[-1]`` to the caller of the function." -msgstr "Retorna con TOS a quien llama la función." +msgstr "Regresa con ``STACK[-1]`` al llamador de la función." #: ../Doc/library/dis.rst:844 -#, fuzzy msgid "Returns with ``co_consts[consti]`` to the caller of the function." -msgstr "Retorna con TOS a quien llama la función." +msgstr "Regresa con ``co_consts[consti]`` al llamador de la función." #: ../Doc/library/dis.rst:851 -#, fuzzy msgid "Yields ``STACK.pop()`` from a :term:`generator`." -msgstr "Desapila TOS y lo genera (*yield*) de un :term:`generator`." +msgstr "Produce ``STACK.pop()`` a partir de un :term:`generator`." #: ../Doc/library/dis.rst:853 msgid "oparg set to be the stack depth." -msgstr "" +msgstr "oparg establecido para ser la profundidad de la pila." #: ../Doc/library/dis.rst:856 msgid "" "oparg set to be the exception block depth, for efficient closing of " "generators." msgstr "" +"oparg está configurado para ser la profundidad del bloque de excepción, para " +"el cierre eficiente de los generadores." #: ../Doc/library/dis.rst:859 msgid "" "oparg is ``1`` if this instruction is part of a yield-from or await, and " "``0`` otherwise." msgstr "" +"oparg es ``1`` si esta instrucción es parte de un yield-from o await, y " +"``0`` en caso contrario." #: ../Doc/library/dis.rst:865 msgid "" @@ -1185,7 +1269,6 @@ msgstr "" "excepción." #: ../Doc/library/dis.rst:882 -#, fuzzy msgid "" "Re-raises the exception currently on top of the stack. If oparg is non-zero, " "pops an additional value from the stack which is used to set :attr:`~frame." @@ -1193,7 +1276,7 @@ msgid "" msgstr "" "Vuelve a generar la excepción que se encuentra actualmente en la parte " "superior de la pila. Si oparg no es cero, extrae un valor adicional de la " -"pila que se usa para establecer ``f_lasti`` del marco actual." +"pila que se utiliza para establecer :attr:`~frame.f_lasti` del marco actual." #: ../Doc/library/dis.rst:893 msgid "" @@ -1206,24 +1289,23 @@ msgstr "" "Se utiliza en los controladores de excepciones." #: ../Doc/library/dis.rst:901 -#, fuzzy msgid "" "Performs exception matching for ``except``. Tests whether the ``STACK[-2]`` " "is an exception matching ``STACK[-1]``. Pops ``STACK[-1]`` and pushes the " "boolean result of the test." msgstr "" -"Realiza coincidencias de excepciones para ``except``. Comprueba si TOS1 es " -"una excepción que coincide con TOS. Aparece TOS y agrega el resultado " -"booleano de la prueba." +"Realiza una comparación de excepciones para ``except``. Comprueba si " +"``STACK[-2]`` es una comparación de excepciones con ``STACK[-1]``. Extrae " +"``STACK[-1]`` y envía el resultado booleano de la prueba." #: ../Doc/library/dis.rst:909 -#, fuzzy msgid "" "Performs exception matching for ``except*``. Applies ``split(STACK[-1])`` on " "the exception group representing ``STACK[-2]``." msgstr "" -"Realiza coincidencias de excepciones para ``except*``. Aplica ``split(TOS)`` " -"en el grupo de excepción que representa TOS1." +"Realiza la coincidencia de excepciones para ``except*``. Aplica " +"``split(STACK[-1])`` en el grupo de excepciones que representa a " +"``STACK[-2]``." #: ../Doc/library/dis.rst:912 msgid "" @@ -1267,12 +1349,11 @@ msgstr "" "keyword:`assert`." #: ../Doc/library/dis.rst:943 -#, fuzzy msgid "" "Pushes :func:`!builtins.__build_class__` onto the stack. It is later called " "to construct a class." msgstr "" -"Agrega :func:`builtins.__build_class__` a la pila. Más tarde se llama para " +"Coloca :func:`!builtins.__build_class__` en la pila. Luego se lo llama para " "construir una clase." #: ../Doc/library/dis.rst:949 @@ -1291,23 +1372,21 @@ msgstr "" #: ../Doc/library/dis.rst:960 msgid "Perform ``STACK.append(len(STACK[-1]))``." -msgstr "" +msgstr "Ejecutar ``STACK.append(len(STACK[-1]))``." #: ../Doc/library/dis.rst:967 -#, fuzzy msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Mapping` (or, " "more technically: if it has the :c:macro:`Py_TPFLAGS_MAPPING` flag set in " "its :c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " "Otherwise, push ``False``." msgstr "" -"Si TOS es una instancia de :class:`collections.abc.Mapping` (o, más " -"técnicamente, si tiene el indicador :const:`Py_TPFLAGS_MAPPING` establecido " -"en su :c:member:`~PyTypeObject.tp_flags`), apila ``True`` en la pila. De lo " -"contrario apila ``False``." +"Si ``STACK[-1]`` es una instancia de :class:`collections.abc.Mapping` (o, " +"más técnicamente: si tiene el indicador :c:macro:`Py_TPFLAGS_MAPPING` " +"establecido en su :c:member:`~PyTypeObject.tp_flags`), inserte ``True`` en " +"la pila. De lo contrario, inserte ``False``." #: ../Doc/library/dis.rst:977 -#, fuzzy msgid "" "If ``STACK[-1]`` is an instance of :class:`collections.abc.Sequence` and is " "*not* an instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, " @@ -1315,22 +1394,22 @@ msgid "" "its :c:member:`~PyTypeObject.tp_flags`), push ``True`` onto the stack. " "Otherwise, push ``False``." msgstr "" -"Si TOS es una instancia de :class:`collections.abc.Sequence` y *no* es una " -"instancia de :class:`str`/:class:`bytes`/:class:`bytearray` (o, más " -"técnicamente, si tiene el indicador :const:`Py_TPFLAGS_SEQUENCE` " -"establecido en su :c:member:`~PyTypeObject.tp_flags`), apila ``True`` en la " -"pila. De lo contrario apila ``False``." +"Si ``STACK[-1]`` es una instancia de :class:`collections.abc.Sequence` y " +"*not* es una instancia de :class:`str`/:class:`bytes`/:class:`bytearray` (o, " +"más técnicamente: si tiene el indicador :c:macro:`Py_TPFLAGS_SEQUENCE` " +"establecido en su :c:member:`~PyTypeObject.tp_flags`), inserte ``True`` en " +"la pila. De lo contrario, inserte ``False``." #: ../Doc/library/dis.rst:987 -#, fuzzy msgid "" "``STACK[-1]`` is a tuple of mapping keys, and ``STACK[-2]`` is the match " "subject. If ``STACK[-2]`` contains all of the keys in ``STACK[-1]``, push a :" "class:`tuple` containing the corresponding values. Otherwise, push ``None``." msgstr "" -"TOS es una tupla de claves de mapeo y TOS1 es el sujeto de coincidencia. Si " -"TOS1 contiene todas las claves en TOS, agrega un :class:`tuple` que contenga " -"los valores correspondientes. De lo contrario, agrega ``None``." +"``STACK[-1]`` es una tupla de claves de mapeo y ``STACK[-2]`` es el sujeto " +"de la coincidencia. Si ``STACK[-2]`` contiene todas las claves de " +"``STACK[-1]``, inserte un :class:`tuple` que contenga los valores " +"correspondientes. De lo contrario, inserte ``None``." #: ../Doc/library/dis.rst:993 ../Doc/library/dis.rst:1664 msgid "" @@ -1341,57 +1420,59 @@ msgstr "" "indicaba éxito (``True``) o falla (``False``)." #: ../Doc/library/dis.rst:1000 -#, fuzzy msgid "" "Implements ``name = STACK.pop()``. *namei* is the index of *name* in the " "attribute :attr:`~codeobject.co_names` of the :ref:`code object `. The compiler tries to use :opcode:`STORE_FAST` or :opcode:" "`STORE_GLOBAL` if possible." msgstr "" -"Implementa ``name = TOS``. *namei* es el índice de *name* en el atributo :" -"attr:`co_names` del objeto de código. El compilador intenta usar :opcode:" -"`STORE_FAST` o :opcode:`STORE_GLOBAL` si es posible." +"Implementa ``name = STACK.pop()``. *namei* es el índice de *name* en el " +"atributo :attr:`~codeobject.co_names` de :ref:`code object `. " +"El compilador intenta utilizar :opcode:`STORE_FAST` o :opcode:`STORE_GLOBAL` " +"si es posible." #: ../Doc/library/dis.rst:1007 -#, fuzzy msgid "" "Implements ``del name``, where *namei* is the index into :attr:`~codeobject." "co_names` attribute of the :ref:`code object `." msgstr "" -"Implementa ``del name``, donde *namei* es el índice en atributo :attr:" -"`co_names` del objeto de código." +"Implementa ``del name``, donde *namei* es el índice en el atributo :attr:" +"`~codeobject.co_names` del :ref:`code object `." #: ../Doc/library/dis.rst:1013 -#, fuzzy msgid "" "Unpacks ``STACK[-1]`` into *count* individual values, which are put onto the " "stack right-to-left. Require there to be exactly *count* values.::" msgstr "" -"Descomprime TOS en *count* valores individuales, que se colocan en la pila " -"de derecha a izquierda." +"Descomprime ``STACK[-1]`` en valores individuales *count*, que se colocan en " +"la pila de derecha a izquierda. Requiere que haya exactamente valores " +"*count*.::" #: ../Doc/library/dis.rst:1016 msgid "" "assert(len(STACK[-1]) == count)\n" "STACK.extend(STACK.pop()[:-count-1:-1])" msgstr "" +"assert(len(STACK[-1]) == count)\n" +"STACK.extend(STACK.pop()[:-count-1:-1])" #: ../Doc/library/dis.rst:1022 -#, fuzzy msgid "" "Implements assignment with a starred target: Unpacks an iterable in " "``STACK[-1]`` into individual values, where the total number of values can " "be smaller than the number of items in the iterable: one of the new values " "will be a list of all leftover items." msgstr "" -"Implementa la asignación con un objetivo destacado: desempaqueta un iterable " -"en TOS en valores individuales, donde el número total de valores puede ser " -"menor que el número de elementos en el iterable: uno de los nuevos valores " -"será una lista de todos los elementos sobrantes." +"Implementa la asignación con un objetivo destacado: descomprime un iterable " +"en ``STACK[-1]`` en valores individuales, donde la cantidad total de valores " +"puede ser menor que la cantidad de elementos en el iterable: uno de los " +"nuevos valores será una lista de todos los elementos restantes." #: ../Doc/library/dis.rst:1027 msgid "The number of values before and after the list value is limited to 255." msgstr "" +"El número de valores antes y después del valor de la lista está limitado a " +"255." #: ../Doc/library/dis.rst:1029 msgid "" @@ -1401,12 +1482,21 @@ msgid "" "values where the low byte of *counts* is the number of values before the " "list value, the high byte of *counts* the number of values after it." msgstr "" +"La cantidad de valores antes del valor de la lista se codifica en el " +"argumento del código de operación. La cantidad de valores después de la " +"lista, si los hay, se codifica utilizando un ``EXTENDED_ARG``. Como " +"consecuencia, el argumento puede verse como valores de dos bytes, donde el " +"byte bajo de *counts* es la cantidad de valores antes del valor de la lista " +"y el byte alto de *counts*, la cantidad de valores después de este." #: ../Doc/library/dis.rst:1035 msgid "" "The extracted values are put onto the stack right-to-left, i.e. ``a, *b, c = " "d`` will be stored after execution as ``STACK.extend((a, b, c))``." msgstr "" +"Los valores extraídos se colocan en la pila de derecha a izquierda, es " +"decir, ``a, *b, c = d`` se almacenará después de la ejecución como ``STACK." +"extend((a, b, c))``." #: ../Doc/library/dis.rst:1043 msgid "" @@ -1414,30 +1504,33 @@ msgid "" "value = STACK.pop()\n" "obj.name = value" msgstr "" +"obj = STACK.pop()\n" +"value = STACK.pop()\n" +"obj.name = value" #: ../Doc/library/dis.rst:1047 -#, fuzzy msgid "" "where *namei* is the index of name in :attr:`~codeobject.co_names` of the :" "ref:`code object `." msgstr "" -"Implementa ``del name``, donde *namei* es el índice en atributo :attr:" -"`co_names` del objeto de código." +"donde *namei* es el índice del nombre en :attr:`~codeobject.co_names` del :" +"ref:`code object `." #: ../Doc/library/dis.rst:1054 msgid "" "obj = STACK.pop()\n" "del obj.name" msgstr "" +"obj = STACK.pop()\n" +"del obj.name" #: ../Doc/library/dis.rst:1057 -#, fuzzy msgid "" "where *namei* is the index of name into :attr:`~codeobject.co_names` of the :" "ref:`code object `." msgstr "" -"Implementa ``del name``, donde *namei* es el índice en atributo :attr:" -"`co_names` del objeto de código." +"donde *namei* es el índice del nombre en :attr:`~codeobject.co_names` del :" +"ref:`code object `." #: ../Doc/library/dis.rst:1063 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." @@ -1453,11 +1546,13 @@ msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "Apila ``co_consts[consti]`` en la pila." #: ../Doc/library/dis.rst:1078 -#, fuzzy msgid "" "Pushes the value associated with ``co_names[namei]`` onto the stack. The " "name is looked up within the locals, then the globals, then the builtins." -msgstr "Apila el valor asociado con ``co_names [namei]`` en la pila." +msgstr "" +"Introduce el valor asociado con ``co_names[namei]`` en la pila. El nombre se " +"busca en las variables locales, luego en las variables globales y luego en " +"las integradas." #: ../Doc/library/dis.rst:1084 msgid "" @@ -1465,6 +1560,9 @@ msgid "" "prepare namespace dictionaries for :opcode:`LOAD_FROM_DICT_OR_DEREF` and :" "opcode:`LOAD_FROM_DICT_OR_GLOBALS`." msgstr "" +"Introduce una referencia al diccionario de variables locales en la pila. " +"Esto se utiliza para preparar diccionarios de espacios de nombres para :" +"opcode:`LOAD_FROM_DICT_OR_DEREF` y :opcode:`LOAD_FROM_DICT_OR_GLOBALS`." #: ../Doc/library/dis.rst:1093 msgid "" @@ -1474,15 +1572,19 @@ msgid "" "variables in :ref:`annotation scopes ` within class " "bodies." msgstr "" +"Extrae una asignación de la pila y busca el valor de ``co_names[namei]``. Si " +"no se encuentra el nombre allí, lo busca en las variables globales y luego " +"en las integradas, de forma similar a :opcode:`LOAD_GLOBAL`. Esto se utiliza " +"para cargar variables globales en :ref:`annotation scopes ` dentro de los cuerpos de clase." #: ../Doc/library/dis.rst:1104 -#, fuzzy msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack::" msgstr "" -"Crea una tupla que consume elementos *count* de la pila, y apila la tupla " -"resultante a la pila." +"Crea una tupla que consume elementos *count* de la pila y envía la tupla " +"resultante a la pila::" #: ../Doc/library/dis.rst:1107 msgid "" @@ -1494,6 +1596,13 @@ msgid "" "\n" "STACK.append(value)" msgstr "" +"if count == 0:\n" +" value = ()\n" +"else:\n" +" value = tuple(STACK[-count:])\n" +" STACK = STACK[:-count]\n" +"\n" +"STACK.append(value)" #: ../Doc/library/dis.rst:1118 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." @@ -1504,15 +1613,14 @@ msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "Funciona como :opcode:`BUILD_TUPLE`, pero crea un conjunto." #: ../Doc/library/dis.rst:1128 -#, fuzzy msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., STACK[-4]: STACK[-3], " "STACK[-2]: STACK[-1]}``." msgstr "" -"Apila un nuevo objeto de diccionario en la pila. Desapila ``2 * count`` " -"elementos para que el diccionario contenga *count* entradas: ``{..., TOS3: " -"TOS2, TOS1: TOS}``." +"Inserta un nuevo objeto de diccionario en la pila. Extrae elementos ``2 * " +"count`` para que el diccionario contenga entradas *count*: ``{..., " +"STACK[-4]: STACK[-3], STACK[-2]: STACK[-1]}``." #: ../Doc/library/dis.rst:1132 msgid "" @@ -1523,16 +1631,15 @@ msgstr "" "diccionario vacío dimensionado previamente para contener *count* elementos." #: ../Doc/library/dis.rst:1139 -#, fuzzy msgid "" "The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the " "top element on the stack which contains a tuple of keys, then starting from " "``STACK[-2]``, pops *count* values to form values in the built dictionary." msgstr "" "La versión de :opcode:`BUILD_MAP` especializada para claves constantes. " -"Desapila el elemento superior en la pila que contiene una tupla de claves, " -"luego, a partir de ``TOS1``, muestra los valores *count* para formar valores " -"en el diccionario incorporado." +"Extrae el elemento superior de la pila que contiene una tupla de claves y, a " +"partir de ``STACK[-2]``, extrae los valores de *count* para formar valores " +"en el diccionario creado." #: ../Doc/library/dis.rst:1148 msgid "" @@ -1547,30 +1654,36 @@ msgid "" "seq = STACK.pop()\n" "list.extend(STACK[-i], seq)" msgstr "" +"seq = STACK.pop()\n" +"list.extend(STACK[-i], seq)" #: ../Doc/library/dis.rst:1161 msgid "Used to build lists." -msgstr "" +msgstr "Se utiliza para crear listas." #: ../Doc/library/dis.rst:1170 msgid "" "seq = STACK.pop()\n" "set.update(STACK[-i], seq)" msgstr "" +"seq = STACK.pop()\n" +"set.update(STACK[-i], seq)" #: ../Doc/library/dis.rst:1173 msgid "Used to build sets." -msgstr "" +msgstr "Se utiliza para construir decorados." #: ../Doc/library/dis.rst:1182 msgid "" "map = STACK.pop()\n" "dict.update(STACK[-i], map)" msgstr "" +"map = STACK.pop()\n" +"dict.update(STACK[-i], map)" #: ../Doc/library/dis.rst:1185 msgid "Used to build dicts." -msgstr "" +msgstr "Se utiliza para crear diccionarios." #: ../Doc/library/dis.rst:1192 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." @@ -1582,9 +1695,10 @@ msgid "" "If the low bit of ``namei`` is not set, this replaces ``STACK[-1]`` with " "``getattr(STACK[-1], co_names[namei>>1])``." msgstr "" +"Si el bit bajo de ``namei`` no está configurado, esto reemplaza " +"``STACK[-1]`` con ``getattr(STACK[-1], co_names[namei>>1])``." #: ../Doc/library/dis.rst:1202 -#, fuzzy msgid "" "If the low bit of ``namei`` is set, this will attempt to load a method named " "``co_names[namei>>1]`` from the ``STACK[-1]`` object. ``STACK[-1]`` is " @@ -1595,21 +1709,23 @@ msgid "" "Otherwise, ``NULL`` and the object returned by the attribute lookup are " "pushed." msgstr "" -"Carga un método denominado ``co_names[namei]`` desde el objeto TOS. TOS es " -"retirado. Este código de bytes distingue dos casos: si TOS tiene un método " -"con el nombre correcto, el código de bytes agrega el método independiente y " -"TOS. :opcode:`CALL` utilizará TOS como primer argumento (``self``) al llamar " -"al método independiente. De lo contrario, se agregan ``NULL`` y el objeto " -"devuelto por la búsqueda de atributos." +"Si se establece el bit bajo de ``namei``, se intentará cargar un método " +"llamado ``co_names[namei>>1]`` desde el objeto ``STACK[-1]``. Se extrae " +"``STACK[-1]``. Este código de bytes distingue dos casos: si ``STACK[-1]`` " +"tiene un método con el nombre correcto, el código de bytes inserta el método " +"no vinculado y ``STACK[-1]``. :opcode:`CALL` o :opcode:`CALL_KW` utilizarán " +"``STACK[-1]`` como primer argumento (``self``) al llamar al método no " +"vinculado. De lo contrario, se insertan ``NULL`` y el objeto devuelto por la " +"búsqueda de atributos." #: ../Doc/library/dis.rst:1211 -#, fuzzy msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` or ``self`` is pushed to " "the stack before the attribute or unbound method respectively." msgstr "" -"Si se establece el bit bajo de ``namei``, se agrega un ``NULL`` a la pila " -"antes de la variable global." +"Si se establece el bit bajo de ``namei``, entonces se inserta un ``NULL`` o " +"``self`` en la pila antes del atributo o el método no vinculado " +"respectivamente." #: ../Doc/library/dis.rst:1218 msgid "" @@ -1617,28 +1733,36 @@ msgid "" "argument forms (e.g. ``super().method()``, ``super().attr`` and ``super(cls, " "self).method()``, ``super(cls, self).attr``)." msgstr "" +"Este código de operación implementa :func:`super`, tanto en su forma de cero " +"argumentos como de dos argumentos (por ejemplo, ``super().method()``, " +"``super().attr`` y ``super(cls, self).method()``, ``super(cls, self).attr``)." #: ../Doc/library/dis.rst:1222 msgid "It pops three values from the stack (from top of stack down):" msgstr "" +"Extrae tres valores de la pila (desde la parte superior de la pila hacia " +"abajo):" #: ../Doc/library/dis.rst:1224 msgid "``self``: the first argument to the current method" -msgstr "" +msgstr "``self``: el primer argumento del método actual" #: ../Doc/library/dis.rst:1225 msgid "``cls``: the class within which the current method was defined" -msgstr "" +msgstr "``cls``: la clase dentro de la cual se definió el método actual" #: ../Doc/library/dis.rst:1226 msgid "the global ``super``" -msgstr "" +msgstr "El ``super`` global" #: ../Doc/library/dis.rst:1228 msgid "" "With respect to its argument, it works similarly to :opcode:`LOAD_ATTR`, " "except that ``namei`` is shifted left by 2 bits instead of 1." msgstr "" +"Con respecto a su argumento, funciona de manera similar a :opcode:" +"`LOAD_ATTR`, excepto que ``namei`` se desplaza hacia la izquierda 2 bits en " +"lugar de 1." #: ../Doc/library/dis.rst:1231 msgid "" @@ -1646,28 +1770,37 @@ msgid "" "`LOAD_ATTR`, which results in pushing ``NULL`` and the loaded method. When " "it is unset a single value is pushed to the stack." msgstr "" +"El bit bajo de ``namei`` indica que se debe intentar cargar un método, como " +"en el caso de :opcode:`LOAD_ATTR`, lo que da como resultado la inserción de " +"``NULL`` y el método cargado. Cuando no está configurado, se inserta un solo " +"valor en la pila." #: ../Doc/library/dis.rst:1235 msgid "" "The second-low bit of ``namei``, if set, means that this was a two-argument " "call to :func:`super` (unset means zero-argument)." msgstr "" +"El segundo bit bajo de ``namei``, si está configurado, significa que esta " +"fue una llamada de dos argumentos a :func:`super` (si no está configurado " +"significa cero argumentos)." #: ../Doc/library/dis.rst:1243 -#, fuzzy msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname >> 5]``. If the fifth-lowest bit of ``opname`` is set " "(``opname & 16``), the result should be coerced to ``bool``." msgstr "" "Realiza una operación booleana. El nombre de la operación se puede encontrar " -"en ``cmp_op[opname]``." +"en ``cmp_op[opname >> 5]``. Si se establece el quinto bit más bajo de " +"``opname`` (``opname & 16``), el resultado se debe convertir a ``bool``." #: ../Doc/library/dis.rst:1247 msgid "" "The fifth-lowest bit of the oparg now indicates a forced conversion to :" "class:`bool`." msgstr "" +"El quinto bit más bajo del oparg ahora indica una conversión forzada a :" +"class:`bool`." #: ../Doc/library/dis.rst:1254 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." @@ -1678,7 +1811,6 @@ msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "Realiza una comparación ``in`` o ``not in`` si ``invert`` es 1." #: ../Doc/library/dis.rst:1268 -#, fuzzy msgid "" "Imports the module ``co_names[namei]``. ``STACK[-1]`` and ``STACK[-2]`` are " "popped and provide the *fromlist* and *level* arguments of :func:" @@ -1686,22 +1818,22 @@ msgid "" "namespace is not affected: for a proper import statement, a subsequent :" "opcode:`STORE_FAST` instruction modifies the namespace." msgstr "" -"Importa el módulo ``co_names[namei]``. TOS y TOS1 aparecen y proporcionan " -"los argumentos *fromlist* y *level* de :func:`__import__`. El objeto del " -"módulo se empuja a la pila. El espacio de nombres actual no se ve afectado: " -"para una instrucción de importación adecuada, una instrucción posterior :" -"opcode:`STORE_FAST` modifica el espacio de nombres." +"Importa el módulo ``co_names[namei]``. Se extraen ``STACK[-1]`` y " +"``STACK[-2]`` y proporcionan los argumentos *fromlist* y *level* de :func:" +"`__import__`. El objeto del módulo se coloca en la pila. El espacio de " +"nombres actual no se ve afectado: para una declaración de importación " +"adecuada, una instrucción :opcode:`STORE_FAST` posterior modifica el espacio " +"de nombres." #: ../Doc/library/dis.rst:1276 -#, fuzzy msgid "" "Loads the attribute ``co_names[namei]`` from the module found in " "``STACK[-1]``. The resulting object is pushed onto the stack, to be " "subsequently stored by a :opcode:`STORE_FAST` instruction." msgstr "" -"Carga el atributo ``co_names[namei]`` del módulo que se encuentra en TOS. El " -"objeto resultante se apila en la pila, para luego ser almacenado por la " -"instrucción :opcode:`STORE_FAST`." +"Carga el atributo ``co_names[namei]`` del módulo que se encuentra en " +"``STACK[-1]``. El objeto resultante se coloca en la pila para ser almacenado " +"posteriormente mediante una instrucción :opcode:`STORE_FAST`." #: ../Doc/library/dis.rst:1283 msgid "Increments bytecode counter by *delta*." @@ -1719,13 +1851,12 @@ msgstr "" "Decrementa el contador de bytecode en *delta*. No busca interrupciones." #: ../Doc/library/dis.rst:1302 -#, fuzzy msgid "" "If ``STACK[-1]`` is true, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -"Si TOS es verdadero, incrementa el contador de bytecode en *delta*. TOS es " -"retirado." +"Si ``STACK[-1]`` es verdadero, incrementa el contador de bytecode en " +"*delta*. Se elimina ``STACK[-1]``." #: ../Doc/library/dis.rst:1305 ../Doc/library/dis.rst:1321 msgid "" @@ -1733,61 +1864,62 @@ msgid "" "opcode is a pseudo-instruction, replaced in final bytecode by the directed " "versions (forward/backward)." msgstr "" +"El oparg ahora es un delta relativo en lugar de un objetivo absoluto. Este " +"código de operación es una pseudoinstrucción, reemplazada en el bytecode " +"final por las versiones dirigidas (hacia adelante/hacia atrás)." #: ../Doc/library/dis.rst:1310 ../Doc/library/dis.rst:1326 #: ../Doc/library/dis.rst:1342 ../Doc/library/dis.rst:1356 msgid "This is no longer a pseudo-instruction." -msgstr "" +msgstr "Esto ya no es una pseudoinstrucción." #: ../Doc/library/dis.rst:1318 -#, fuzzy msgid "" "If ``STACK[-1]`` is false, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -"Si TOS es falso, incrementa el contador de bytecode en *delta*. TOS es " -"retirado." +"Si ``STACK[-1]`` es falso, incrementa el contador de bytecode en *delta*. Se " +"elimina ``STACK[-1]``." #: ../Doc/library/dis.rst:1334 -#, fuzzy msgid "" "If ``STACK[-1]`` is not ``None``, increments the bytecode counter by " "*delta*. ``STACK[-1]`` is popped." msgstr "" -"Si TOS no es ``None``, incrementa el contador de bytecode en *delta*. TOS es " -"retirado." +"Si ``STACK[-1]`` no es ``None``, incrementa el contador de bytecode en " +"*delta*. Se elimina ``STACK[-1]``." #: ../Doc/library/dis.rst:1337 ../Doc/library/dis.rst:1351 msgid "" "This opcode is a pseudo-instruction, replaced in final bytecode by the " "directed versions (forward/backward)." msgstr "" +"Este código de operación es una pseudoinstrucción, reemplazada en el código " +"de bytes final por las versiones dirigidas (adelante/atrás)." #: ../Doc/library/dis.rst:1348 -#, fuzzy msgid "" "If ``STACK[-1]`` is ``None``, increments the bytecode counter by *delta*. " "``STACK[-1]`` is popped." msgstr "" -"Si TOS es ``None``, incrementa el contador de bytecode en *delta*. TOS es " -"retirado." +"Si ``STACK[-1]`` es ``None``, incrementa el contador de bytecode en *delta*. " +"Se elimina ``STACK[-1]``." #: ../Doc/library/dis.rst:1361 -#, fuzzy msgid "" "``STACK[-1]`` is an :term:`iterator`. Call its :meth:`~iterator.__next__` " "method. If this yields a new value, push it on the stack (leaving the " "iterator below it). If the iterator indicates it is exhausted then the byte " "code counter is incremented by *delta*." msgstr "" -"TOS es un :term:`iterador`. Llama a su método :meth:`~iterator.__next__`. Si " -"esto produce un nuevo valor, lo apila en la pila (dejando el iterador debajo " -"de él). Si el iterador indica que está agotado, se abre TOS y el contador de " -"código de bytes se incrementa en *delta*." +"``STACK[-1]`` es un :term:`iterator`. Llama a su método :meth:`~iterator." +"__next__`. Si esto produce un nuevo valor, colócalo en la pila (dejando el " +"iterador debajo de él). Si el iterador indica que está agotado, el contador " +"de código de bytes se incrementa en *delta*." #: ../Doc/library/dis.rst:1366 msgid "Up until 3.11 the iterator was popped when it was exhausted." -msgstr "" +msgstr "Hasta la versión 3.11, el iterador se activaba cuando se agotaba." #: ../Doc/library/dis.rst:1371 msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." @@ -1811,14 +1943,18 @@ msgid "" "This opcode is now only used in situations where the local variable is " "guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`." msgstr "" +"Este código de operación ahora solo se utiliza en situaciones en las que se " +"garantiza que la variable local se inicializará. No puede generar :exc:" +"`UnboundLocalError`." #: ../Doc/library/dis.rst:1387 -#, fuzzy msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack, " "raising an :exc:`UnboundLocalError` if the local variable has not been " "initialized." -msgstr "Apila una referencia al local ``co_varnames[var_num]`` sobre la pila." +msgstr "" +"Inserta una referencia al ``co_varnames[var_num]`` local en la pila y genera " +"un :exc:`UnboundLocalError` si la variable local no se ha inicializado." #: ../Doc/library/dis.rst:1395 msgid "" @@ -1826,24 +1962,25 @@ msgid "" "pushes ``NULL`` onto the stack if the local variable has not been " "initialized) and sets ``co_varnames[var_num]`` to ``NULL``." msgstr "" +"Inserta una referencia al ``co_varnames[var_num]`` local en la pila (o " +"inserta ``NULL`` en la pila si la variable local no se ha inicializado) y " +"establece ``co_varnames[var_num]`` en ``NULL``." #: ../Doc/library/dis.rst:1403 -#, fuzzy msgid "Stores ``STACK.pop()`` into the local ``co_varnames[var_num]``." -msgstr "Almacena TOS en el local ``co_varnames[var_num]``." +msgstr "Almacena ``STACK.pop()`` en el ``co_varnames[var_num]`` local." #: ../Doc/library/dis.rst:1408 msgid "Deletes local ``co_varnames[var_num]``." msgstr "Elimina la ``co_varnames[var_num]`` local." #: ../Doc/library/dis.rst:1413 -#, fuzzy msgid "" "Creates a new cell in slot ``i``. If that slot is nonempty then that value " "is stored into the new cell." msgstr "" -"Crea una nueva celda en la ranura ``i``. Si esa ranura está vacía, ese valor " -"se almacena en la nueva celda." +"Crea una nueva celda en la ranura ``i``. Si esa ranura no está vacía, ese " +"valor se almacena en la nueva celda." #: ../Doc/library/dis.rst:1421 msgid "" @@ -1855,10 +1992,11 @@ msgstr "" #: ../Doc/library/dis.rst:1424 ../Doc/library/dis.rst:1446 #: ../Doc/library/dis.rst:1457 -#, fuzzy msgid "" "``i`` is no longer offset by the length of :attr:`~codeobject.co_varnames`." -msgstr "``i`` ya no se compensa con la longitud de ``co_varnames``." +msgstr "" +"``i`` ya no está compensado por la longitud de :attr:`~codeobject." +"co_varnames`." #: ../Doc/library/dis.rst:1430 msgid "" @@ -1869,15 +2007,21 @@ msgid "" "(which previously used :opcode:`!LOAD_CLASSDEREF`) and in :ref:`annotation " "scopes ` within class bodies." msgstr "" +"Extrae una asignación de la pila y busca el nombre asociado con la ranura " +"``i`` del almacenamiento de \"variables locales rápidas\" en esta " +"asignación. Si no se encuentra el nombre allí, lo carga desde la celda " +"contenida en la ranura ``i``, de manera similar a :opcode:`LOAD_DEREF`. Esto " +"se utiliza para cargar variables libres en cuerpos de clase (que " +"anteriormente utilizaban :opcode:`!LOAD_CLASSDEREF`) y en :ref:`annotation " +"scopes ` dentro de cuerpos de clase." #: ../Doc/library/dis.rst:1443 -#, fuzzy msgid "" "Stores ``STACK.pop()`` into the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -"Almacena TOS en la celda contenida en la ranura ``i`` del almacenamiento " -"\"locales rápidos\"." +"Almacena ``STACK.pop()`` en la celda contenida en la ranura ``i`` del " +"almacenamiento de \"locales rápidos\"." #: ../Doc/library/dis.rst:1452 msgid "" @@ -1908,30 +2052,27 @@ msgid "0: ``raise`` (re-raise previous exception)" msgstr "0: ``raise`` (vuelve a lanzar la excepción anterior)" #: ../Doc/library/dis.rst:1476 -#, fuzzy msgid "" "1: ``raise STACK[-1]`` (raise exception instance or type at ``STACK[-1]``)" -msgstr "1: ``raise TOS`` (lanza instancia de excepción o un tipo en ``TOS``)" +msgstr "" +"1: ``raise STACK[-1]`` (generar instancia o tipo de excepción en " +"``STACK[-1]``)" #: ../Doc/library/dis.rst:1477 -#, fuzzy msgid "" "2: ``raise STACK[-2] from STACK[-1]`` (raise exception instance or type at " "``STACK[-2]`` with ``__cause__`` set to ``STACK[-1]``)" msgstr "" -"2: ``raise TOS1 desde TOS`` (lanza una instancia de excepción o tipo en " -"``TOS1`` con ``__cause__`` establecida en ``TOS``)" +"2: ``raise STACK[-2] from STACK[-1]`` (generar una instancia o tipo de " +"excepción en ``STACK[-2]`` con ``__cause__`` establecido en ``STACK[-1]``)" #: ../Doc/library/dis.rst:1483 -#, fuzzy msgid "" "Calls a callable object with the number of arguments specified by ``argc``. " "On the stack are (in ascending order):" msgstr "" "Llama a un objeto invocable con la cantidad de argumentos especificados por " -"``argc``, incluidos los argumentos con nombre especificados por el :opcode:" -"`KW_NAMES` anterior, si los hay. En la pila están (en orden ascendente), ya " -"sea:" +"``argc``. En la pila se encuentran (en orden ascendente):" #: ../Doc/library/dis.rst:1486 ../Doc/library/dis.rst:1510 msgid "The callable" @@ -1939,18 +2080,16 @@ msgstr "El llamable" #: ../Doc/library/dis.rst:1487 ../Doc/library/dis.rst:1511 msgid "``self`` or ``NULL``" -msgstr "" +msgstr "``self`` o ``NULL``" #: ../Doc/library/dis.rst:1488 ../Doc/library/dis.rst:1512 msgid "The remaining positional arguments" msgstr "Los argumentos posicionales restantes" #: ../Doc/library/dis.rst:1490 -#, fuzzy msgid "``argc`` is the total of the positional arguments, excluding ``self``." msgstr "" -"``argc`` es el total de los argumentos posicionales y con nombre, excluyendo " -"``self`` cuando ``NULL`` no está presente." +"``argc`` es el total de los argumentos posicionales, excluyendo ``self``." #: ../Doc/library/dis.rst:1492 msgid "" @@ -1965,21 +2104,22 @@ msgstr "" #: ../Doc/library/dis.rst:1498 msgid "The callable now always appears at the same position on the stack." msgstr "" +"El objeto invocable ahora siempre aparece en la misma posición en la pila." #: ../Doc/library/dis.rst:1501 msgid "Calls with keyword arguments are now handled by :opcode:`CALL_KW`." msgstr "" +"Las llamadas con argumentos de palabras clave ahora son manejadas por :" +"opcode:`CALL_KW`." #: ../Doc/library/dis.rst:1507 -#, fuzzy msgid "" "Calls a callable object with the number of arguments specified by ``argc``, " "including one or more named arguments. On the stack are (in ascending order):" msgstr "" "Llama a un objeto invocable con la cantidad de argumentos especificados por " -"``argc``, incluidos los argumentos con nombre especificados por el :opcode:" -"`KW_NAMES` anterior, si los hay. En la pila están (en orden ascendente), ya " -"sea:" +"``argc``, incluidos uno o más argumentos nombrados. En la pila se encuentran " +"(en orden ascendente):" #: ../Doc/library/dis.rst:1513 msgid "The named arguments" @@ -1987,28 +2127,27 @@ msgstr "Los argumentos nombrados" #: ../Doc/library/dis.rst:1514 msgid "A :class:`tuple` of keyword argument names" -msgstr "" +msgstr "Un :class:`tuple` de nombres de argumentos de palabras clave" #: ../Doc/library/dis.rst:1516 -#, fuzzy msgid "" "``argc`` is the total of the positional and named arguments, excluding " "``self``. The length of the tuple of keyword argument names is the number of " "named arguments." msgstr "" -"``argc`` es el total de los argumentos posicionales y con nombre, excluyendo " -"``self`` cuando ``NULL`` no está presente." +"``argc`` es el total de argumentos posicionales y nombrados, excluido " +"``self``. La longitud de la tupla de nombres de argumentos de palabras clave " +"es la cantidad de argumentos nombrados." #: ../Doc/library/dis.rst:1519 -#, fuzzy msgid "" "``CALL_KW`` pops all arguments, the keyword names, and the callable object " "off the stack, calls the callable object with those arguments, and pushes " "the return value returned by the callable object." msgstr "" -"``CALL`` extrae todos los argumentos y el objeto invocable de la pila, llama " -"al objeto invocable con esos argumentos y agrega el valor retornado por el " -"objeto invocable." +"``CALL_KW`` extrae todos los argumentos, los nombres de palabras clave y el " +"objeto invocable de la pila, llama al objeto invocable con esos argumentos y " +"envía el valor de retorno devuelto por el objeto invocable." #: ../Doc/library/dis.rst:1528 msgid "" @@ -2045,6 +2184,8 @@ msgid "" "Pushes a new function object on the stack built from the code object at " "``STACK[1]``." msgstr "" +"Inserta un nuevo objeto de función en la pila creado a partir del objeto de " +"código en ``STACK[1]``." #: ../Doc/library/dis.rst:1554 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" @@ -2054,13 +2195,15 @@ msgstr "" #: ../Doc/library/dis.rst:1557 msgid "Qualified name at ``STACK[-1]`` was removed." -msgstr "" +msgstr "Se eliminó el nombre calificado en ``STACK[-1]``." #: ../Doc/library/dis.rst:1560 msgid "" "Extra function attributes on the stack, signaled by oparg flags, were " "removed. They now use :opcode:`SET_FUNCTION_ATTRIBUTE`." msgstr "" +"Se eliminaron los atributos de funciones adicionales en la pila, señalados " +"por indicadores oparg. Ahora utilizan :opcode:`SET_FUNCTION_ATTRIBUTE`." #: ../Doc/library/dis.rst:1567 msgid "" @@ -2069,6 +2212,10 @@ msgid "" "and leaves the function at ``STACK[-1]``. The flag determines which " "attribute to set:" msgstr "" +"Establece un atributo en un objeto de función. Espera que la función esté en " +"``STACK[-1]`` y que el valor del atributo esté establecido en ``STACK[-2]``; " +"consume ambos y deja la función en ``STACK[-1]``. El indicador determina qué " +"atributo se debe establecer:" #: ../Doc/library/dis.rst:1571 msgid "" @@ -2100,6 +2247,8 @@ msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "implements::" msgstr "" +"Coloca un objeto de segmento en la pila. *argc* debe ser 2 o 3. Si es 2, " +"implementa:" #: ../Doc/library/dis.rst:1586 msgid "" @@ -2107,10 +2256,13 @@ msgid "" "start = STACK.pop()\n" "STACK.append(slice(start, end))" msgstr "" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"STACK.append(slice(start, end))" #: ../Doc/library/dis.rst:1590 msgid "if it is 3, implements::" -msgstr "" +msgstr "Si es 3, implementa::" #: ../Doc/library/dis.rst:1592 msgid "" @@ -2119,10 +2271,15 @@ msgid "" "start = STACK.pop()\n" "STACK.append(slice(start, end, step))" msgstr "" +"step = STACK.pop()\n" +"end = STACK.pop()\n" +"start = STACK.pop()\n" +"STACK.append(slice(start, end, step))" #: ../Doc/library/dis.rst:1597 msgid "See the :func:`slice` built-in function for more information." msgstr "" +"Consulte la función incorporada :func:`slice` para obtener más información." #: ../Doc/library/dis.rst:1602 msgid "" @@ -2139,7 +2296,7 @@ msgstr "" #: ../Doc/library/dis.rst:1610 msgid "Convert value to a string, depending on ``oparg``::" -msgstr "" +msgstr "Convertir valor a cadena, dependiendo de ``oparg``::" #: ../Doc/library/dis.rst:1612 msgid "" @@ -2147,37 +2304,30 @@ msgid "" "result = func(value)\n" "STACK.append(result)" msgstr "" +"value = STACK.pop()\n" +"result = func(value)\n" +"STACK.append(result)" #: ../Doc/library/dis.rst:1616 -#, fuzzy msgid "``oparg == 1``: call :func:`str` on *value*" -msgstr "" -"``(flags & 0x03) == 0x01``: llama :func:`str` sobre *value* antes de " -"formatearlo." +msgstr "``oparg == 1``: llama :func:`str` con *value*" #: ../Doc/library/dis.rst:1617 -#, fuzzy msgid "``oparg == 2``: call :func:`repr` on *value*" -msgstr "" -"``(flags & 0x03) == 0x02``: llama :func:`repr` sobre *value* antes de " -"formatearlo." +msgstr "``oparg == 2``: llama :func:`repr` con *value*" #: ../Doc/library/dis.rst:1618 -#, fuzzy msgid "``oparg == 3``: call :func:`ascii` on *value*" -msgstr "" -"``(flags & 0x03) == 0x03``: llama :func:`ascii` sobre *value* antes de " -"formatearlo." +msgstr "``oparg == 3``: llama :func:`ascii` con *value*" #: ../Doc/library/dis.rst:1620 ../Doc/library/dis.rst:1633 #: ../Doc/library/dis.rst:1646 msgid "Used for implementing formatted literal strings (f-strings)." -msgstr "" +msgstr "Se utiliza para implementar cadenas literales formateadas (f-strings)." #: ../Doc/library/dis.rst:1627 -#, fuzzy msgid "Formats the value on top of stack::" -msgstr "Elimina el elemento de la parte superior de la pila (TOS)." +msgstr "Formatea el valor en la parte superior de la pila::" #: ../Doc/library/dis.rst:1629 msgid "" @@ -2185,10 +2335,13 @@ msgid "" "result = value.__format__(\"\")\n" "STACK.append(result)" msgstr "" +"value = STACK.pop()\n" +"result = value.__format__(\"\")\n" +"STACK.append(result)" #: ../Doc/library/dis.rst:1639 msgid "Formats the given value with the given format spec::" -msgstr "" +msgstr "Formatea el valor dado con la especificación de formato dada::" #: ../Doc/library/dis.rst:1641 msgid "" @@ -2197,29 +2350,33 @@ msgid "" "result = value.__format__(spec)\n" "STACK.append(result)" msgstr "" +"spec = STACK.pop()\n" +"value = STACK.pop()\n" +"result = value.__format__(spec)\n" +"STACK.append(result)" #: ../Doc/library/dis.rst:1653 -#, fuzzy msgid "" "``STACK[-1]`` is a tuple of keyword attribute names, ``STACK[-2]`` is the " "class being matched against, and ``STACK[-3]`` is the match subject. " "*count* is the number of positional sub-patterns." msgstr "" -"TOS es una tupla de nombres de atributos clave, TOS1 es la clase contra la " -"cual se hace la coincidencia, y TOS2 es el sujeto de la coincidencia. " -"*count* es el número de sub-patrones posicionales." +"``STACK[-1]`` es una tupla de nombres de atributos de palabras clave, " +"``STACK[-2]`` es la clase con la que se realiza la comparación y " +"``STACK[-3]`` es el sujeto de la comparación. *count* es la cantidad de " +"subpatrones posicionales." #: ../Doc/library/dis.rst:1657 -#, fuzzy msgid "" "Pop ``STACK[-1]``, ``STACK[-2]``, and ``STACK[-3]``. If ``STACK[-3]`` is an " "instance of ``STACK[-2]`` and has the positional and keyword attributes " "required by *count* and ``STACK[-1]``, push a tuple of extracted attributes. " "Otherwise, push ``None``." msgstr "" -"Retira TOS, TOS1 y TOS2. Si TOS2 es una instancia de TOS1 y tiene los " -"atributos posicionales y de palabra clave requeridos por *count* y TOS, " -"agrega una tupla de atributos extraídos. De lo contrario, agrega ``None``." +"Inserte ``STACK[-1]``, ``STACK[-2]`` y ``STACK[-3]``. Si ``STACK[-3]`` es " +"una instancia de ``STACK[-2]`` y tiene los atributos posicionales y de " +"palabras clave requeridos por *count* y ``STACK[-1]``, inserte una tupla de " +"atributos extraídos. De lo contrario, inserte ``None``." #: ../Doc/library/dis.rst:1671 msgid "A no-op. Performs internal tracing, debugging and optimization checks." @@ -2228,17 +2385,20 @@ msgstr "" "optimización." #: ../Doc/library/dis.rst:1673 -#, fuzzy msgid "" "The ``context`` oparand consists of two parts. The lowest two bits indicate " "where the ``RESUME`` occurs:" -msgstr "El operando ``where`` marca dónde ocurre el ``RESUME``:" +msgstr "" +"El operando ``context`` consta de dos partes. Los dos bits más bajos indican " +"dónde se encuentra el ``RESUME``:" #: ../Doc/library/dis.rst:1676 msgid "" "``0`` The start of a function, which is neither a generator, coroutine nor " "an async generator" msgstr "" +"``0`` El inicio de una función, que no es un generador, ni una corrutina ni " +"un generador asíncrono" #: ../Doc/library/dis.rst:1678 msgid "``1`` After a ``yield`` expression" @@ -2257,26 +2417,31 @@ msgid "" "The next bit is ``1`` if the RESUME is at except-depth ``1``, and ``0`` " "otherwise." msgstr "" +"El siguiente bit es ``1`` si RESUME está en la profundidad de excepción " +"``1``, y ``0`` en caso contrario." #: ../Doc/library/dis.rst:1687 msgid "The oparg value changed to include information about except-depth" -msgstr "" +msgstr "El valor de oparg cambió para incluir información sobre except-depth" #: ../Doc/library/dis.rst:1693 -#, fuzzy msgid "" "Create a generator, coroutine, or async generator from the current frame. " "Used as first opcode of in code object for the above mentioned callables. " "Clear the current frame and return the newly created generator." msgstr "" -"Crea un generador, corrutina o generador asíncrono a partir del marco " -"actual. Borra el marco actual y retorna el generador recién creado." +"Crea un generador, una corrutina o un generador asincrónico a partir del " +"marco actual. Se utiliza como primer código de operación del objeto de " +"código para los elementos invocables mencionados anteriormente. Borra el " +"marco actual y devuelve el generador recién creado." #: ../Doc/library/dis.rst:1702 msgid "" "Equivalent to ``STACK[-1] = STACK[-2].send(STACK[-1])``. Used in ``yield " "from`` and ``await`` statements." msgstr "" +"Equivalente a ``STACK[-1] = STACK[-2].send(STACK[-1])``. Se utiliza en las " +"instrucciones ``yield from`` y ``await``." #: ../Doc/library/dis.rst:1705 msgid "" @@ -2284,23 +2449,28 @@ msgid "" "push the exception's ``value`` attribute, and increment the bytecode counter " "by *delta*." msgstr "" +"Si la llamada genera :exc:`StopIteration`, extrae el valor superior de la " +"pila, inserta el atributo ``value`` de la excepción e incrementa el contador " +"de bytecode en *delta*." #: ../Doc/library/dis.rst:1714 -#, fuzzy msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes in the range [0,255] which don't use their argument and those that " "do (``< HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -"Esto no es realmente un opcode. Identifica la línea divisoria entre los " -"opcode que no usan su argumento y los que lo hacen (``< HAVE_ARGUMENT`` y " -"``>= HAVE_ARGUMENT``, respectivamente)." +"En realidad, no se trata de un código de operación. Identifica la línea " +"divisoria entre los códigos de operación en el rango [0,255] que no utilizan " +"su argumento y los que sí lo hacen (``< HAVE_ARGUMENT`` y ``>= " +"HAVE_ARGUMENT``, respectivamente)." #: ../Doc/library/dis.rst:1718 msgid "" "If your application uses pseudo instructions or specialized instructions, " "use the :data:`hasarg` collection instead." msgstr "" +"Si su aplicación utiliza pseudoinstrucciones o instrucciones especializadas, " +"utilice la colección :data:`hasarg` en su lugar." #: ../Doc/library/dis.rst:1721 msgid "" @@ -2317,10 +2487,12 @@ msgid "" "not true that comparison with ``HAVE_ARGUMENT`` indicates whether they use " "their arg." msgstr "" +"Se agregaron instrucciones pseudo al módulo :mod:`dis`, y para ellos no es " +"cierto que la comparación con ``HAVE_ARGUMENT`` indique si usan su argumento." #: ../Doc/library/dis.rst:1730 msgid "Use :data:`hasarg` instead." -msgstr "" +msgstr "Utilice :data:`hasarg` en su lugar." #: ../Doc/library/dis.rst:1735 msgid "" @@ -2328,110 +2500,113 @@ msgid "" "argument and sets ``STACK[-1]`` to the result. Used to implement " "functionality that is not performance critical." msgstr "" +"Llama a una función intrínseca con un argumento. Pasa ``STACK[-1]`` como " +"argumento y establece ``STACK[-1]`` como resultado. Se utiliza para " +"implementar una funcionalidad que no es crítica para el rendimiento." #: ../Doc/library/dis.rst:1739 ../Doc/library/dis.rst:1793 msgid "The operand determines which intrinsic function is called:" -msgstr "" +msgstr "El operando determina qué función intrínseca se llama:" #: ../Doc/library/dis.rst:1742 ../Doc/library/dis.rst:1796 msgid "Operand" -msgstr "" +msgstr "Operando" #: ../Doc/library/dis.rst:1742 ../Doc/library/dis.rst:1796 msgid "Description" -msgstr "" +msgstr "Descripción" #: ../Doc/library/dis.rst:1744 msgid "``INTRINSIC_1_INVALID``" -msgstr "" +msgstr "``INTRINSIC_1_INVALID``" #: ../Doc/library/dis.rst:1744 ../Doc/library/dis.rst:1798 msgid "Not valid" -msgstr "" +msgstr "No válido" #: ../Doc/library/dis.rst:1746 msgid "``INTRINSIC_PRINT``" -msgstr "" +msgstr "``INTRINSIC_PRINT``" #: ../Doc/library/dis.rst:1746 msgid "Prints the argument to standard out. Used in the REPL." -msgstr "" +msgstr "Imprime el argumento en la salida estándar. Se utiliza en REPL." #: ../Doc/library/dis.rst:1749 msgid "``INTRINSIC_IMPORT_STAR``" -msgstr "" +msgstr "``INTRINSIC_IMPORT_STAR``" #: ../Doc/library/dis.rst:1749 msgid "Performs ``import *`` for the named module." -msgstr "" +msgstr "Ejecuta ``import *`` para el módulo nombrado." #: ../Doc/library/dis.rst:1752 msgid "``INTRINSIC_STOPITERATION_ERROR``" -msgstr "" +msgstr "``INTRINSIC_STOPITERATION_ERROR``" #: ../Doc/library/dis.rst:1752 msgid "Extracts the return value from a ``StopIteration`` exception." -msgstr "" +msgstr "Extrae el valor de retorno de una excepción ``StopIteration``." #: ../Doc/library/dis.rst:1755 msgid "``INTRINSIC_ASYNC_GEN_WRAP``" -msgstr "" +msgstr "``INTRINSIC_ASYNC_GEN_WRAP``" #: ../Doc/library/dis.rst:1755 msgid "Wraps an async generator value" -msgstr "" +msgstr "Envuelve un valor de generador asincrónico" #: ../Doc/library/dis.rst:1757 msgid "``INTRINSIC_UNARY_POSITIVE``" -msgstr "" +msgstr "``INTRINSIC_UNARY_POSITIVE``" #: ../Doc/library/dis.rst:1757 msgid "Performs the unary ``+`` operation" -msgstr "" +msgstr "Realiza la operación unaria ``+``" #: ../Doc/library/dis.rst:1760 msgid "``INTRINSIC_LIST_TO_TUPLE``" -msgstr "" +msgstr "``INTRINSIC_LIST_TO_TUPLE``" #: ../Doc/library/dis.rst:1760 msgid "Converts a list to a tuple" -msgstr "" +msgstr "Convierte una lista en una tupla" #: ../Doc/library/dis.rst:1762 msgid "``INTRINSIC_TYPEVAR``" -msgstr "" +msgstr "``INTRINSIC_TYPEVAR``" #: ../Doc/library/dis.rst:1762 msgid "Creates a :class:`typing.TypeVar`" -msgstr "" +msgstr "Crea un :class:`typing.TypeVar`" #: ../Doc/library/dis.rst:1764 msgid "``INTRINSIC_PARAMSPEC``" -msgstr "" +msgstr "``INTRINSIC_PARAMSPEC``" #: ../Doc/library/dis.rst:1764 msgid "Creates a :class:`typing.ParamSpec`" -msgstr "" +msgstr "Crea un :class:`typing.ParamSpec`" #: ../Doc/library/dis.rst:1767 msgid "``INTRINSIC_TYPEVARTUPLE``" -msgstr "" +msgstr "``INTRINSIC_TYPEVARTUPLE``" #: ../Doc/library/dis.rst:1767 msgid "Creates a :class:`typing.TypeVarTuple`" -msgstr "" +msgstr "Crea un :class:`typing.TypeVarTuple`" #: ../Doc/library/dis.rst:1770 msgid "``INTRINSIC_SUBSCRIPT_GENERIC``" -msgstr "" +msgstr "``INTRINSIC_SUBSCRIPT_GENERIC``" #: ../Doc/library/dis.rst:1770 msgid "Returns :class:`typing.Generic` subscripted with the argument" -msgstr "" +msgstr "Devuelve :class:`typing.Generic` subíndice con el argumento" #: ../Doc/library/dis.rst:1773 msgid "``INTRINSIC_TYPEALIAS``" -msgstr "" +msgstr "``INTRINSIC_TYPEALIAS``" #: ../Doc/library/dis.rst:1773 msgid "" @@ -2439,12 +2614,17 @@ msgid "" "statement. The argument is a tuple of the type alias's name, type " "parameters, and value." msgstr "" +"Crea un :class:`typing.TypeAliasType`; se utiliza en la declaración :keyword:" +"`type`. El argumento es una tupla con el nombre del alias de tipo, los " +"parámetros de tipo y el valor." #: ../Doc/library/dis.rst:1785 msgid "" "Calls an intrinsic function with two arguments. Used to implement " "functionality that is not performance critical::" msgstr "" +"Llama a una función intrínseca con dos argumentos. Se utiliza para " +"implementar una funcionalidad que no es crítica para el rendimiento:" #: ../Doc/library/dis.rst:1788 msgid "" @@ -2453,47 +2633,52 @@ msgid "" "result = intrinsic2(arg1, arg2)\n" "STACK.append(result)" msgstr "" +"arg2 = STACK.pop()\n" +"arg1 = STACK.pop()\n" +"result = intrinsic2(arg1, arg2)\n" +"STACK.append(result)" #: ../Doc/library/dis.rst:1798 msgid "``INTRINSIC_2_INVALID``" -msgstr "" +msgstr "``INTRINSIC_2_INVALID``" #: ../Doc/library/dis.rst:1800 msgid "``INTRINSIC_PREP_RERAISE_STAR``" -msgstr "" +msgstr "``INTRINSIC_PREP_RERAISE_STAR``" #: ../Doc/library/dis.rst:1800 msgid "Calculates the :exc:`ExceptionGroup` to raise from a ``try-except*``." msgstr "" +"Calcula el :exc:`ExceptionGroup` que se debe aumentar desde un ``try-" +"except*``." #: ../Doc/library/dis.rst:1804 msgid "``INTRINSIC_TYPEVAR_WITH_BOUND``" -msgstr "" +msgstr "``INTRINSIC_TYPEVAR_WITH_BOUND``" #: ../Doc/library/dis.rst:1804 msgid "Creates a :class:`typing.TypeVar` with a bound." -msgstr "" +msgstr "Crea un :class:`typing.TypeVar` con un límite." #: ../Doc/library/dis.rst:1807 msgid "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" -msgstr "" +msgstr "``INTRINSIC_TYPEVAR_WITH_CONSTRAINTS``" #: ../Doc/library/dis.rst:1807 msgid "Creates a :class:`typing.TypeVar` with constraints." -msgstr "" +msgstr "Crea un :class:`typing.TypeVar` con restricciones." #: ../Doc/library/dis.rst:1811 msgid "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" -msgstr "" +msgstr "``INTRINSIC_SET_FUNCTION_TYPE_PARAMS``" #: ../Doc/library/dis.rst:1811 msgid "Sets the ``__type_params__`` attribute of a function." -msgstr "" +msgstr "Establece el atributo ``__type_params__`` de una función." #: ../Doc/library/dis.rst:1818 -#, fuzzy msgid "**Pseudo-instructions**" -msgstr "**Instrucciones generales**" +msgstr "**Pseudo-instrucciones**" #: ../Doc/library/dis.rst:1820 msgid "" @@ -2501,6 +2686,9 @@ msgid "" "compiler but are replaced by real opcodes or removed before bytecode is " "generated." msgstr "" +"Estos códigos de operación no aparecen en el código de bytes de Python. El " +"compilador los utiliza, pero se reemplazan por códigos de operación reales o " +"se eliminan antes de que se genere el código de bytes." #: ../Doc/library/dis.rst:1825 msgid "" @@ -2508,6 +2696,10 @@ msgid "" "occurs, the value stack level is restored to its current state and control " "is transferred to the exception handler at ``target``." msgstr "" +"Configure un controlador de excepciones para el siguiente bloque de código. " +"Si se produce una excepción, el nivel de pila de valores se restaura a su " +"estado actual y el control se transfiere al controlador de excepciones en " +"``target``." #: ../Doc/library/dis.rst:1832 msgid "" @@ -2517,6 +2709,11 @@ msgid "" "frame are restored to their current state, and control is transferred to the " "exception handler at ``target``." msgstr "" +"Como ``SETUP_FINALLY``, pero en caso de excepción también envía la última " +"instrucción (``lasti``) a la pila para que ``RERAISE`` pueda restaurarla. Si " +"se produce una excepción, el nivel de pila de valores y la última " +"instrucción del marco se restauran a su estado actual y el control se " +"transfiere al controlador de excepciones en ``target``." #: ../Doc/library/dis.rst:1841 msgid "" @@ -2524,6 +2721,9 @@ msgid "" "from the stack before control is transferred to the exception handler at " "``target``." msgstr "" +"Como ``SETUP_CLEANUP``, pero en caso de una excepción, se extrae un elemento " +"más de la pila antes de que el control se transfiera al controlador de " +"excepciones en ``target``." #: ../Doc/library/dis.rst:1845 msgid "" @@ -2531,45 +2731,52 @@ msgid "" "constructs, which push the return value of the context manager's :meth:" "`~object.__enter__` or :meth:`~object.__aenter__` to the stack." msgstr "" +"Esta variante se utiliza en las construcciones :keyword:`with` y :keyword:" +"`async with`, que envían el valor de retorno de :meth:`~object.__enter__` o :" +"meth:`~object.__aenter__` del administrador de contexto a la pila." #: ../Doc/library/dis.rst:1852 msgid "" "Marks the end of the code block associated with the last ``SETUP_FINALLY``, " "``SETUP_CLEANUP`` or ``SETUP_WITH``." msgstr "" +"Marca el final del bloque de código asociado con el último " +"``SETUP_FINALLY``, ``SETUP_CLEANUP`` o ``SETUP_WITH``." #: ../Doc/library/dis.rst:1858 msgid "" "Undirected relative jump instructions which are replaced by their directed " "(forward/backward) counterparts by the assembler." msgstr "" +"Instrucciones de salto relativo no dirigido que son reemplazadas por sus " +"contrapartes dirigidas (hacia adelante/hacia atrás) por el ensamblador." #: ../Doc/library/dis.rst:1863 -#, fuzzy msgid "" "Pushes a reference to the cell contained in slot ``i`` of the \"fast " "locals\" storage." msgstr "" -"Almacena TOS en la celda contenida en la ranura ``i`` del almacenamiento " -"\"locales rápidos\"." +"Envía una referencia a la celda contenida en la ranura ``i`` del " +"almacenamiento de \"valores locales rápidos\"." #: ../Doc/library/dis.rst:1866 -#, fuzzy msgid "" "Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler." msgstr "" -"Tenga en cuenta que ``LOAD_CLOSURE`` es efectivamente un alias para " -"``LOAD_FAST``. Existe para mantener el bytecode un poco más legible." +"Tenga en cuenta que ``LOAD_CLOSURE`` se reemplaza con ``LOAD_FAST`` en el " +"ensamblador." #: ../Doc/library/dis.rst:1868 msgid "This opcode is now a pseudo-instruction." -msgstr "" +msgstr "Este código de operación ahora es una pseudoinstrucción." #: ../Doc/library/dis.rst:1874 msgid "" "Optimized unbound method lookup. Emitted as a ``LOAD_ATTR`` opcode with a " "flag set in the arg." msgstr "" +"Búsqueda de método no enlazado optimizada. Se emite como un código de " +"operación ``LOAD_ATTR`` con un indicador establecido en el argumento." #: ../Doc/library/dis.rst:1881 msgid "Opcode collections" @@ -2589,6 +2796,9 @@ msgid "" "instructions as well. These are opcodes with values ``>= MIN_PSEUDO_OPCODE`` " "and ``>= MIN_INSTRUMENTED_OPCODE``." msgstr "" +"Las colecciones ahora también contienen pseudoinstrucciones e instrucciones " +"instrumentadas. Se trata de códigos de operación con valores ``>= " +"MIN_PSEUDO_OPCODE`` y ``>= MIN_INSTRUMENTED_OPCODE``." #: ../Doc/library/dis.rst:1893 msgid "Sequence of operation names, indexable using the bytecode." @@ -2603,36 +2813,35 @@ msgid "Sequence of all compare operation names." msgstr "Secuencia de todos los nombres de operaciones de comparación." #: ../Doc/library/dis.rst:1908 -#, fuzzy msgid "Sequence of bytecodes that use their argument." -msgstr "Secuencia de bytecodes que acceden a una constante." +msgstr "Secuencia de códigos de bytes que utilizan su argumento." #: ../Doc/library/dis.rst:1915 msgid "Sequence of bytecodes that access a constant." msgstr "Secuencia de bytecodes que acceden a una constante." #: ../Doc/library/dis.rst:1920 -#, fuzzy msgid "" "Sequence of bytecodes that access a free variable. 'free' in this context " "refers to names in the current scope that are referenced by inner scopes or " "names in outer scopes that are referenced from this scope. It does *not* " "include references to global or builtin scopes." msgstr "" -"Secuencia de bytecodes que acceden a una variable libre (tenga en cuenta que " -"'libre' en este contexto se refiere a nombres en el alcance actual a los que " -"hacen referencia los ámbitos internos o los nombres en los ámbitos externos " -"a los que se hace referencia desde este ámbito. **No** incluye referencias a " -"ámbitos globales o integrados)." +"Secuencia de códigos de bytes que acceden a una variable libre. \"libre\" en " +"este contexto se refiere a nombres en el ámbito actual a los que hacen " +"referencia los ámbitos internos o a nombres en ámbitos externos a los que " +"hace referencia este ámbito. *not* incluye referencias a ámbitos globales o " +"integrados." #: ../Doc/library/dis.rst:1928 msgid "Sequence of bytecodes that access an attribute by name." msgstr "Secuencia de bytecodes que acceden a un atributo por nombre." #: ../Doc/library/dis.rst:1933 -#, fuzzy msgid "Sequence of bytecodes that have a jump target. All jumps are relative." -msgstr "Secuencia de bytecodes que tienen un objetivo de salto relativo." +msgstr "" +"Secuencia de códigos de bytes que tienen un destino de salto. Todos los " +"saltos son relativos." #: ../Doc/library/dis.rst:1940 msgid "Sequence of bytecodes that access a local variable." @@ -2643,9 +2852,9 @@ msgid "Sequence of bytecodes of Boolean operations." msgstr "Secuencia de bytecodes de operaciones booleanas." #: ../Doc/library/dis.rst:1949 -#, fuzzy msgid "Sequence of bytecodes that set an exception handler." -msgstr "Secuencia de bytecodes que acceden a una constante." +msgstr "" +"Secuencia de códigos de bytes que establecen un controlador de excepciones." #: ../Doc/library/dis.rst:1956 msgid "Sequence of bytecodes that have a relative jump target." @@ -2653,7 +2862,7 @@ msgstr "Secuencia de bytecodes que tienen un objetivo de salto relativo." #: ../Doc/library/dis.rst:1958 msgid "All jumps are now relative. Use :data:`hasjump`." -msgstr "" +msgstr "Ahora todos los saltos son relativos. Utilice :data:`hasjump`." #: ../Doc/library/dis.rst:1964 msgid "Sequence of bytecodes that have an absolute jump target." @@ -2661,12 +2870,12 @@ msgstr "Secuencia de bytecodes que tienen un objetivo de salto absoluto." #: ../Doc/library/dis.rst:1966 msgid "All jumps are now relative. This list is empty." -msgstr "" +msgstr "Ahora todos los saltos son relativos. Esta lista está vacía." #: ../Doc/library/dis.rst:1582 msgid "built-in function" -msgstr "" +msgstr "función incorporada" #: ../Doc/library/dis.rst:1582 msgid "slice" -msgstr "" +msgstr "rebanada" From def22f86240b065957356c12e4d37d6f63cc5c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 11:58:06 +0200 Subject: [PATCH 21/40] Translate library/turtle (#3332) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2910 --------- Co-authored-by: Charly Román --- dictionaries/library_turtle.txt | 8 + library/turtle.po | 948 ++++++++++++++++++++++++++------ 2 files changed, 799 insertions(+), 157 deletions(-) diff --git a/dictionaries/library_turtle.txt b/dictionaries/library_turtle.txt index 505a4abf23..7a74de7617 100644 --- a/dictionaries/library_turtle.txt +++ b/dictionaries/library_turtle.txt @@ -27,12 +27,15 @@ buffer call click clickear +cmode colormode descriptos docstringdict ej etnomatemáticas eventollamando +fill +gap gif gravitacional innombrado @@ -46,6 +49,7 @@ maxval mili milisegundos minimalista +minval mode mouse n @@ -68,8 +72,12 @@ speed stamp standard stretchfactor +stretchfactors subproceso t +teletransporta +teletransportarse +teletransporte tilt tiltangle trio diff --git a/library/turtle.po b/library/turtle.po index 5d232b84aa..2f0462678c 100644 --- a/library/turtle.po +++ b/library/turtle.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-04 22:07+0200\n" +"PO-Revision-Date: 2024-11-24 22:56+0100\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language: es_AR\n" "Language-Team: python-doc-es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: es_AR\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.4.2\n" #: ../Doc/library/turtle.rst:3 msgid ":mod:`turtle` --- Turtle graphics" @@ -34,20 +35,19 @@ msgid "Introduction" msgstr "Introducción" #: ../Doc/library/turtle.rst:22 -#, fuzzy msgid "" "Turtle graphics is an implementation of `the popular geometric drawing tools " "introduced in Logo `_, " "developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967." msgstr "" -"Gráficas Turtle es una forma muy habitual de introducción a la programación " -"para niñas y niños. Era parte original del lenguaje de programación Logo, " -"desarrollado por Wally Feurzeig, Seymour Papert y Cynthia Solomon en 1967." +"Los gráficos de tortuga son una implementación de `the popular geometric " +"drawing tools introduced in Logo `_, desarrollado por Wally Feurzeig, Seymour Papert y Cynthia " +"Solomon en 1967." #: ../Doc/library/turtle.rst:29 -#, fuzzy msgid "Get started" -msgstr "Estado de la Tortuga" +msgstr "Empezar" #: ../Doc/library/turtle.rst:31 msgid "" @@ -57,6 +57,12 @@ msgid "" "moves. Give it the command ``turtle.right(25)``, and it rotates in-place 25 " "degrees clockwise." msgstr "" +"Imagine una tortuga robótica que comienza en (0, 0) en el plano x-y. Después " +"de un ``import turtle``, dale el comando ``turtle.forward(15)`` y se moverá " +"(¡en la pantalla!) 15 píxeles en la dirección en la que está mirando, " +"dibujando una línea a medida que se mueve. Dale el comando ``turtle." +"right(25)`` y rotará en su lugar 25 grados en el sentido de las agujas del " +"reloj." #: ../Doc/library/turtle.rst:38 msgid "" @@ -71,6 +77,9 @@ msgid "" "\"turtle\" (a little robot with a pen) that draws on a sheet of paper on the " "floor." msgstr "" +"En Python, los gráficos de tortuga proporcionan una representación de una " +"\"tortuga\" física (un pequeño robot con un bolígrafo) que dibuja en una " +"hoja de papel en el suelo." #: ../Doc/library/turtle.rst:47 msgid "" @@ -78,6 +87,10 @@ msgid "" "concepts and interaction with software, as it provides instant, visible " "feedback. It also provides convenient access to graphical output in general." msgstr "" +"Es una forma eficaz y probada para que los estudiantes conozcan " +"los conceptos de programación y la interacción con el software, ya que " +"proporciona una retroalimentación instantánea y visible. También proporciona " +"un acceso cómodo a la salida gráfica en general." #: ../Doc/library/turtle.rst:52 msgid "" @@ -86,48 +99,56 @@ msgid "" "graphical output it can be a way to do that without the overhead of " "introducing more complex or external libraries into their work." msgstr "" +"El dibujo de tortugas se creó originalmente como una herramienta educativa " +"para que la utilizaran los profesores en el aula. Para el programador que " +"necesita producir algún resultado gráfico, puede ser una forma de hacerlo " +"sin la sobrecarga que supone introducir bibliotecas externas o más complejas " +"en su trabajo." #: ../Doc/library/turtle.rst:61 msgid "Tutorial" -msgstr "" +msgstr "Tutorial" #: ../Doc/library/turtle.rst:63 msgid "" "New users should start here. In this tutorial we'll explore some of the " "basics of turtle drawing." msgstr "" +"Los nuevos usuarios deberían empezar aquí. En este tutorial, exploraremos " +"algunos de los conceptos básicos del dibujo de tortugas." #: ../Doc/library/turtle.rst:68 -#, fuzzy msgid "Starting a turtle environment" -msgstr "Ajuste y unidades de medida" +msgstr "Iniciando un entorno para tortugas" #: ../Doc/library/turtle.rst:70 msgid "In a Python shell, import all the objects of the ``turtle`` module::" msgstr "" +"En un shell de Python, importe todos los objetos del módulo ``turtle``:" #: ../Doc/library/turtle.rst:72 -#, fuzzy msgid "from turtle import *" -msgstr "Movimiento de Turtle" +msgstr "from turtle import *" #: ../Doc/library/turtle.rst:74 msgid "" "If you run into a ``No module named '_tkinter'`` error, you'll have to " "install the :mod:`Tk interface package ` on your system." msgstr "" +"Si se encuentra con un error ``No module named '_tkinter'``, tendrá que " +"instalar :mod:`Tk interface package ` en su sistema." #: ../Doc/library/turtle.rst:79 msgid "Basic drawing" -msgstr "" +msgstr "Dibujo básico" #: ../Doc/library/turtle.rst:81 msgid "Send the turtle forward 100 steps::" -msgstr "" +msgstr "Envía la tortuga hacia adelante 100 pasos::" #: ../Doc/library/turtle.rst:83 msgid "forward(100)" -msgstr "" +msgstr "forward(100)" #: ../Doc/library/turtle.rst:85 msgid "" @@ -135,14 +156,18 @@ msgid "" "by the turtle, heading East. Change the direction of the turtle, so that it " "turns 120 degrees left (anti-clockwise)::" msgstr "" +"Deberías ver (probablemente en una nueva ventana de tu pantalla) una línea " +"dibujada por la tortuga, en dirección este. Cambia la dirección de la " +"tortuga para que gire 120 grados hacia la izquierda (en sentido contrario a " +"las agujas del reloj):" #: ../Doc/library/turtle.rst:89 msgid "left(120)" -msgstr "" +msgstr "left(120)" #: ../Doc/library/turtle.rst:91 msgid "Let's continue by drawing a triangle::" -msgstr "" +msgstr "Continuemos dibujando un triángulo::" #: ../Doc/library/turtle.rst:93 msgid "" @@ -150,17 +175,23 @@ msgid "" "left(120)\n" "forward(100)" msgstr "" +"forward(100)\n" +"left(120)\n" +"forward(100)" #: ../Doc/library/turtle.rst:97 msgid "" "Notice how the turtle, represented by an arrow, points in different " "directions as you steer it." msgstr "" +"Observa cómo la tortuga, representada por una flecha, apunta en diferentes " +"direcciones a medida que la diriges." #: ../Doc/library/turtle.rst:100 msgid "" "Experiment with those commands, and also with ``backward()`` and ``right()``." msgstr "" +"Experimente con esos comandos y también con ``backward()`` y ``right()``." #: ../Doc/library/turtle.rst:105 ../Doc/library/turtle.rst:355 #: ../Doc/library/turtle.rst:1024 @@ -172,60 +203,68 @@ msgid "" "Try changing the color - for example, ``color('blue')`` - and width of the " "line - for example, ``width(3)`` - and then drawing again." msgstr "" +"Intente cambiar el color (por ejemplo, ``color('blue')``) y el ancho de la " +"línea (por ejemplo, ``width(3)``) y luego vuelva a dibujar." #: ../Doc/library/turtle.rst:110 msgid "" "You can also move the turtle around without drawing, by lifting up the pen: " "``up()`` before moving. To start drawing again, use ``down()``." msgstr "" +"También puedes mover la tortuga sin dibujar, levantando el lápiz: ``up()`` " +"antes de moverla. Para comenzar a dibujar nuevamente, usa ``down()``." #: ../Doc/library/turtle.rst:115 -#, fuzzy msgid "The turtle's position" -msgstr "Movimiento de Turtle" +msgstr "La posición de la tortuga" #: ../Doc/library/turtle.rst:117 msgid "" "Send your turtle back to its starting-point (useful if it has disappeared " "off-screen)::" msgstr "" +"Envía a tu tortuga de regreso a su punto de partida (útil si ha desaparecido " +"de la pantalla):" #: ../Doc/library/turtle.rst:120 msgid "home()" -msgstr "" +msgstr "home()" #: ../Doc/library/turtle.rst:122 msgid "" "The home position is at the center of the turtle's screen. If you ever need " "to know them, get the turtle's x-y coordinates with::" msgstr "" +"La posición inicial está en el centro de la pantalla de la tortuga. Si " +"alguna vez necesitas saberlas, obtén las coordenadas x-y de la tortuga con:" #: ../Doc/library/turtle.rst:125 msgid "pos()" -msgstr "" +msgstr "pos()" #: ../Doc/library/turtle.rst:127 msgid "Home is at ``(0, 0)``." -msgstr "" +msgstr "El hogar está en ``(0, 0)``." #: ../Doc/library/turtle.rst:129 msgid "" "And after a while, it will probably help to clear the window so we can start " "anew::" msgstr "" +"Y después de un tiempo, probablemente ayudará a limpiar la ventana para que " +"podamos comenzar de nuevo::" #: ../Doc/library/turtle.rst:132 -#, fuzzy msgid "clearscreen()" -msgstr ":func:`clearscreen`" +msgstr "clearscreen()" #: ../Doc/library/turtle.rst:136 msgid "Making algorithmic patterns" -msgstr "" +msgstr "Creando patrones algorítmicos" #: ../Doc/library/turtle.rst:138 msgid "Using loops, it's possible to build up geometric patterns::" -msgstr "" +msgstr "Utilizando bucles, es posible construir patrones geométricos:" #: ../Doc/library/turtle.rst:140 msgid "" @@ -235,37 +274,48 @@ msgid "" " forward(steps)\n" " right(30)" msgstr "" +"for steps in range(100):\n" +" for c in ('blue', 'red', 'green'):\n" +" color(c)\n" +" forward(steps)\n" +" right(30)" #: ../Doc/library/turtle.rst:147 msgid "\\ - which of course, are limited only by the imagination!" msgstr "" +"\\ - ¡que, por supuesto, están limitadas únicamente por la imaginación!" #: ../Doc/library/turtle.rst:149 msgid "" "Let's draw the star shape at the top of this page. We want red lines, filled " "in with yellow::" msgstr "" +"Dibujemos la forma de estrella en la parte superior de esta página. Queremos " +"líneas rojas, rellenas con amarillo:" #: ../Doc/library/turtle.rst:152 msgid "" "color('red')\n" "fillcolor('yellow')" msgstr "" +"color('red')\n" +"fillcolor('yellow')" #: ../Doc/library/turtle.rst:155 msgid "" "Just as ``up()`` and ``down()`` determine whether lines will be drawn, " "filling can be turned on and off::" msgstr "" +"Así como ``up()`` y ``down()`` determinan si se dibujarán líneas, el relleno " +"se puede activar y desactivar:" #: ../Doc/library/turtle.rst:158 -#, fuzzy msgid "begin_fill()" -msgstr ":func:`begin_fill`" +msgstr "begin_fill()" #: ../Doc/library/turtle.rst:160 msgid "Next we'll create a loop::" -msgstr "" +msgstr "A continuación crearemos un bucle:" #: ../Doc/library/turtle.rst:162 msgid "" @@ -275,39 +325,48 @@ msgid "" " if abs(pos()) < 1:\n" " break" msgstr "" +"while True:\n" +" forward(200)\n" +" left(170)\n" +" if abs(pos()) < 1:\n" +" break" #: ../Doc/library/turtle.rst:168 msgid "" "``abs(pos()) < 1`` is a good way to know when the turtle is back at its home " "position." msgstr "" +"``abs(pos()) < 1`` es una buena manera de saber cuándo la tortuga ha " +"regresado a su posición original." #: ../Doc/library/turtle.rst:171 msgid "Finally, complete the filling::" -msgstr "" +msgstr "Por último, completa el relleno:" #: ../Doc/library/turtle.rst:173 -#, fuzzy msgid "end_fill()" -msgstr ":func:`end_fill`" +msgstr "end_fill()" #: ../Doc/library/turtle.rst:175 msgid "" "(Note that filling only actually takes place when you give the " "``end_fill()`` command.)" msgstr "" +"(Tenga en cuenta que el llenado solo se realiza cuando se da el comando " +"``end_fill()``)." #: ../Doc/library/turtle.rst:182 msgid "How to..." -msgstr "" +msgstr "Cómo..." #: ../Doc/library/turtle.rst:184 msgid "This section covers some typical turtle use-cases and approaches." msgstr "" +"Esta sección cubre algunos casos de uso y enfoques típicos de las tortugas." #: ../Doc/library/turtle.rst:188 msgid "Get started as quickly as possible" -msgstr "" +msgstr "Empiece lo antes posible" #: ../Doc/library/turtle.rst:190 msgid "" @@ -316,6 +375,10 @@ msgid "" "to programming ideas, with a minimum of overhead (not just children, of " "course)." msgstr "" +"Una de las ventajas de los gráficos de tortuga es la respuesta visual " +"inmediata que se obtiene con comandos simples: es una forma excelente de " +"introducir a los niños a las ideas de programación, con un mínimo de gastos " +"generales (no solo para los niños, por supuesto)." #: ../Doc/library/turtle.rst:195 msgid "" @@ -323,6 +386,9 @@ msgid "" "functionality as functions, available with ``from turtle import *``. The :" "ref:`turtle graphics tutorial ` covers this approach." msgstr "" +"El módulo Turtle hace posible esto al exponer toda su funcionalidad básica " +"como funciones, disponibles con ``from turtle import *``. :ref:`turtle " +"graphics tutorial ` cubre este enfoque." #: ../Doc/library/turtle.rst:199 msgid "" @@ -330,6 +396,10 @@ msgid "" "equivalents, such as ``fd()`` for :func:`forward`. These are especially " "useful when working with learners for whom typing is not a skill." msgstr "" +"Vale la pena señalar que muchos de los comandos de la tortuga también tienen " +"equivalentes aún más concisos, como ``fd()`` para :func:`forward`. Estos son " +"especialmente útiles cuando se trabaja con estudiantes para quienes escribir " +"a máquina no es una habilidad." #: ../Doc/library/turtle.rst:205 msgid "" @@ -338,10 +408,14 @@ msgid "" "straightforward, so check this in advance if you're planning to use turtle " "graphics with a learner." msgstr "" +"Necesitará tener instalado :mod:`Tk interface package ` en su " +"sistema para que funcionen los gráficos de Turtle. Tenga en cuenta que esto " +"no siempre es sencillo, por lo que debe verificar esto con anticipación si " +"planea usar gráficos de Turtle con un estudiante." #: ../Doc/library/turtle.rst:212 msgid "Use the ``turtle`` module namespace" -msgstr "" +msgstr "Utilice el espacio de nombres del módulo ``turtle``" #: ../Doc/library/turtle.rst:214 msgid "" @@ -351,6 +425,11 @@ msgid "" "an issue if you're using turtle graphics in a script where other modules " "might be imported)." msgstr "" +"Usar ``from turtle import *`` es conveniente, pero tenga cuidado, ya que " +"importa una colección bastante grande de objetos y, si está haciendo otra " +"cosa que no sean gráficos de tortuga, corre el riesgo de un conflicto de " +"nombres (esto se vuelve aún más problemático si está usando gráficos de " +"tortuga en un script donde se pueden importar otros módulos)." #: ../Doc/library/turtle.rst:220 msgid "" @@ -359,17 +438,22 @@ msgid "" "and over again becomes tedious, use for example ``import turtle as t`` " "instead.)" msgstr "" +"La solución es utilizar ``import turtle``: ``fd()`` se convierte en ``turtle." +"fd()``, ``width()`` se convierte en ``turtle.width()`` y así sucesivamente. " +"(Si escribir \"tortuga\" una y otra vez se vuelve tedioso, utilice, por " +"ejemplo, ``import turtle as t`` en su lugar)." #: ../Doc/library/turtle.rst:227 -#, fuzzy msgid "Use turtle graphics in a script" -msgstr "Apaga la ventana gráfica de la tortuga." +msgstr "Utilice gráficos de tortugas en un guión" #: ../Doc/library/turtle.rst:229 msgid "" "It's recommended to use the ``turtle`` module namespace as described " "immediately above, for example::" msgstr "" +"Se recomienda utilizar el espacio de nombres del módulo ``turtle`` como se " +"describe inmediatamente arriba, por ejemplo:" #: ../Doc/library/turtle.rst:232 msgid "" @@ -382,16 +466,26 @@ msgid "" " t.right(angle)\n" " t.fd(steps)" msgstr "" +"import turtle as t\n" +"from random import random\n" +"\n" +"for i in range(100):\n" +" steps = int(random() * 100)\n" +" angle = int(random() * 360)\n" +" t.right(angle)\n" +" t.fd(steps)" #: ../Doc/library/turtle.rst:241 msgid "" "Another step is also required though - as soon as the script ends, Python " "will also close the turtle's window. Add::" msgstr "" +"Sin embargo, también se requiere otro paso: tan pronto como finalice el " +"script, Python también cerrará la ventana de la tortuga. Agregar::" #: ../Doc/library/turtle.rst:244 msgid "t.mainloop()" -msgstr "" +msgstr "t.mainloop()" #: ../Doc/library/turtle.rst:246 msgid "" @@ -399,15 +493,19 @@ msgid "" "not exit until it is terminated, for example by closing the turtle graphics " "window." msgstr "" +"hasta el final del script. El script ahora esperará a que lo cierren y no " +"saldrá hasta que lo hagan, por ejemplo, cerrando la ventana de gráficos de " +"la tortuga." #: ../Doc/library/turtle.rst:252 msgid "Use object-oriented turtle graphics" -msgstr "" +msgstr "Utilice gráficos de tortuga orientados a objetos" #: ../Doc/library/turtle.rst:254 msgid "" ":ref:`Explanation of the object-oriented interface `" msgstr "" +":ref:`Explanation of the object-oriented interface `" #: ../Doc/library/turtle.rst:256 msgid "" @@ -416,6 +514,10 @@ msgid "" "object-oriented approach to turtle graphics. For example, this allows " "multiple turtles on screen at once." msgstr "" +"Aparte de para propósitos introductorios muy básicos o para probar cosas lo " +"más rápido posible, es más habitual y mucho más potente utilizar el enfoque " +"orientado a objetos para los gráficos de tortugas. Por ejemplo, esto permite " +"tener varias tortugas en la pantalla a la vez." #: ../Doc/library/turtle.rst:261 msgid "" @@ -423,10 +525,13 @@ msgid "" "of ``Turtle`` objects). You *can* use the object-oriented approach in the " "shell, but it would be more typical in a Python script." msgstr "" +"En este enfoque, los distintos comandos de la tortuga son métodos de objetos " +"(en su mayoría objetos ``Turtle``). *can* utiliza el enfoque orientado a " +"objetos en el shell, pero sería más típico en un script de Python." #: ../Doc/library/turtle.rst:265 msgid "The example above then becomes::" -msgstr "" +msgstr "El ejemplo anterior se convierte entonces en:" #: ../Doc/library/turtle.rst:267 msgid "" @@ -442,6 +547,17 @@ msgid "" "\n" "t.screen.mainloop()" msgstr "" +"from turtle import Turtle\n" +"from random import random\n" +"\n" +"t = Turtle()\n" +"for i in range(100):\n" +" steps = int(random() * 100)\n" +" angle = int(random() * 360)\n" +" t.right(angle)\n" +" t.fd(steps)\n" +"\n" +"t.screen.mainloop()" #: ../Doc/library/turtle.rst:279 msgid "" @@ -449,20 +565,25 @@ msgid "" "a Turtle instance exists on; it's created automatically along with the " "turtle." msgstr "" +"Tenga en cuenta la última línea. ``t.screen`` es una instancia de :class:" +"`Screen` en la que existe una instancia de Turtle; se crea automáticamente " +"junto con la tortuga." #: ../Doc/library/turtle.rst:283 msgid "The turtle's screen can be customised, for example::" -msgstr "" +msgstr "La pantalla de la tortuga se puede personalizar, por ejemplo:" #: ../Doc/library/turtle.rst:285 msgid "" "t.screen.title('Object-oriented turtle demo')\n" "t.screen.bgcolor(\"orange\")" msgstr "" +"t.screen.title('Object-oriented turtle demo')\n" +"t.screen.bgcolor(\"orange\")" #: ../Doc/library/turtle.rst:290 msgid "Turtle graphics reference" -msgstr "" +msgstr "Referencia gráficos de tortugas" #: ../Doc/library/turtle.rst:294 msgid "" @@ -507,9 +628,8 @@ msgid ":func:`goto` | :func:`setpos` | :func:`setposition`" msgstr ":func:`goto` | :func:`setpos` | :func:`setposition`" #: ../Doc/library/turtle.rst -#, fuzzy msgid ":func:`teleport`" -msgstr ":func:`tilt`" +msgstr ":func:`teleport`" #: ../Doc/library/turtle.rst msgid ":func:`setx`" @@ -960,6 +1080,14 @@ msgid "" ">>> turtle.position()\n" "(-50.00,0.00)" msgstr "" +">>> turtle.position()\n" +"(0.00,0.00)\n" +">>> turtle.forward(25)\n" +">>> turtle.position()\n" +"(25.00,0.00)\n" +">>> turtle.forward(-75)\n" +">>> turtle.position()\n" +"(-50.00,0.00)" #: ../Doc/library/turtle.rst:468 ../Doc/library/turtle.rst:710 #: ../Doc/library/turtle.rst:977 ../Doc/library/turtle.rst:1485 @@ -982,6 +1110,11 @@ msgid "" ">>> turtle.position()\n" "(-30.00,0.00)" msgstr "" +">>> turtle.position()\n" +"(0.00,0.00)\n" +">>> turtle.backward(30)\n" +">>> turtle.position()\n" +"(-30.00,0.00)" #: ../Doc/library/turtle.rst:493 msgid "" @@ -1002,6 +1135,11 @@ msgid "" ">>> turtle.heading()\n" "337.0" msgstr "" +">>> turtle.heading()\n" +"22.0\n" +">>> turtle.right(45)\n" +">>> turtle.heading()\n" +"337.0" #: ../Doc/library/turtle.rst:518 msgid "" @@ -1022,6 +1160,11 @@ msgid "" ">>> turtle.heading()\n" "67.0" msgstr "" +">>> turtle.heading()\n" +"22.0\n" +">>> turtle.left(45)\n" +">>> turtle.heading()\n" +"67.0" #: ../Doc/library/turtle.rst:542 msgid "a number or a pair/vector of numbers" @@ -1063,10 +1206,22 @@ msgid "" ">>> turtle.pos()\n" "(0.00,0.00)" msgstr "" +">>> tp = turtle.pos()\n" +">>> tp\n" +"(0.00,0.00)\n" +">>> turtle.setpos(60,30)\n" +">>> turtle.pos()\n" +"(60.00,30.00)\n" +">>> turtle.setpos((20,80))\n" +">>> turtle.pos()\n" +"(20.00,80.00)\n" +">>> turtle.setpos(tp)\n" +">>> turtle.pos()\n" +"(0.00,0.00)" #: ../Doc/library/turtle.rst:578 msgid "a boolean" -msgstr "" +msgstr "un booleano" #: ../Doc/library/turtle.rst:580 msgid "" @@ -1077,6 +1232,13 @@ msgid "" "which makes the imaginary line traveled during teleporting act as a fill " "barrier like in goto(x, y)." msgstr "" +"Mueve la tortuga a una posición absoluta. A diferencia de goto(x, y), no se " +"dibujará una línea. La orientación de la tortuga no cambia. Si se está " +"llenando, el polígono o polígonos desde los que se teletransporta se " +"llenarán después de salir y el llenado comenzará nuevamente después de " +"teletransportarse. Esto se puede desactivar con fill_gap=True, que hace que " +"la línea imaginaria recorrida durante el teletransporte actúe como una " +"barrera de relleno como en goto(x, y)." #: ../Doc/library/turtle.rst:593 msgid "" @@ -1093,6 +1255,18 @@ msgid "" ">>> turtle.pos()\n" "(20.00,30.00)" msgstr "" +">>> tp = turtle.pos()\n" +">>> tp\n" +"(0.00,0.00)\n" +">>> turtle.teleport(60)\n" +">>> turtle.pos()\n" +"(60.00,0.00)\n" +">>> turtle.teleport(y=10)\n" +">>> turtle.pos()\n" +"(60.00,10.00)\n" +">>> turtle.teleport(20, 30)\n" +">>> turtle.pos()\n" +"(20.00,30.00)" #: ../Doc/library/turtle.rst:616 msgid "" @@ -1109,6 +1283,11 @@ msgid "" ">>> turtle.position()\n" "(10.00,240.00)" msgstr "" +">>> turtle.position()\n" +"(0.00,240.00)\n" +">>> turtle.setx(10)\n" +">>> turtle.position()\n" +"(10.00,240.00)" #: ../Doc/library/turtle.rst:639 msgid "" @@ -1125,6 +1304,11 @@ msgid "" ">>> turtle.position()\n" "(0.00,-10.00)" msgstr "" +">>> turtle.position()\n" +"(0.00,40.00)\n" +">>> turtle.sety(-10)\n" +">>> turtle.position()\n" +"(0.00,-10.00)" #: ../Doc/library/turtle.rst:662 msgid "" @@ -1180,6 +1364,9 @@ msgid "" ">>> turtle.heading()\n" "90.0" msgstr "" +">>> turtle.setheading(90)\n" +">>> turtle.heading()\n" +"90.0" #: ../Doc/library/turtle.rst:684 msgid "" @@ -1202,6 +1389,15 @@ msgid "" ">>> turtle.heading()\n" "0.0" msgstr "" +">>> turtle.heading()\n" +"90.0\n" +">>> turtle.position()\n" +"(0.00,-10.00)\n" +">>> turtle.home()\n" +">>> turtle.position()\n" +"(0.00,0.00)\n" +">>> turtle.heading()\n" +"0.0" #: ../Doc/library/turtle.rst:711 msgid "a number (or ``None``)" @@ -1257,6 +1453,21 @@ msgid "" ">>> turtle.heading()\n" "180.0" msgstr "" +">>> turtle.home()\n" +">>> turtle.position()\n" +"(0.00,0.00)\n" +">>> turtle.heading()\n" +"0.0\n" +">>> turtle.circle(50)\n" +">>> turtle.position()\n" +"(-0.00,0.00)\n" +">>> turtle.heading()\n" +"0.0\n" +">>> turtle.circle(120, 180) # draw a semicircle\n" +">>> turtle.position()\n" +"(0.00,240.00)\n" +">>> turtle.heading()\n" +"180.0" #: ../Doc/library/turtle.rst:748 msgid "an integer >= 1 (if given)" @@ -1284,6 +1495,13 @@ msgid "" ">>> turtle.heading()\n" "0.0" msgstr "" +">>> turtle.home()\n" +">>> turtle.dot()\n" +">>> turtle.fd(50); turtle.dot(20, \"blue\"); turtle.fd(50)\n" +">>> turtle.position()\n" +"(100.00,-0.00)\n" +">>> turtle.heading()\n" +"0.0" #: ../Doc/library/turtle.rst:769 msgid "" @@ -1301,6 +1519,9 @@ msgid "" ">>> stamp_id = turtle.stamp()\n" ">>> turtle.fd(50)" msgstr "" +">>> turtle.color(\"blue\")\n" +">>> stamp_id = turtle.stamp()\n" +">>> turtle.fd(50)" #: ../Doc/library/turtle.rst:783 msgid "an integer, must be return value of previous :func:`stamp` call" @@ -1325,6 +1546,16 @@ msgid "" ">>> turtle.position()\n" "(200.00,-0.00)" msgstr "" +">>> turtle.position()\n" +"(150.00,-0.00)\n" +">>> turtle.color(\"blue\")\n" +">>> astamp = turtle.stamp()\n" +">>> turtle.fd(50)\n" +">>> turtle.position()\n" +"(200.00,-0.00)\n" +">>> turtle.clearstamp(astamp)\n" +">>> turtle.position()\n" +"(200.00,-0.00)" #: ../Doc/library/turtle.rst:807 msgid "" @@ -1345,6 +1576,12 @@ msgid "" ">>> turtle.clearstamps(-2)\n" ">>> turtle.clearstamps()" msgstr "" +">>> for i in range(8):\n" +"... unused_stamp_id = turtle.stamp()\n" +"... turtle.fd(30)\n" +">>> turtle.clearstamps(2)\n" +">>> turtle.clearstamps(-2)\n" +">>> turtle.clearstamps()" #: ../Doc/library/turtle.rst:823 msgid "" @@ -1362,6 +1599,11 @@ msgid "" ">>> for i in range(8):\n" "... turtle.undo()" msgstr "" +">>> for i in range(4):\n" +"... turtle.fd(50); turtle.lt(80)\n" +"...\n" +">>> for i in range(8):\n" +"... turtle.undo()" #: ../Doc/library/turtle.rst:838 msgid "an integer in the range 0..10 or a speedstring (see below)" @@ -1432,6 +1674,14 @@ msgid "" ">>> turtle.speed()\n" "9" msgstr "" +">>> turtle.speed()\n" +"3\n" +">>> turtle.speed('normal')\n" +">>> turtle.speed()\n" +"6\n" +">>> turtle.speed(9)\n" +">>> turtle.speed()\n" +"9" #: ../Doc/library/turtle.rst:878 msgid "" @@ -1445,6 +1695,8 @@ msgid "" ">>> turtle.pos()\n" "(440.00,-0.00)" msgstr "" +">>> turtle.pos()\n" +"(440.00,-0.00)" #: ../Doc/library/turtle.rst:889 ../Doc/library/turtle.rst:952 msgid "a number or a pair/vector of numbers or a turtle instance" @@ -1472,6 +1724,9 @@ msgid "" ">>> turtle.towards(0,0)\n" "225.0" msgstr "" +">>> turtle.goto(10, 10)\n" +">>> turtle.towards(0,0)\n" +"225.0" #: ../Doc/library/turtle.rst:906 msgid "Return the turtle's x coordinate." @@ -1487,6 +1742,13 @@ msgid "" ">>> print(round(turtle.xcor(), 5))\n" "64.27876" msgstr "" +">>> turtle.home()\n" +">>> turtle.left(50)\n" +">>> turtle.forward(100)\n" +">>> turtle.pos()\n" +"(64.28,76.60)\n" +">>> print(round(turtle.xcor(), 5))\n" +"64.27876" #: ../Doc/library/turtle.rst:922 msgid "Return the turtle's y coordinate." @@ -1502,6 +1764,13 @@ msgid "" ">>> print(round(turtle.ycor(), 5))\n" "86.60254" msgstr "" +">>> turtle.home()\n" +">>> turtle.left(60)\n" +">>> turtle.forward(100)\n" +">>> print(turtle.pos())\n" +"(50.00,86.60)\n" +">>> print(round(turtle.ycor(), 5))\n" +"86.60254" #: ../Doc/library/turtle.rst:938 msgid "" @@ -1518,6 +1787,10 @@ msgid "" ">>> turtle.heading()\n" "67.0" msgstr "" +">>> turtle.home()\n" +">>> turtle.left(67)\n" +">>> turtle.heading()\n" +"67.0" #: ../Doc/library/turtle.rst:955 msgid "" @@ -1539,6 +1812,15 @@ msgid "" ">>> turtle.distance(joe)\n" "77.0" msgstr "" +">>> turtle.home()\n" +">>> turtle.distance(30,40)\n" +"50.0\n" +">>> turtle.distance((30,40))\n" +"50.0\n" +">>> joe = Turtle()\n" +">>> joe.forward(77)\n" +">>> turtle.distance(joe)\n" +"77.0" #: ../Doc/library/turtle.rst:973 msgid "Settings for measurement" @@ -1568,6 +1850,19 @@ msgid "" ">>> turtle.heading()\n" "90.0" msgstr "" +">>> turtle.home()\n" +">>> turtle.left(90)\n" +">>> turtle.heading()\n" +"90.0\n" +"\n" +"Change angle measurement unit to grad (also known as gon,\n" +"grade, or gradian and equals 1/100-th of the right angle.)\n" +">>> turtle.degrees(400.0)\n" +">>> turtle.heading()\n" +"100.0\n" +">>> turtle.degrees(360)\n" +">>> turtle.heading()\n" +"90.0" #: ../Doc/library/turtle.rst:1002 msgid "" @@ -1587,6 +1882,13 @@ msgid "" ">>> turtle.heading()\n" "1.5707963267948966" msgstr "" +">>> turtle.home()\n" +">>> turtle.left(90)\n" +">>> turtle.heading()\n" +"90.0\n" +">>> turtle.radians()\n" +">>> turtle.heading()\n" +"1.5707963267948966" #: ../Doc/library/turtle.rst:1033 msgid "Pull the pen down -- drawing when moving." @@ -1617,6 +1919,10 @@ msgid "" "1\n" ">>> turtle.pensize(10) # from here on lines of width 10 are drawn" msgstr "" +">>> turtle.pensize()\n" +"1\n" +">>> turtle.pensize(10) # de aquí en adelante se dibujan líneas con " +"ancho 10" #: ../Doc/library/turtle.rst:1062 msgid "a dictionary with some or all of the below listed keys" @@ -1706,6 +2012,20 @@ msgid "" ">>> sorted(turtle.pen().items())[:3]\n" "[('fillcolor', 'green'), ('outline', 1), ('pencolor', 'red')]" msgstr "" +">>> turtle.pen(fillcolor=\"black\", pencolor=\"red\", pensize=10)\n" +">>> sorted(turtle.pen().items())\n" +"[('fillcolor', 'black'), ('outline', 1), ('pencolor', 'red'),\n" +" ('pendown', True), ('pensize', 10), ('resizemode', 'noresize'),\n" +" ('shearfactor', 0.0), ('shown', True), ('speed', 9),\n" +" ('stretchfactor', (1.0, 1.0)), ('tilt', 0.0)]\n" +">>> penstate=turtle.pen()\n" +">>> turtle.color(\"yellow\", \"\")\n" +">>> turtle.penup()\n" +">>> sorted(turtle.pen().items())[:3]\n" +"[('fillcolor', ''), ('outline', 1), ('pencolor', 'yellow')]\n" +">>> turtle.pen(penstate, fillcolor=\"green\")\n" +">>> sorted(turtle.pen().items())[:3]\n" +"[('fillcolor', 'green'), ('outline', 1), ('pencolor', 'red')]" #: ../Doc/library/turtle.rst:1105 msgid "Return ``True`` if pen is down, ``False`` if it's up." @@ -1720,6 +2040,12 @@ msgid "" ">>> turtle.isdown()\n" "True" msgstr "" +">>> turtle.penup()\n" +">>> turtle.isdown()\n" +"False\n" +">>> turtle.pendown()\n" +">>> turtle.isdown()\n" +"True" #: ../Doc/library/turtle.rst:1123 msgid "Return or set the pencolor." @@ -1809,6 +2135,23 @@ msgid "" ">>> turtle.pencolor()\n" "(50.0, 193.0, 143.0)" msgstr "" +">>> colormode()\n" +"1.0\n" +">>> turtle.pencolor()\n" +"'red'\n" +">>> turtle.pencolor(\"brown\")\n" +">>> turtle.pencolor()\n" +"'brown'\n" +">>> tup = (0.2, 0.8, 0.55)\n" +">>> turtle.pencolor(tup)\n" +">>> turtle.pencolor()\n" +"(0.2, 0.8, 0.5490196078431373)\n" +">>> colormode(255)\n" +">>> turtle.pencolor()\n" +"(51.0, 204.0, 140.0)\n" +">>> turtle.pencolor('#32c18f')\n" +">>> turtle.pencolor()\n" +"(50.0, 193.0, 143.0)" #: ../Doc/library/turtle.rst:1172 msgid "Return or set the fillcolor." @@ -1889,6 +2232,17 @@ msgid "" ">>> turtle.fillcolor()\n" "(255.0, 255.0, 255.0)" msgstr "" +">>> turtle.fillcolor(\"violet\")\n" +">>> turtle.fillcolor()\n" +"'violet'\n" +">>> turtle.pencolor()\n" +"(50.0, 193.0, 143.0)\n" +">>> turtle.fillcolor((50, 193, 143)) # Integers, not floats\n" +">>> turtle.fillcolor()\n" +"(50.0, 193.0, 143.0)\n" +">>> turtle.fillcolor('#ffffff')\n" +">>> turtle.fillcolor()\n" +"(255.0, 255.0, 255.0)" #: ../Doc/library/turtle.rst:1215 msgid "Return or set pencolor and fillcolor." @@ -1960,6 +2314,12 @@ msgid "" ">>> color()\n" "((40.0, 80.0, 120.0), (160.0, 200.0, 240.0))" msgstr "" +">>> turtle.color(\"red\", \"green\")\n" +">>> turtle.color()\n" +"('red', 'green')\n" +">>> color(\"#285078\", \"#a0c8f0\")\n" +">>> color()\n" +"((40.0, 80.0, 120.0), (160.0, 200.0, 240.0))" #: ../Doc/library/turtle.rst:1247 msgid "See also: Screen method :func:`colormode`." @@ -1977,6 +2337,11 @@ msgid "" "... else:\n" "... turtle.pensize(3)" msgstr "" +">>> turtle.begin_fill()\n" +">>> if turtle.filling():\n" +"... turtle.pensize(5)\n" +"... else:\n" +"... turtle.pensize(3)" #: ../Doc/library/turtle.rst:1276 msgid "To be called just before drawing a shape to be filled." @@ -2008,6 +2373,10 @@ msgid "" ">>> turtle.circle(80)\n" ">>> turtle.end_fill()" msgstr "" +">>> turtle.color(\"black\", \"red\")\n" +">>> turtle.begin_fill()\n" +">>> turtle.circle(80)\n" +">>> turtle.end_fill()" #: ../Doc/library/turtle.rst:1302 msgid "" @@ -2031,6 +2400,17 @@ msgid "" ">>> turtle.heading()\n" "0.0" msgstr "" +">>> turtle.goto(0,-22)\n" +">>> turtle.left(100)\n" +">>> turtle.position()\n" +"(0.00,-22.00)\n" +">>> turtle.heading()\n" +"100.0\n" +">>> turtle.reset()\n" +">>> turtle.position()\n" +"(0.00,0.00)\n" +">>> turtle.heading()\n" +"0.0" #: ../Doc/library/turtle.rst:1323 msgid "" @@ -2083,7 +2463,7 @@ msgstr "" #: ../Doc/library/turtle.rst:1356 msgid ">>> turtle.hideturtle()" -msgstr "" +msgstr ">>> turtle.hideturtle()" #: ../Doc/library/turtle.rst:1365 msgid "Make the turtle visible." @@ -2091,7 +2471,7 @@ msgstr "Hace visible la tortuga." #: ../Doc/library/turtle.rst:1367 msgid ">>> turtle.showturtle()" -msgstr "" +msgstr ">>> turtle.showturtle()" #: ../Doc/library/turtle.rst:1375 msgid "Return ``True`` if the Turtle is shown, ``False`` if it's hidden." @@ -2126,6 +2506,11 @@ msgid "" ">>> turtle.shape()\n" "'turtle'" msgstr "" +">>> turtle.shape()\n" +"'classic'\n" +">>> turtle.shape(\"turtle\")\n" +">>> turtle.shape()\n" +"'turtle'" #: ../Doc/library/turtle.rst:1410 msgid "one of the strings \"auto\", \"user\", \"noresize\"" @@ -2178,6 +2563,11 @@ msgid "" ">>> turtle.resizemode()\n" "'auto'" msgstr "" +">>> turtle.resizemode()\n" +"'noresize'\n" +">>> turtle.resizemode(\"auto\")\n" +">>> turtle.resizemode()\n" +"'auto'" #: ../Doc/library/turtle.rst:1437 ../Doc/library/turtle.rst:1438 #: ../Doc/library/turtle.rst:1439 @@ -2185,7 +2575,6 @@ msgid "positive number" msgstr "número positivo" #: ../Doc/library/turtle.rst:1441 -#, fuzzy msgid "" "Return or set the pen's attributes x/y-stretchfactors and/or outline. Set " "resizemode to \"user\". If and only if resizemode is set to \"user\", the " @@ -2194,16 +2583,25 @@ msgid "" "*stretch_len* is stretchfactor in direction of its orientation, *outline* " "determines the width of the shape's outline." msgstr "" -"Devuelve o establece los atributos del lápiz los factores x/y de " -"estiramiento y contorno. Establece *resizemode* a *\"user\"* si y solo si " -"*resizemode* está definido como *\"user\"*, la tortuga será verá estirada " -"acorde a sus factores de estiramiento: *stretch_wid* es el factor de " -"estiramiento perpendicular a su orientación, *stretch_len* es su factor de " -"estiramiento en dirección a su orientación, *outline* determina el grosor de " -"contorno de la forma." - -#: ../Doc/library/turtle.rst:1448 -msgid "" +"Devuelve o establece los atributos x/y-stretchfactors y/o outline del lápiz. " +"Establece resizemode en \"user\". Si y solo si resizemode está establecido " +"en \"user\", la tortuga se mostrará estirada de acuerdo con sus factores de " +"estiramiento: *stretch_wid* es el factor de estiramiento perpendicular a su " +"orientación, *stretch_len* es el factor de estiramiento en la dirección de " +"su orientación, *outline* determina el ancho del contorno de la forma." + +#: ../Doc/library/turtle.rst:1448 +msgid "" +">>> turtle.shapesize()\n" +"(1.0, 1.0, 1)\n" +">>> turtle.resizemode(\"user\")\n" +">>> turtle.shapesize(5, 5, 12)\n" +">>> turtle.shapesize()\n" +"(5, 5, 12)\n" +">>> turtle.shapesize(outline=8)\n" +">>> turtle.shapesize()\n" +"(5, 5, 8)" +msgstr "" ">>> turtle.shapesize()\n" "(1.0, 1.0, 1)\n" ">>> turtle.resizemode(\"user\")\n" @@ -2213,7 +2611,6 @@ msgid "" ">>> turtle.shapesize(outline=8)\n" ">>> turtle.shapesize()\n" "(5, 5, 8)" -msgstr "" #: ../Doc/library/turtle.rst:1464 ../Doc/library/turtle.rst:2101 #: ../Doc/library/turtle.rst:2102 ../Doc/library/turtle.rst:2103 @@ -2246,6 +2643,11 @@ msgid "" ">>> turtle.shearfactor()\n" "0.5" msgstr "" +">>> turtle.shape(\"circle\")\n" +">>> turtle.shapesize(5,2)\n" +">>> turtle.shearfactor(0.5)\n" +">>> turtle.shearfactor()\n" +"0.5" #: ../Doc/library/turtle.rst:1487 msgid "" @@ -2265,6 +2667,13 @@ msgid "" ">>> turtle.tilt(30)\n" ">>> turtle.fd(50)" msgstr "" +">>> turtle.reset()\n" +">>> turtle.shape(\"circle\")\n" +">>> turtle.shapesize(5,2)\n" +">>> turtle.tilt(30)\n" +">>> turtle.fd(50)\n" +">>> turtle.tilt(30)\n" +">>> turtle.fd(50)" #: ../Doc/library/turtle.rst:1504 ../Doc/library/turtle.rst:1527 #: ../Doc/library/turtle.rst:1528 ../Doc/library/turtle.rst:1529 @@ -2298,6 +2707,12 @@ msgid "" ">>> turtle.tiltangle()\n" "45.0" msgstr "" +">>> turtle.reset()\n" +">>> turtle.shape(\"circle\")\n" +">>> turtle.shapesize(5,2)\n" +">>> turtle.tilt(45)\n" +">>> turtle.tiltangle()\n" +"45.0" #: ../Doc/library/turtle.rst:1532 msgid "Set or return the current transformation matrix of the turtle shape." @@ -2331,6 +2746,12 @@ msgid "" ">>> turtle.shapetransform()\n" "(4.0, -1.0, -0.0, 2.0)" msgstr "" +">>> turtle = Turtle()\n" +">>> turtle.shape(\"square\")\n" +">>> turtle.shapesize(4,2)\n" +">>> turtle.shearfactor(-0.5)\n" +">>> turtle.shapetransform()\n" +"(4.0, -1.0, -0.0, 2.0)" #: ../Doc/library/turtle.rst:1556 msgid "" @@ -2348,6 +2769,10 @@ msgid "" ">>> turtle.get_shapepoly()\n" "((50, -20), (30, 20), (-50, 20), (-30, -20))" msgstr "" +">>> turtle.shape(\"square\")\n" +">>> turtle.shapetransform(4, -1, 0, 2)\n" +">>> turtle.get_shapepoly()\n" +"((50, -20), (30, 20), (-50, 20), (-30, -20))" #: ../Doc/library/turtle.rst:1574 ../Doc/library/turtle.rst:1596 #: ../Doc/library/turtle.rst:1621 ../Doc/library/turtle.rst:2025 @@ -2392,6 +2817,11 @@ msgid "" ">>> onclick(turn) # Now clicking into the turtle will turn it.\n" ">>> onclick(None) # event-binding will be removed" msgstr "" +">>> def turn(x, y):\n" +"... left(180)\n" +"...\n" +">>> onclick(turn) # Now clicking into the turtle will turn it.\n" +">>> onclick(None) # event-binding will be removed" #: ../Doc/library/turtle.rst:1602 msgid "" @@ -2414,6 +2844,16 @@ msgid "" "red,\n" ">>> turtle.onrelease(turtle.unglow) # releasing turns it to transparent." msgstr "" +">>> class MyTurtle(Turtle):\n" +"... def glow(self,x,y):\n" +"... self.fillcolor(\"red\")\n" +"... def unglow(self,x,y):\n" +"... self.fillcolor(\"\")\n" +"...\n" +">>> turtle = MyTurtle()\n" +">>> turtle.onclick(turtle.glow) # clicking on turtle turns fillcolor " +"red,\n" +">>> turtle.onrelease(turtle.unglow) # releasing turns it to transparent." #: ../Doc/library/turtle.rst:1627 msgid "" @@ -2433,7 +2873,7 @@ msgstr "" #: ../Doc/library/turtle.rst:1633 msgid ">>> turtle.ondrag(turtle.goto)" -msgstr "" +msgstr ">>> turtle.ondrag(turtle.goto)" #: ../Doc/library/turtle.rst:1638 msgid "" @@ -2476,6 +2916,16 @@ msgid "" ">>> p = turtle.get_poly()\n" ">>> register_shape(\"myFavouriteShape\", p)" msgstr "" +">>> turtle.home()\n" +">>> turtle.begin_poly()\n" +">>> turtle.fd(100)\n" +">>> turtle.left(20)\n" +">>> turtle.fd(30)\n" +">>> turtle.left(60)\n" +">>> turtle.fd(50)\n" +">>> turtle.end_poly()\n" +">>> p = turtle.get_poly()\n" +">>> register_shape(\"myFavouriteShape\", p)" #: ../Doc/library/turtle.rst:1678 msgid "" @@ -2490,6 +2940,8 @@ msgid "" ">>> mick = Turtle()\n" ">>> joe = mick.clone()" msgstr "" +">>> mick = Turtle()\n" +">>> joe = mick.clone()" #: ../Doc/library/turtle.rst:1691 msgid "" @@ -2506,6 +2958,10 @@ msgid "" ">>> pet\n" "" msgstr "" +">>> pet = getturtle()\n" +">>> pet.fd(50)\n" +">>> pet\n" +"" # Return the TurtleScreen object the turtle is drawing on. # no se si "sobre el cual" es la traducción adecuada. @@ -2525,6 +2981,10 @@ msgid "" "\n" ">>> ts.bgcolor(\"pink\")" msgstr "" +">>> ts = turtle.getscreen()\n" +">>> ts\n" +"\n" +">>> ts.bgcolor(\"pink\")" #: ../Doc/library/turtle.rst:1719 msgid "an integer or ``None``" @@ -2545,7 +3005,7 @@ msgstr "" #: ../Doc/library/turtle.rst:1726 msgid ">>> turtle.setundobuffer(42)" -msgstr "" +msgstr ">>> turtle.setundobuffer(42)" #: ../Doc/library/turtle.rst:1734 msgid "Return number of entries in the undobuffer." @@ -2556,6 +3016,8 @@ msgid "" ">>> while undobufferentries():\n" "... undo()" msgstr "" +">>> while undobufferentries():\n" +"... undo()" #: ../Doc/library/turtle.rst:1747 msgid "Compound shapes" @@ -2576,13 +3038,12 @@ msgid "Create an empty Shape object of type \"compound\"." msgstr "Crear una objeto de forma vacía del tipo *compound*." #: ../Doc/library/turtle.rst:1754 -#, fuzzy msgid "" "Add as many components to this object as desired, using the :meth:`~Shape." "addcomponent` method." msgstr "" -"Agregar todos los componentes deseados a este objeto, usando el método :meth:" -"`addcomponent`." +"Agregue tantos componentes a este objeto como desee, utilizando el método :" +"meth:`~Shape.addcomponent`." #: ../Doc/library/turtle.rst:1757 msgid "For example:" @@ -2596,6 +3057,11 @@ msgid "" ">>> poly2 = ((0,0),(10,-5),(-10,-5))\n" ">>> s.addcomponent(poly2, \"blue\", \"red\")" msgstr "" +">>> s = Shape(\"compound\")\n" +">>> poly1 = ((0,0),(10,-5),(0,10),(-10,-5))\n" +">>> s.addcomponent(poly1, \"red\", \"blue\")\n" +">>> poly2 = ((0,0),(10,-5),(-10,-5))\n" +">>> s.addcomponent(poly2, \"blue\", \"red\")" #: ../Doc/library/turtle.rst:1768 msgid "Now add the Shape to the Screen's shapelist and use it:" @@ -2606,6 +3072,8 @@ msgid "" ">>> register_shape(\"myshape\", s)\n" ">>> shape(\"myshape\")" msgstr "" +">>> register_shape(\"myshape\", s)\n" +">>> shape(\"myshape\")" #: ../Doc/library/turtle.rst:1779 msgid "" @@ -2651,6 +3119,12 @@ msgid "" ">>> screen.bgcolor()\n" "(128.0, 0.0, 128.0)" msgstr "" +">>> screen.bgcolor(\"orange\")\n" +">>> screen.bgcolor()\n" +"'orange'\n" +">>> screen.bgcolor(\"#800080\")\n" +">>> screen.bgcolor()\n" +"(128.0, 0.0, 128.0)" #: ../Doc/library/turtle.rst:1820 msgid "a string, name of a gif-file or ``\"nopic\"``, or ``None``" @@ -2677,6 +3151,11 @@ msgid "" ">>> screen.bgpic()\n" "\"landscape.gif\"" msgstr "" +">>> screen.bgpic()\n" +"'nopic'\n" +">>> screen.bgpic(\"landscape.gif\")\n" +">>> screen.bgpic()\n" +"\"landscape.gif\"" #: ../Doc/library/turtle.rst:1838 msgid "" @@ -2786,6 +3265,13 @@ msgid "" ">>> for _ in range(8):\n" "... left(45); fd(2) # a regular octagon" msgstr "" +">>> screen.reset()\n" +">>> screen.setworldcoordinates(-50,-7.5,50,7.5)\n" +">>> for _ in range(72):\n" +"... left(10)\n" +"...\n" +">>> for _ in range(8):\n" +"... left(45); fd(2) # a regular octagon" #: ../Doc/library/turtle.rst:1924 msgid "positive integer" @@ -2814,6 +3300,11 @@ msgid "" ">>> screen.delay()\n" "5" msgstr "" +">>> screen.delay()\n" +"10\n" +">>> screen.delay(5)\n" +">>> screen.delay()\n" +"5" #: ../Doc/library/turtle.rst:1944 ../Doc/library/turtle.rst:1945 msgid "nonnegative integer" @@ -2844,6 +3335,12 @@ msgid "" "... rt(90)\n" "... dist += 2" msgstr "" +">>> screen.tracer(8, 25)\n" +">>> dist = 2\n" +">>> for i in range(200):\n" +"... fd(dist)\n" +"... rt(90)\n" +"... dist += 2" #: ../Doc/library/turtle.rst:1967 msgid "Perform a TurtleScreen update. To be used when tracer is turned off." @@ -2895,6 +3392,12 @@ msgid "" ">>> screen.onkey(f, \"Up\")\n" ">>> screen.listen()" msgstr "" +">>> def f():\n" +"... fd(50)\n" +"... lt(60)\n" +"...\n" +">>> screen.onkey(f, \"Up\")\n" +">>> screen.listen()" #: ../Doc/library/turtle.rst:2007 msgid "" @@ -2915,6 +3418,11 @@ msgid "" ">>> screen.onkey(f, \"Up\")\n" ">>> screen.listen()" msgstr "" +">>> def f():\n" +"... fd(50)\n" +"...\n" +">>> screen.onkey(f, \"Up\")\n" +">>> screen.listen()" #: ../Doc/library/turtle.rst:2031 msgid "" @@ -2940,6 +3448,11 @@ msgid "" "point.\n" ">>> screen.onclick(None) # remove event binding again" msgstr "" +">>> screen.onclick(turtle.goto) # Subsequently clicking into the " +"TurtleScreen will\n" +">>> # make the turtle move to the clicked " +"point.\n" +">>> screen.onclick(None) # remove event binding again" #: ../Doc/library/turtle.rst:2045 msgid "" @@ -2974,6 +3487,14 @@ msgid "" ">>> f() ### makes the turtle march around\n" ">>> running = False" msgstr "" +">>> running = True\n" +">>> def f():\n" +"... if running:\n" +"... fd(50)\n" +"... lt(60)\n" +"... screen.ontimer(f, 250)\n" +">>> f() ### makes the turtle march around\n" +">>> running = False" #: ../Doc/library/turtle.rst:2073 msgid "" @@ -2989,7 +3510,7 @@ msgstr "" #: ../Doc/library/turtle.rst:2078 msgid ">>> screen.mainloop()" -msgstr "" +msgstr ">>> screen.mainloop()" #: ../Doc/library/turtle.rst:2086 ../Doc/library/turtle.rst:2087 #: ../Doc/library/turtle.rst:2099 ../Doc/library/turtle.rst:2100 @@ -3010,10 +3531,9 @@ msgstr "" #: ../Doc/library/turtle.rst:2094 msgid ">>> screen.textinput(\"NIM\", \"Name of first player:\")" -msgstr "" +msgstr ">>> screen.textinput(\"NIM\", \"Name of first player:\")" #: ../Doc/library/turtle.rst:2105 -#, fuzzy msgid "" "Pop up a dialog window for input of a number. title is the title of the " "dialog window, prompt is a text mostly describing what numerical information " @@ -3023,20 +3543,22 @@ msgid "" "open for correction. Return the number input. If the dialog is canceled, " "return ``None``. ::" msgstr "" -"Abre una ventana de diálogo para el ingreso de un número. *title* es el " -"título de la ventana de diálogo, *prompt* es un texto que usualmente " -"describe qué información numérica ingresar. *default*: valor por defecto, " -"*minval*: mínimo valor aceptado, *maxval*: máximo valor aceptado. Si se " -"aportan estos parámetros, el número a ingresar debe estar en el rango " -"*minval*..*maxval*. Si no, se da una pista y el diálogo permanece abierto " -"para su corrección. Devuelve el número ingresado. Si el diálogo es " -"cancelado, devuelve ``None``.::" +"Abre una ventana de diálogo para ingresar un número. El título es el título " +"de la ventana de diálogo, el mensaje es un texto que describe principalmente " +"qué información numérica ingresar. predeterminado: valor predeterminado, " +"minval: valor mínimo para la entrada, maxval: valor máximo para la entrada. " +"El número ingresado debe estar en el rango minval... maxval si se " +"proporcionan estos. Si no, se emite una pista y el diálogo permanece abierto " +"para su corrección. Devuelve el número ingresado. Si se cancela el diálogo, " +"devuelve ``None``. ::" #: ../Doc/library/turtle.rst:2114 msgid "" ">>> screen.numinput(\"Poker\", \"Your stakes:\", 1000, minval=10, " "maxval=10000)" msgstr "" +">>> screen.numinput(\"Poker\", \"Your stakes:\", 1000, minval=10, " +"maxval=10000)" #: ../Doc/library/turtle.rst:2122 msgid "one of the strings \"standard\", \"logo\" or \"world\"" @@ -3105,19 +3627,21 @@ msgid "" ">>> mode()\n" "'logo'" msgstr "" +">>> mode(\"logo\") # reinicia la tortuga hacia el norte\n" +">>> mode()\n" +"'logo'" #: ../Doc/library/turtle.rst:2149 msgid "one of the values 1.0 or 255" msgstr "uno de los valores 1.0 o 255" #: ../Doc/library/turtle.rst:2151 -#, fuzzy msgid "" "Return the colormode or set it to 1.0 or 255. Subsequently *r*, *g*, *b* " "values of color triples have to be in the range 0..*cmode*." msgstr "" -"Devuelve el *colormode* o lo establece a 1.0 o 255. Subsecuentemente, los " -"valores triples de color *r*, *g*, *b* tienen que estar en el rango 0..\\ " +"Devuelve el modo de color o configúrelo en 1.0 o 255. Posteriormente, los " +"valores *r*, *g*, *b* de los triples de color deben estar en el rango 0.." "*cmode*." #: ../Doc/library/turtle.rst:2154 @@ -3134,6 +3658,17 @@ msgid "" "255\n" ">>> turtle.pencolor(240,160,80)" msgstr "" +">>> screen.colormode(1)\n" +">>> turtle.pencolor(240, 160, 80)\n" +"Traceback (most recent call last):\n" +" ...\n" +"TurtleGraphicsError: bad color sequence: (240, 160, 80)\n" +">>> screen.colormode()\n" +"1.0\n" +">>> screen.colormode(255)\n" +">>> screen.colormode()\n" +"255\n" +">>> turtle.pencolor(240,160,80)" #: ../Doc/library/turtle.rst:2172 msgid "" @@ -3149,6 +3684,9 @@ msgid "" ">>> cv\n" "" msgstr "" +">>> cv = screen.getcanvas()\n" +">>> cv\n" +"" #: ../Doc/library/turtle.rst:2185 msgid "Return a list of names of all currently available turtle shapes." @@ -3161,6 +3699,8 @@ msgid "" ">>> screen.getshapes()\n" "['arrow', 'blank', 'circle', ..., 'turtle']" msgstr "" +">>> screen.getshapes()\n" +"['arrow', 'blank', 'circle', ..., 'turtle']" #: ../Doc/library/turtle.rst:2197 msgid "There are three different ways to call this function:" @@ -3176,7 +3716,7 @@ msgstr "" #: ../Doc/library/turtle.rst:2202 msgid ">>> screen.register_shape(\"turtle.gif\")" -msgstr "" +msgstr ">>> screen.register_shape(\"turtle.gif\")" #: ../Doc/library/turtle.rst:2205 msgid "" @@ -3196,16 +3736,15 @@ msgstr "" #: ../Doc/library/turtle.rst:2211 msgid ">>> screen.register_shape(\"triangle\", ((5,-3), (0,5), (-5,-3)))" -msgstr "" +msgstr ">>> screen.register_shape(\"triangle\", ((5,-3), (0,5), (-5,-3)))" #: ../Doc/library/turtle.rst:2216 -#, fuzzy msgid "" "*name* is an arbitrary string and *shape* is a (compound) :class:`Shape` " "object: Install the corresponding compound shape." msgstr "" -"*name* es una cadena de caracteres arbitraria y *shape* es un objeto :class:" -"`Shape` (compuesto): Instala la correspondiente forma compuesta." +"*name* es una cadena arbitraria y *shape* es un objeto :class:`Shape` " +"(compuesto): instala la forma compuesta correspondiente." #: ../Doc/library/turtle.rst:2219 msgid "" @@ -3225,6 +3764,8 @@ msgid "" ">>> for turtle in screen.turtles():\n" "... turtle.color(\"red\")" msgstr "" +">>> for turtle in screen.turtles():\n" +"... turtle.color(\"red\")" #: ../Doc/library/turtle.rst:2236 msgid "Return the height of the turtle window. ::" @@ -3235,6 +3776,8 @@ msgid "" ">>> screen.window_height()\n" "480" msgstr "" +">>> screen.window_height()\n" +"480" #: ../Doc/library/turtle.rst:2244 msgid "Return the width of the turtle window. ::" @@ -3245,6 +3788,8 @@ msgid "" ">>> screen.window_width()\n" "640" msgstr "" +">>> screen.window_width()\n" +"640" #: ../Doc/library/turtle.rst:2253 msgid "Methods specific to Screen, not inherited from TurtleScreen" @@ -3326,6 +3871,10 @@ msgid "" ">>> screen.setup(width=.75, height=0.5, startx=None, starty=None)\n" ">>> # sets window to 75% of screen by 50% of screen and centers" msgstr "" +">>> screen.setup (width=200, height=200, startx=0, starty=0)\n" +">>> # sets window to 200x200 pixels, in upper left of screen\n" +">>> screen.setup(width=.75, height=0.5, startx=None, starty=None)\n" +">>> # sets window to 75% of screen by 50% of screen and centers" #: ../Doc/library/turtle.rst:2300 msgid "a string that is shown in the titlebar of the turtle graphics window" @@ -3339,20 +3888,19 @@ msgstr "Establece el título de la ventana de la tortuga a *titlestring*." #: ../Doc/library/turtle.rst:2305 msgid ">>> screen.title(\"Welcome to the turtle zoo!\")" -msgstr "" +msgstr ">>> screen.title(\"Welcome to the turtle zoo!\")" #: ../Doc/library/turtle.rst:2312 msgid "Public classes" msgstr "Clases públicas" #: ../Doc/library/turtle.rst:2318 -#, fuzzy msgid "" "a :class:`!tkinter.Canvas`, a :class:`ScrolledCanvas` or a :class:" "`TurtleScreen`" msgstr "" -"una clase :class:`tkinter.Canvas`, una :class:`ScrolledCanvas` o una clase :" -"class:`TurtleScreen`" +"un :class:`!tkinter.Canvas`, un :class:`ScrolledCanvas` o un :class:" +"`TurtleScreen`" #: ../Doc/library/turtle.rst:2321 msgid "" @@ -3372,18 +3920,16 @@ msgstr "" "necesario por primera vez." #: ../Doc/library/turtle.rst:2333 -#, fuzzy msgid "a :class:`!tkinter.Canvas`" -msgstr "un :class:`tkinter.Canvas`" +msgstr "un :class:`!tkinter.Canvas`" #: ../Doc/library/turtle.rst:2335 -#, fuzzy msgid "" "Provides screen oriented methods like :func:`bgcolor` etc. that are " "described above." msgstr "" -"Provee métodos orientados a la pantalla como :func:`setbg` etc. descriptos " -"anteriormente." +"Proporciona métodos orientados a la pantalla como :func:`bgcolor`, etc., que " +"se describen anteriormente." #: ../Doc/library/turtle.rst:2340 msgid "" @@ -3481,6 +4027,10 @@ msgid "" ">>> s.addcomponent(poly, \"red\", \"blue\")\n" ">>> # ... add more components and then use register_shape()" msgstr "" +">>> poly = ((0,0),(10,-5),(0,10),(-10,-5))\n" +">>> s = Shape(\"compound\")\n" +">>> s.addcomponent(poly, \"red\", \"blue\")\n" +">>> # ... add more components and then use register_shape()" #: ../Doc/library/turtle.rst:2384 msgid "See :ref:`compoundshapes`." @@ -3527,7 +4077,7 @@ msgstr "``a.rotate(angle)`` rotación" #: ../Doc/library/turtle.rst:2406 msgid "Explanation" -msgstr "" +msgstr "Explicación" #: ../Doc/library/turtle.rst:2408 msgid "" @@ -3535,12 +4085,17 @@ msgid "" "in the turtle object-oriented interface that can be used to create them and " "relate them to each other." msgstr "" +"Un objeto tortuga se dibuja en un objeto de pantalla, y hay una serie de " +"clases clave en la interfaz orientada a objetos tortuga que se pueden usar " +"para crearlos y relacionarlos entre sí." #: ../Doc/library/turtle.rst:2412 msgid "" "A :class:`Turtle` instance will automatically create a :class:`Screen` " "instance if one is not already present." msgstr "" +"Una instancia :class:`Turtle` creará automáticamente una instancia :class:" +"`Screen` si aún no hay una presente." #: ../Doc/library/turtle.rst:2415 msgid "" @@ -3549,6 +4104,10 @@ msgid "" "or created for it. The *canvas* can be a :class:`!tkinter.Canvas`, :class:" "`ScrolledCanvas` or :class:`TurtleScreen`." msgstr "" +"``Turtle`` es una subclase de :class:`RawTurtle`, que crea automáticamente " +"una superficie de dibujo. Para ello, será necesario proporcionar o crear una " +"*canvas*. La *canvas* puede ser una :class:`!tkinter.Canvas`, una :class:" +"`ScrolledCanvas` o una :class:`TurtleScreen`." #: ../Doc/library/turtle.rst:2421 msgid "" @@ -3558,9 +4117,14 @@ msgid "" "size and title) and behaviour. ``TurtleScreen``'s constructor needs a :class:" "`!tkinter.Canvas` or a :class:`ScrolledCanvas` as an argument." msgstr "" +":class:`TurtleScreen` es la superficie de dibujo básica de una tortuga. :" +"class:`Screen` es una subclase de ``TurtleScreen`` e incluye :ref:`some " +"additional methods ` para gestionar su apariencia (incluido " +"el tamaño y el título) y su comportamiento. El constructor de " +"``TurtleScreen`` necesita un :class:`!tkinter.Canvas` o un :class:" +"`ScrolledCanvas` como argumento." #: ../Doc/library/turtle.rst:2428 -#, fuzzy msgid "" "The functional interface for turtle graphics uses the various methods of " "``Turtle`` and ``TurtleScreen``/``Screen``. Behind the scenes, a screen " @@ -3568,20 +4132,19 @@ msgid "" "``Screen`` method is called. Similarly, a turtle object is automatically " "created whenever any of the functions derived from a Turtle method is called." msgstr "" -"La interface procedimental provee funciones que son derivadas de los métodos " -"de las clases :class:`Screen` y :class:`Turtle`. Tienen los mismos nombres " -"que los métodos correspondientes. Un objeto *Screen* es creado " -"automáticamente cada vez que una función derivada de un método *Screen* es " -"llamado. Un objeto *Turtle* (innombrado) se crea automáticamente cada vez " -"que se llama a una función derivada de un método *Turtle*." +"La interfaz funcional para gráficos de tortugas utiliza los distintos " +"métodos de ``Turtle`` y ``TurtleScreen``/``Screen``. En segundo plano, se " +"crea automáticamente un objeto de pantalla cada vez que se llama a una " +"función derivada de un método ``Screen``. De manera similar, se crea " +"automáticamente un objeto de tortuga cada vez que se llama a cualquiera de " +"las funciones derivadas de un método de Turtle." #: ../Doc/library/turtle.rst:2434 -#, fuzzy msgid "" "To use multiple turtles on a screen, the object-oriented interface must be " "used." msgstr "" -"Para usar varias tortugas en una pantalla se tiene que usar la interface " +"Para utilizar varias tortugas en una pantalla, se debe utilizar la interfaz " "orientada a objetos." #: ../Doc/library/turtle.rst:2439 @@ -3647,6 +4210,34 @@ msgid "" "\n" " >>> turtle.penup()" msgstr "" +">>> help(Screen.bgcolor)\n" +"Help on method bgcolor in module turtle:\n" +"\n" +"bgcolor(self, *args) unbound turtle.Screen method\n" +" Set or return backgroundcolor of the TurtleScreen.\n" +"\n" +" Arguments (if given): a color string or three numbers\n" +" in the range 0..colormode or a 3-tuple of such numbers.\n" +"\n" +"\n" +" >>> screen.bgcolor(\"orange\")\n" +" >>> screen.bgcolor()\n" +" \"orange\"\n" +" >>> screen.bgcolor(0.5,0,0.5)\n" +" >>> screen.bgcolor()\n" +" \"#800080\"\n" +"\n" +">>> help(Turtle.penup)\n" +"Help on method penup in module turtle:\n" +"\n" +"penup(self) unbound turtle.Turtle method\n" +" Pull the pen up -- no drawing when moving.\n" +"\n" +" Aliases: penup | pu | up\n" +"\n" +" No argument\n" +"\n" +" >>> turtle.penup()" #: ../Doc/library/turtle.rst:2482 msgid "" @@ -3689,6 +4280,36 @@ msgid "" " Example:\n" " >>> penup()" msgstr "" +">>> help(bgcolor)\n" +"Help on function bgcolor in module turtle:\n" +"\n" +"bgcolor(*args)\n" +" Set or return backgroundcolor of the TurtleScreen.\n" +"\n" +" Arguments (if given): a color string or three numbers\n" +" in the range 0..colormode or a 3-tuple of such numbers.\n" +"\n" +" Example::\n" +"\n" +" >>> bgcolor(\"orange\")\n" +" >>> bgcolor()\n" +" \"orange\"\n" +" >>> bgcolor(0.5,0,0.5)\n" +" >>> bgcolor()\n" +" \"#800080\"\n" +"\n" +">>> help(penup)\n" +"Help on function penup in module turtle:\n" +"\n" +"penup()\n" +" Pull the pen up -- no drawing when moving.\n" +"\n" +" Aliases: penup | pu | up\n" +"\n" +" No argument\n" +"\n" +" Example:\n" +" >>> penup()" #: ../Doc/library/turtle.rst:2516 msgid "" @@ -3788,10 +4409,10 @@ msgstr "" "configuración de acuerdo con su configuración." #: ../Doc/library/turtle.rst:2560 -#, fuzzy msgid "" "The built in configuration would correspond to the following ``turtle.cfg``:" -msgstr "La configuración incorporada correspondería al siguiente turtle.cfg::" +msgstr "" +"La configuración incorporada correspondería al siguiente ``turtle.cfg``:" #: ../Doc/library/turtle.rst:2562 msgid "" @@ -3816,28 +4437,46 @@ msgid "" "title = Python Turtle Graphics\n" "using_IDLE = False" msgstr "" +"width = 0.5\n" +"height = 0.75\n" +"leftright = None\n" +"topbottom = None\n" +"canvwidth = 400\n" +"canvheight = 300\n" +"mode = standard\n" +"colormode = 1.0\n" +"delay = 10\n" +"undobuffersize = 1000\n" +"shape = classic\n" +"pencolor = black\n" +"fillcolor = black\n" +"resizemode = noresize\n" +"visible = True\n" +"language = english\n" +"exampleturtle = turtle\n" +"examplescreen = screen\n" +"title = Python Turtle Graphics\n" +"using_IDLE = False" #: ../Doc/library/turtle.rst:2585 msgid "Short explanation of selected entries:" msgstr "Breve explicación de las entradas seleccionadas:" #: ../Doc/library/turtle.rst:2587 -#, fuzzy msgid "" "The first four lines correspond to the arguments of the :func:`Screen.setup " "` method." msgstr "" -"Las primeras cuatro líneas corresponden a los argumentos del método :meth:" -"`Screen.setup`." +"Las primeras cuatro líneas corresponden a los argumentos del método :func:" +"`Screen.setup `." #: ../Doc/library/turtle.rst:2589 -#, fuzzy msgid "" "Line 5 and 6 correspond to the arguments of the method :func:`Screen." "screensize `." msgstr "" -"Las líneas 5 y 6 corresponden a los argumentos del método :meth:`Screen." -"screensize`." +"Las líneas 5 y 6 corresponden a los argumentos del método :func:`Screen." +"screensize `." #: ../Doc/library/turtle.rst:2591 msgid "" @@ -3848,15 +4487,14 @@ msgstr "" "turtle, etc. Para obtener más información, pruebe con ``help(shape)``." #: ../Doc/library/turtle.rst:2593 -#, fuzzy msgid "" "If you want to use no fill color (i.e. make the turtle transparent), you " "have to write ``fillcolor = \"\"`` (but all nonempty strings must not have " "quotes in the cfg file)." msgstr "" -"Si no desea usar color de relleno (es decir, hacer que la tortuga sea " -"transparente), debe escribir ``fillcolor = \"\"`` (pero todas las cadenas no " -"vacías no deben tener comillas en el archivo cfg)." +"Si no desea utilizar ningún color de relleno (es decir, hacer que la tortuga " +"sea transparente), debe escribir ``fillcolor = \"\"`` (pero todas las " +"cadenas no vacías no deben tener comillas en el archivo cfg)." #: ../Doc/library/turtle.rst:2596 msgid "" @@ -3866,16 +4504,15 @@ msgstr "" "Si desea reflejar el estado de la tortuga, debe usar ``resizemode = auto``." #: ../Doc/library/turtle.rst:2598 -#, fuzzy msgid "" "If you set e.g. ``language = italian`` the docstringdict :file:" "`turtle_docstringdict_italian.py` will be loaded at import time (if present " "on the import path, e.g. in the same directory as :mod:`turtle`)." msgstr "" -"Si establece, por ejemplo, ``language = italian`` el docstringdict :file:" +"Si configura, por ejemplo, ``language = italian``, el docstringdict :file:" "`turtle_docstringdict_italian.py` se cargará en el momento de la importación " "(si está presente en la ruta de importación, por ejemplo, en el mismo " -"directorio que :mod:`turtle`." +"directorio que :mod:`turtle`)." #: ../Doc/library/turtle.rst:2601 msgid "" @@ -3890,15 +4527,14 @@ msgstr "" "nombres de las docstrings." #: ../Doc/library/turtle.rst:2605 -#, fuzzy msgid "" "*using_IDLE*: Set this to ``True`` if you regularly work with IDLE and its " "``-n`` switch (\"no subprocess\"). This will prevent :func:`exitonclick` to " "enter the mainloop." msgstr "" -"*using_IDLE*: establezca esto en ``True`` si trabaja regularmente con IDLE y " -"su interruptor -n (\"sin subproceso\"). Esto evitará que :func:`exitonclick` " -"ingrese al bucle principal." +"*using_IDLE*: Establezca esta opción en ``True`` si trabaja habitualmente " +"con IDLE y su opción ``-n`` (\"sin subproceso\"). Esto evitará que :func:" +"`exitonclick` ingrese al bucle principal." #: ../Doc/library/turtle.rst:2609 msgid "" @@ -3935,7 +4571,7 @@ msgstr "" #: ../Doc/library/turtle.rst:2627 msgid "python -m turtledemo" -msgstr "" +msgstr "python -m turtledemo" #: ../Doc/library/turtle.rst:2629 msgid "" @@ -3946,7 +4582,7 @@ msgstr "" #: ../Doc/library/turtle.rst:2631 msgid "python -m turtledemo.bytedesign" -msgstr "" +msgstr "python -m turtledemo.bytedesign" #: ../Doc/library/turtle.rst:2633 msgid "The :mod:`turtledemo` package directory contains:" @@ -4147,7 +4783,7 @@ msgstr "formas compuestas, :class:`Vec2D`" #: ../Doc/library/turtle.rst:2693 msgid "rosette" -msgstr "" +msgstr "rosetón" #: ../Doc/library/turtle.rst:2693 msgid "a pattern from the wikipedia article on turtle graphics" @@ -4219,7 +4855,6 @@ msgid "Changes since Python 2.6" msgstr "Cambios desde Python 2.6" #: ../Doc/library/turtle.rst:2718 -#, fuzzy msgid "" "The methods :func:`Turtle.tracer `, :func:`Turtle.window_width " "` and :func:`Turtle.window_height ` have been " @@ -4229,43 +4864,41 @@ msgid "" "duplications of the corresponding :class:`TurtleScreen`/:class:`Screen` " "methods.)" msgstr "" -"Los métodos :meth:`Turtle.tracer`, :meth:`Turtle.window_width` y :meth:" -"`Turtle.window_height` han sido eliminados. Los métodos con estos nombres y " -"funciones ahora están disponibles solo como métodos de :class:`Screen`. Las " -"funciones derivadas de estos permanecen disponibles. (De hecho, ya en Python " -"2.6 estos métodos eran simplemente duplicaciones de los métodos " -"correspondientes :class:`TurtleScreen`/:class:`Screen`)." +"Se han eliminado los métodos :func:`Turtle.tracer `, :func:`Turtle." +"window_width ` y :func:`Turtle.window_height `. " +"Los métodos con estos nombres y funcionalidades ahora solo están disponibles " +"como métodos de :class:`Screen`. Las funciones derivadas de estos siguen " +"estando disponibles. (De hecho, ya en Python 2.6 estos métodos eran meras " +"duplicaciones de los métodos :class:`TurtleScreen`/:class:`Screen` " +"correspondientes)." #: ../Doc/library/turtle.rst:2726 -#, fuzzy msgid "" "The method :func:`!Turtle.fill` has been eliminated. The behaviour of :func:" "`begin_fill` and :func:`end_fill` have changed slightly: now every filling " "process must be completed with an ``end_fill()`` call." msgstr "" -"El método :meth:`Turtle.fill` ha sido eliminado. El comportamiento de :meth:" -"`begin_fill` y :meth:`end_fill` ha cambiado ligeramente: ahora cada proceso " -"de llenado debe completarse con una llamada ``end_fill()``." +"Se ha eliminado el método :func:`!Turtle.fill`. El comportamiento de :func:" +"`begin_fill` y :func:`end_fill` ha cambiado ligeramente: ahora cada proceso " +"de llenado debe completarse con una llamada a ``end_fill()``." #: ../Doc/library/turtle.rst:2731 -#, fuzzy msgid "" "A method :func:`Turtle.filling ` has been added. It returns a " "boolean value: ``True`` if a filling process is under way, ``False`` " "otherwise. This behaviour corresponds to a ``fill()`` call without arguments " "in Python 2.6." msgstr "" -"Se ha añadido un método :meth:`Turtle.filling`. Retorna un valor booleano: " -"``True`` si hay un proceso de llenado en curso, ``False`` en caso contrario. " -"Este comportamiento corresponde a una llamada ``fill()`` sin argumentos en " -"Python 2.6." +"Se ha añadido un método :func:`Turtle.filling `. Devuelve un valor " +"booleano: ``True`` si se está realizando un proceso de llenado, ``False`` en " +"caso contrario. Este comportamiento corresponde a una llamada ``fill()`` sin " +"argumentos en Python 2.6." #: ../Doc/library/turtle.rst:2737 msgid "Changes since Python 3.0" msgstr "Cambios desde Python 3.0" #: ../Doc/library/turtle.rst:2739 -#, fuzzy msgid "" "The :class:`Turtle` methods :func:`shearfactor`, :func:`shapetransform` and :" "func:`get_shapepoly` have been added. Thus the full range of regular linear " @@ -4273,23 +4906,22 @@ msgid "" "`tiltangle` has been enhanced in functionality: it now can be used to get or " "set the tilt angle." msgstr "" -"Se han añadido los métodos :meth:`Turtle.shearfactor`, :meth:`Turtle." -"shapetransform` y :meth:`Turtle.get_shapepoly`. Por lo tanto, ahora está " -"disponible la gama completa de transformaciones lineales regulares para " -"transformar formas de tortugas. :meth:`Turtle.tiltangle` se ha mejorado en " -"funcionalidad: ahora se puede usar para obtener o establecer el tiltangle. :" -"meth:`Turtle.settiltangle` ha quedado obsoleto." +"Se han añadido los métodos :func:`shearfactor`, :func:`shapetransform` y :" +"func:`get_shapepoly` de :class:`Turtle`. De esta forma, ahora está " +"disponible toda la gama de transformaciones lineales regulares para " +"transformar formas de tortugas. Se ha mejorado la funcionalidad de :func:" +"`tiltangle`: ahora se puede utilizar para obtener o establecer el ángulo de " +"inclinación." #: ../Doc/library/turtle.rst:2745 -#, fuzzy msgid "" "The :class:`Screen` method :func:`onkeypress` has been added as a complement " "to :func:`onkey`. As the latter binds actions to the key release event, an " "alias: :func:`onkeyrelease` was also added for it." msgstr "" -"El método :meth:`Screen.onkeypress` se ha agregado como complemento a :meth:" -"`Screen.onkey` que, de hecho, une las acciones al evento keyrelease. En " -"consecuencia, este último tiene un alias: :meth:`Screen.onkeyrelease`." +"Se ha añadido el método :class:`Screen` :func:`onkeypress` como complemento " +"de :func:`onkey`. Como este último vincula acciones al evento de liberación " +"de la tecla, también se le ha añadido un alias: :func:`onkeyrelease`." #: ../Doc/library/turtle.rst:2749 msgid "" @@ -4297,17 +4929,19 @@ msgid "" "longer a need to use the standalone :func:`mainloop` function when working " "with :class:`Screen` and :class:`Turtle` objects." msgstr "" +"Se ha agregado el método :func:`Screen.mainloop `, por lo que ya " +"no es necesario utilizar la función independiente :func:`mainloop` al " +"trabajar con objetos :class:`Screen` y :class:`Turtle`." #: ../Doc/library/turtle.rst:2753 -#, fuzzy msgid "" "Two input methods have been added: :func:`Screen.textinput ` and :" "func:`Screen.numinput `. These pop up input dialogs and return " "strings and numbers respectively." msgstr "" -"Se han añadido dos métodos de entrada :meth:`Screen.textinput` y :meth:" -"`Screen.numinput`. Estos cuadros de diálogo de entrada emergentes y retornan " -"cadenas y números respectivamente." +"Se han añadido dos métodos de entrada: :func:`Screen.textinput ` " +"y :func:`Screen.numinput `. Estos abren cuadros de diálogo de " +"entrada y devuelven cadenas y números respectivamente." #: ../Doc/library/turtle.rst:2757 msgid "" From bee6753114138e20a0fbd8729b3f04526adc67ea Mon Sep 17 00:00:00 2001 From: kbiggers Date: Tue, 14 Oct 2025 10:17:45 +0000 Subject: [PATCH 22/40] Traducido c-api/memory.po (#3366) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #3267 --------- Co-authored-by: rtobar Co-authored-by: Cristián Maureira-Fredes --- c-api/memory.po | 200 ++++++++++++++++++++-------------- dictionaries/c-api_memory.txt | 5 + 2 files changed, 126 insertions(+), 79 deletions(-) diff --git a/c-api/memory.po b/c-api/memory.po index 629456430f..794934cfbe 100644 --- a/c-api/memory.po +++ b/c-api/memory.po @@ -11,15 +11,16 @@ msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2022-10-27 03:12-0300\n" +"PO-Revision-Date: 2025-02-10 12:41-0500\n" "Last-Translator: Marco Richetta \n" -"Language: es\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.5\n" #: ../Doc/c-api/memory.rst:8 msgid "Memory Management" @@ -121,6 +122,15 @@ msgid "" "free(buf); /* malloc'ed */\n" "return res;" msgstr "" +"PyObject *res;\n" +"char *buf = (char *) malloc(BUFSIZ); /* para I/O */\n" +"\n" +"if (buf == NULL)\n" +" return PyErr_NoMemory();\n" +"...Hacer algunas operaciones I/O incluyendo buf...\n" +"res = PyBytes_FromString(buf);\n" +"free(buf); /* malloc'ed */\n" +"return res;" #: ../Doc/c-api/memory.rst:68 msgid "" @@ -189,7 +199,6 @@ msgid "Allocator Domains" msgstr "Dominios del asignador" #: ../Doc/c-api/memory.rst:100 -#, fuzzy msgid "" "All allocating functions belong to one of three different \"domains\" (see " "also :c:type:`PyMemAllocatorDomain`). These domains represent different " @@ -207,20 +216,16 @@ msgstr "" "diferentes propósitos. Los detalles específicos sobre cómo cada dominio " "asigna memoria o qué funciones internas llama cada dominio se considera un " "detalle de implementación, pero para fines de depuración, se puede encontrar " -"una tabla simplificada en :ref:`here `. No existe " -"un requisito estricto para usar la memoria retornada por las funciones de " -"asignación que pertenecen a un dominio dado solo para los propósitos " -"sugeridos por ese dominio (aunque esta es la práctica recomendada). Por " -"ejemplo, se podría usar la memoria retornada por :c:func:`PyMem_RawMalloc` " -"para asignar objetos Python o la memoria retornada por :c:func:" -"`PyObject_Malloc` para asignar memoria para búferes." +"una tabla simplificada :ref:`acá `. Los APIs " +"que se usan para designar y librar un bloque de memoria deben ser del mismo " +"dominio. Por ejemplo, se debe usar :c:func:`PyMem_Free` para librar memoria " +"usando :c:func:`PyMem_Malloc`." #: ../Doc/c-api/memory.rst:109 msgid "The three allocation domains are:" msgstr "Los tres dominios de asignación son:" #: ../Doc/c-api/memory.rst:111 -#, fuzzy msgid "" "Raw domain: intended for allocating memory for general-purpose memory " "buffers where the allocation *must* go to the system allocator or where the " @@ -231,10 +236,10 @@ msgstr "" "Dominio sin formato: destinado a asignar memoria para búferes de memoria de " "uso general donde la asignación *debe* ir al asignador del sistema o donde " "el asignador puede operar sin el :term:`GIL`. La memoria se solicita " -"directamente al sistema." +"directamente al sistema. Consulte :ref:`Interfaz de memoria sin formato `." #: ../Doc/c-api/memory.rst:116 -#, fuzzy msgid "" "\"Mem\" domain: intended for allocating memory for Python buffers and " "general-purpose memory buffers where the allocation must be performed with " @@ -244,17 +249,17 @@ msgstr "" "Dominio \"Mem\": destinado a asignar memoria para búferes de Python y " "búferes de memoria de propósito general donde la asignación debe realizarse " "con el :term:`GIL` retenido. La memoria se toma del montículo privado de " -"Python." +"Python. Consulte :ref:`Interfaz de Memoria `." #: ../Doc/c-api/memory.rst:121 -#, fuzzy msgid "" "Object domain: intended for allocating memory for Python objects. The memory " "is taken from the Python private heap. See :ref:`Object allocators " "`." msgstr "" "Dominio de objeto: destinado a asignar memoria perteneciente a objetos de " -"Python. La memoria se toma del montículo privado de Python." +"Python. La memoria se toma del montículo privado de Python. Consulte :ref:" +"`Asignadores de objetos `." #: ../Doc/c-api/memory.rst:126 msgid "" @@ -263,6 +268,10 @@ msgid "" "objects are allocated using that domain. This differs from the prior Python " "versions, where this was only a best practice and not a hard requirement." msgstr "" +"La compilación :term:`free-threaded ` requiere que solamente " +"objetos de Python se asignen usando el dominio de \"object\" y que todos los objetos " +"de Python se asignan usando ese dominio. Esto es diferente que los versiones " +"anteriores de Python, donde esto fue una práctica buena y no un requisito." #: ../Doc/c-api/memory.rst:130 msgid "" @@ -270,10 +279,15 @@ msgid "" "`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, or :c:func:`malloc`, but not :c:" "func:`PyObject_Malloc`." msgstr "" +"Por ejemplo, *buffers* (objetos que no son de Python) deben asignarse " +"usando :c:func:`PyMem_Malloc`, :c:func:`PyMem_RawMalloc`, o :c:func:" +"`malloc`, pero no :c:func:`PyObject_Malloc`." #: ../Doc/c-api/memory.rst:133 msgid "See :ref:`Memory Allocation APIs `." msgstr "" +"Consulte :ref:`APIs de Asignación de Memoria `." #: ../Doc/c-api/memory.rst:139 msgid "Raw Memory Interface" @@ -290,17 +304,16 @@ msgstr "" "mantener el :term:`GIL `." #: ../Doc/c-api/memory.rst:145 -#, fuzzy msgid "" "The :ref:`default raw memory allocator ` uses the " "following functions: :c:func:`malloc`, :c:func:`calloc`, :c:func:`realloc` " "and :c:func:`!free`; call ``malloc(1)`` (or ``calloc(1, 1)``) when " "requesting zero bytes." msgstr "" -"El :ref:`asignador de memoria sin procesar predeterminado ` usa las siguientes funciones: :c:func:`malloc`, :c:func:" -"`calloc`, :c:func:`realloc` y :c:func:`free`; llame a ``malloc(1)`` (o " -"``calloc(1, 1)``) cuando solicita cero bytes." +"El :ref:`asignador de memoria sin formato ` usa " +"las siguientes funciones: :c:func:`malloc`, :c:func:`calloc`, :c:func:" +"`realloc` y :c:func:`!free`; llame a ``malloc(1)`` (o ``calloc(1, 1)``) " +"cuando solicita cero bytes." #: ../Doc/c-api/memory.rst:154 ../Doc/c-api/memory.rst:225 #: ../Doc/c-api/memory.rst:335 @@ -502,18 +515,16 @@ msgstr "" "Tenga en cuenta que *TYPE* se refiere a cualquier tipo de C." #: ../Doc/c-api/memory.rst:277 -#, fuzzy msgid "" "Same as :c:func:`PyMem_Malloc`, but allocates ``(n * sizeof(TYPE))`` bytes " "of memory. Returns a pointer cast to ``TYPE*``. The memory will not have " "been initialized in any way." msgstr "" "Igual que :c:func:`PyMem_Malloc`, pero asigna ``(n * sizeof(TYPE))`` bytes " -"de memoria. Retorna una conversión de puntero a :c:expr:`TYPE*`. La memoria " -"no se habrá inicializado de ninguna manera." +"de memoria. Retorna una conversión de puntero a ``TYPE*``. La memoria no se " +"habrá inicializado de ninguna manera." #: ../Doc/c-api/memory.rst:284 -#, fuzzy msgid "" "Same as :c:func:`PyMem_Realloc`, but the memory block is resized to ``(n * " "sizeof(TYPE))`` bytes. Returns a pointer cast to ``TYPE*``. On return, *p* " @@ -521,9 +532,9 @@ msgid "" "failure." msgstr "" "Igual que :c:func:`PyMem_Realloc`, pero el bloque de memoria cambia de " -"tamaño a ``(n * sizeof(TYPE))`` bytes. Retorna una conversión de puntero a :" -"c:expr:`TYPE*`. Al retornar, *p* será un puntero a la nueva área de memoria, " -"o ``NULL`` en caso de falla." +"tamaño a ``(n * sizeof(TYPE))`` bytes. Retorna una conversión de puntero a " +"``TYPE*``. Al retornar, *p* será un puntero a la nueva área de memoria, o " +"``NULL`` en caso de falla." #: ../Doc/c-api/memory.rst:289 msgid "" @@ -760,6 +771,8 @@ msgid "" "``mimalloc``: :ref:`mimalloc memory allocator `. The pymalloc " "allocator will be used if mimalloc support isn't available." msgstr "" +"``mimalloc``: :ref:`asignador de memoria mimalloc `. El asignador " +"pymalloc se usará si no hay compatibilidad con mimalloc." # debug hooks se deja como enlaces de depuración ya que en traducciones # anteriores se dejó como enlaces @@ -838,12 +851,11 @@ msgid "free a memory block" msgstr "liberar un bloque de memoria" #: ../Doc/c-api/memory.rst:437 -#, fuzzy msgid "" "The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" "`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" -"La estructura :c:type:`PyMemAllocator` se renombró a :c:type:" +"La estructura :c:type:`!PyMemAllocator` se renombró a :c:type:" "`PyMemAllocatorEx` y se agregó un nuevo campo ``calloc``." #: ../Doc/c-api/memory.rst:444 @@ -920,15 +932,14 @@ msgstr "" "cero bytes." #: ../Doc/c-api/memory.rst:487 -#, fuzzy msgid "" "For the :c:macro:`PYMEM_DOMAIN_RAW` domain, the allocator must be thread-" "safe: the :term:`GIL ` is not held when the " "allocator is called." msgstr "" -"Para el dominio :c:data:`PYMEM_DOMAIN_RAW`, el asignador debe ser seguro " -"para subprocesos: el :term:`GIL ` no se mantiene " -"cuando se llama al asignador." +"Para el dominio :c:macro:`PYMEM_DOMAIN_RAW`, el asignador debe ser seguro " +"para hilos: el :term:`GIL ` no se mantiene cuando " +"se llama al asignador." #: ../Doc/c-api/memory.rst:491 msgid "" @@ -936,6 +947,9 @@ msgid "" "allocator may be called in different interpreters that do not share a " "``GIL``." msgstr "" +"Para los dominios restantes, el asignador también debe ser seguro para los " +"hilos: el asignador se podría llamar desde intérpretes diferentes que no " +"comparten un ``GIL``." #: ../Doc/c-api/memory.rst:495 msgid "" @@ -957,7 +971,7 @@ msgstr "" #: ../Doc/c-api/memory.rst:504 msgid ":c:func:`PyMem_SetAllocator` does have the following contract:" -msgstr "" +msgstr ":c:func:`PyMem_SetAllocator` tiene el contrato siguiente:" #: ../Doc/c-api/memory.rst:506 msgid "" @@ -968,6 +982,12 @@ msgid "" "without the GIL held). See :ref:`the section on allocator domains ` for more information." msgstr "" +"Se puede llamar después de :c:func:`Py_PreInitialize` y antes de :c:func:" +"`Py_InitializeFromConfig` para instalar un asignador de memoria " +"personalizada. No hay restricciones para el asignador instalado aparte de " +"las que se interpone el dominio (por ejemplo, el Dominio Crudo permite que " +"se llame al asignador sin sostener el GIL). Consulte :ref:`la sección " +"sobre dominios de asignadores ` para más información." #: ../Doc/c-api/memory.rst:514 msgid "" @@ -976,10 +996,14 @@ msgid "" "existing allocator. Substituting the current allocator for some other " "arbitrary one is **not supported**." msgstr "" +"Si se llama después de que Python haya terminado inicializándose (después de " +"llamar :c:func:`Py_InitializeFromConfig`) el asignador **debe** envolver el " +"asignador existente. Substituyendo el asignador actual con otro arbitrario " +"**no es compatible**." #: ../Doc/c-api/memory.rst:519 msgid "All allocators must be thread-safe." -msgstr "" +msgstr "Todos los asignadores deben ser seguro para los hilos." #: ../Doc/c-api/memory.rst:525 msgid "" @@ -1066,7 +1090,6 @@ msgstr "" "Detectar escritura después del final del búfer (desbordamiento del búfer)" #: ../Doc/c-api/memory.rst:558 -#, fuzzy msgid "" "Check that the :term:`GIL ` is held when allocator " "functions of :c:macro:`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) " @@ -1074,8 +1097,8 @@ msgid "" "called." msgstr "" "Comprueba que :term:`GIL ` se mantiene cuando las " -"funciones del asignador de :c:data:`PYMEM_DOMAIN_OBJ` (ej: :c:func:" -"`PyObject_Malloc`) y dominios :c:data:`PYMEM_DOMAIN_MEM` (por ejemplo: :c:" +"funciones del asignador de :c:macro:`PYMEM_DOMAIN_OBJ` (ej: :c:func:" +"`PyObject_Malloc`) y dominios :c:macro:`PYMEM_DOMAIN_MEM` (por ejemplo: :c:" "func:`PyMem_Malloc`) se llaman." #: ../Doc/c-api/memory.rst:563 @@ -1095,9 +1118,9 @@ msgid "" "Let *S* = ``sizeof(size_t)``. ``2*S`` bytes are added at each end of each " "block of *N* bytes requested. The memory layout is like so, where p " "represents the address returned by a malloc-like or realloc-like function " -"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to " -"``*(p+j)`` exclusive; note that the treatment of negative indices differs " -"from a Python slice):" +"(``p[i:j]`` means the slice of bytes from ``*(p+i)`` inclusive up to ``*(p" +"+j)`` exclusive; note that the treatment of negative indices differs from a " +"Python slice):" msgstr "" "Sea *S* = ``sizeof(size_t)``. Se agregan ``2*S`` bytes en cada extremo de " "cada bloque de *N* bytes solicitados. El diseño de la memoria es así, donde " @@ -1127,19 +1150,16 @@ msgid "API identifier (ASCII character):" msgstr "Identificador de API (carácter ASCII):" #: ../Doc/c-api/memory.rst:580 -#, fuzzy msgid "``'r'`` for :c:macro:`PYMEM_DOMAIN_RAW`." -msgstr "``'r'`` para :c:data:`PYMEM_DOMAIN_RAW`." +msgstr "``'r'`` para :c:macro:`PYMEM_DOMAIN_RAW`." #: ../Doc/c-api/memory.rst:581 -#, fuzzy msgid "``'m'`` for :c:macro:`PYMEM_DOMAIN_MEM`." -msgstr "``'m'`` para :c:data:`PYMEM_DOMAIN_MEM`." +msgstr "``'m'`` para :c:macro:`PYMEM_DOMAIN_MEM`." #: ../Doc/c-api/memory.rst:582 -#, fuzzy msgid "``'o'`` for :c:macro:`PYMEM_DOMAIN_OBJ`." -msgstr "``'o'`` para :c:data:`PYMEM_DOMAIN_OBJ`." +msgstr "``'o'`` para :c:macro:`PYMEM_DOMAIN_OBJ`." #: ../Doc/c-api/memory.rst:585 msgid "``p[-S+1:0]``" @@ -1197,7 +1217,6 @@ msgstr "" "definida por defecto)." #: ../Doc/c-api/memory.rst:603 -#, fuzzy msgid "" "A serial number, incremented by 1 on each call to a malloc-like or realloc-" "like function. Big-endian :c:type:`size_t`. If \"bad memory\" is detected " @@ -1207,11 +1226,11 @@ msgid "" "number is incremented, and exists so you can set such a breakpoint easily." msgstr "" "Un número de serie, incrementado en 1 en cada llamada a una función similar " -"a malloc o realloc. Big-endian ``size_t``. Si se detecta \"mala memoria\" " -"más tarde, el número de serie ofrece una excelente manera de establecer un " -"punto de interrupción en la siguiente ejecución, para capturar el instante " -"en el que se pasó este bloque. La función estática bumpserialno() en " -"obmalloc.c es el único lugar donde se incrementa el número de serie, y " +"a malloc o realloc. Big-endian :c:type:`size_t`. Si se detecta \"mala memoria" +"\" más tarde, el número de serie ofrece una excelente manera de establecer " +"un punto de interrupción en la siguiente ejecución, para capturar el " +"instante en el que se pasó este bloque. La función estática bumpserialno() " +"en obmalloc.c es el único lugar donde se incrementa el número de serie, y " "existe para que pueda establecer un punto de interrupción fácilmente." #: ../Doc/c-api/memory.rst:610 @@ -1237,7 +1256,6 @@ msgstr "" "(que significa que se está usando la memoria no inicializada)." #: ../Doc/c-api/memory.rst:619 -#, fuzzy msgid "" "The :c:func:`PyMem_SetupDebugHooks` function now also works on Python " "compiled in release mode. On error, the debug hooks now use :mod:" @@ -1248,9 +1266,9 @@ msgstr "" "La función :c:func:`PyMem_SetupDebugHooks` ahora también funciona en Python " "compilado en modo de lanzamiento. En caso de error, los enlaces de " "depuración ahora usan :mod:`tracemalloc` para obtener el rastreo donde se " -"asignó un bloque de memoria. Los enlaces de depuración ahora también " -"comprueban si el GIL se mantiene cuando se llaman las funciones de :c:data:" -"`PYMEM_DOMAIN_OBJ` y :c:data:`PYMEM_DOMAIN_MEM` dominios." +"asignó un bloque de memoria. Los ganchos de depuración ahora también " +"comprueban si el GIL se mantiene cuando se llaman las funciones de :c:macro:" +"`PYMEM_DOMAIN_OBJ` y :c:macro:`PYMEM_DOMAIN_MEM` dominios." #: ../Doc/c-api/memory.rst:627 msgid "" @@ -1269,7 +1287,6 @@ msgid "The pymalloc allocator" msgstr "El asignador pymalloc" #: ../Doc/c-api/memory.rst:639 -#, fuzzy msgid "" "Python has a *pymalloc* allocator optimized for small objects (smaller or " "equal to 512 bytes) with a short lifetime. It uses memory mappings called " @@ -1279,34 +1296,32 @@ msgid "" msgstr "" "Python tiene un asignador *pymalloc* optimizado para objetos pequeños (más " "pequeños o iguales a 512 bytes) con una vida útil corta. Utiliza " -"asignaciones de memoria llamadas \"arenas\" con un tamaño fijo de 256 KiB. " -"Vuelve a :c:func:`PyMem_RawMalloc` y :c:func:`PyMem_RawRealloc` para " -"asignaciones de más de 512 bytes." +"asignaciones de memoria llamadas \"arenas\" con un tamaño fijo de 256 KiB en " +"plataformas de 32 bits o 1 MiB en plataformas de 64 bits. Vuelve a :c:func:" +"`PyMem_RawMalloc` y :c:func:`PyMem_RawRealloc` para asignaciones de más de " +"512 bytes." #: ../Doc/c-api/memory.rst:645 -#, fuzzy msgid "" "*pymalloc* is the :ref:`default allocator ` of " "the :c:macro:`PYMEM_DOMAIN_MEM` (ex: :c:func:`PyMem_Malloc`) and :c:macro:" "`PYMEM_DOMAIN_OBJ` (ex: :c:func:`PyObject_Malloc`) domains." msgstr "" "*pymalloc* es el :ref:`asignador por defecto ` " -"de :c:data:`PYMEM_DOMAIN_MEM` (por ejemplo: :c:func:`PyMem_Malloc`) y :c:" -"data:`PYMEM_DOMAIN_OBJ` (por ejemplo: :c:func:`PyObject_Malloc`) dominios." +"de :c:macro:`PYMEM_DOMAIN_MEM` (por ejemplo: :c:func:`PyMem_Malloc`) y :c:" +"macro:`PYMEM_DOMAIN_OBJ` (por ejemplo: :c:func:`PyObject_Malloc`) dominios." #: ../Doc/c-api/memory.rst:649 msgid "The arena allocator uses the following functions:" msgstr "El asignador de arena utiliza las siguientes funciones:" #: ../Doc/c-api/memory.rst:651 -#, fuzzy msgid ":c:func:`!VirtualAlloc` and :c:func:`!VirtualFree` on Windows," -msgstr ":c:func:`VirtualAlloc` y :c:func:`VirtualFree` en Windows," +msgstr ":c:func:`!VirtualAlloc` y :c:func:`!VirtualFree` en Windows," #: ../Doc/c-api/memory.rst:652 -#, fuzzy msgid ":c:func:`!mmap` and :c:func:`!munmap` if available," -msgstr ":c:func:`mmap` y :c:func:`munmap` si está disponible," +msgstr ":c:func:`!mmap` y :c:func:`!munmap` si está disponible," #: ../Doc/c-api/memory.rst:653 msgid ":c:func:`malloc` and :c:func:`free` otherwise." @@ -1360,9 +1375,8 @@ msgid "Set the arena allocator." msgstr "Establecer el asignador de arena." #: ../Doc/c-api/memory.rst:690 -#, fuzzy msgid "The mimalloc allocator" -msgstr "El asignador pymalloc" +msgstr "El asignador mimalloc" #: ../Doc/c-api/memory.rst:694 msgid "" @@ -1371,6 +1385,10 @@ msgid "" "performance characteristics. Initially developed by Daan Leijen for the " "runtime systems of the Koka and Lean languages.\"" msgstr "" +"Python admite el asignador mimalloc cuando la plataforma subyacente lo " +"admite. mimalloc \"es un asignador de propósito general con excelentes " +"característicos de rendimiento. Desarrollado originalmente por Daan Leijen " +"para los sistemas de tiempo de ejecución de las lenguajes Koka y Lean\"" #: ../Doc/c-api/memory.rst:699 msgid "tracemalloc C API" @@ -1434,6 +1452,15 @@ msgid "" "PyMem_Free(buf); /* allocated with PyMem_Malloc */\n" "return res;" msgstr "" +"PyObject *res;\n" +"char *buf = (char *) PyMem_Malloc(BUFSIZ); /* para I/O */\n" +"\n" +"if (buf == NULL)\n" +" return PyErr_NoMemory();\n" +"/* ...Hacer algunas operaciones I/O incluyendo buf... */\n" +"res = PyBytes_FromString(buf);\n" +"PyMem_Free(buf); /* destinado con PyMem_Malloc */\n" +"return res;" #: ../Doc/c-api/memory.rst:738 msgid "The same code using the type-oriented function set::" @@ -1452,6 +1479,15 @@ msgid "" "PyMem_Del(buf); /* allocated with PyMem_New */\n" "return res;" msgstr "" +"PyObject *res;\n" +"char *buf = PyMem_New(char, BUFSIZ); /* para I/O */\n" +"\n" +"if (buf == NULL)\n" +" return PyErr_NoMemory();\n" +"/* ...Hacer algunas operaciones I/O incluyendo buf... */\n" +"res = PyBytes_FromString(buf);\n" +"PyMem_Del(buf); /* destinado con PyMem_New */\n" +"return res;" #: ../Doc/c-api/memory.rst:750 msgid "" @@ -1480,17 +1516,23 @@ msgid "" "free(buf2); /* Right -- allocated via malloc() */\n" "free(buf1); /* Fatal -- should be PyMem_Del() */" msgstr "" +"char *buf1 = PyMem_New(char, BUFSIZ);\n" +"char *buf2 = (char *) malloc(BUFSIZ);\n" +"char *buf3 = (char *) PyMem_Malloc(BUFSIZ);\n" +"...\n" +"PyMem_Del(buf3); /* Incorrecto -- debe ser PyMem_Free() */\n" +"free(buf2); /* Correcto -- asignado por malloc() */\n" +"free(buf1); /* Fatal -- debe ser PyMem_Del() */" #: ../Doc/c-api/memory.rst:765 -#, fuzzy msgid "" "In addition to the functions aimed at handling raw memory blocks from the " "Python heap, objects in Python are allocated and released with :c:macro:" "`PyObject_New`, :c:macro:`PyObject_NewVar` and :c:func:`PyObject_Del`." msgstr "" "Además de las funciones destinadas a manejar bloques de memoria sin procesar " -"del montón de Python, los objetos en Python se asignan y liberan con :c:func:" -"`PyObject_New`, :c:func:`PyObject_NewVar` y :c:func:`PyObject_Del` ." +"del montón de Python, los objetos en Python se asignan y liberan con :c:" +"macro:`PyObject_New`, :c:macro:`PyObject_NewVar` y :c:func:`PyObject_Del` ." #: ../Doc/c-api/memory.rst:769 msgid "" @@ -1502,16 +1544,16 @@ msgstr "" #: ../Doc/c-api/memory.rst:43 msgid "malloc (C function)" -msgstr "" +msgstr "malloc (C function)" #: ../Doc/c-api/memory.rst:43 msgid "calloc (C function)" -msgstr "" +msgstr "calloc (Función de C)" #: ../Doc/c-api/memory.rst:43 msgid "realloc (C function)" -msgstr "" +msgstr "realloc (Función de C)" #: ../Doc/c-api/memory.rst:43 msgid "free (C function)" -msgstr "" +msgstr "free (Función de C)" diff --git a/dictionaries/c-api_memory.txt b/dictionaries/c-api_memory.txt index 899f87325a..3d4af9f707 100644 --- a/dictionaries/c-api_memory.txt +++ b/dictionaries/c-api_memory.txt @@ -2,3 +2,8 @@ Mem realloc sobrescrituras bumpserialno +mimalloc +calloc +Daan +Leijen +Koka From 8636bf802109d81396fea0bf4df5466a518a54e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 12:20:22 +0200 Subject: [PATCH 23/40] Translate library/pathlib (#3329) Closes #3001 --- dictionaries/library_pathlib.txt | 3 + library/pathlib.po | 1211 ++++++++++++++++++++++-------- 2 files changed, 883 insertions(+), 331 deletions(-) diff --git a/dictionaries/library_pathlib.txt b/dictionaries/library_pathlib.txt index 82d64c5efe..d3c337c80f 100644 --- a/dictionaries/library_pathlib.txt +++ b/dictionaries/library_pathlib.txt @@ -1 +1,4 @@ +down +rmdir tripletas +unlink diff --git a/library/pathlib.po b/library/pathlib.po index 2a5865bfcf..b18498c1b3 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -11,25 +11,24 @@ 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: 2024-10-29 13:06-0600\n" -"Last-Translator: Carlos A. Crespo \n" -"Language: es\n" +"PO-Revision-Date: 2025-10-14 12:15+0200\n" +"Last-Translator: Cristián Maureira-Fredes \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/library/pathlib.rst:2 -#, fuzzy msgid ":mod:`!pathlib` --- Object-oriented filesystem paths" -msgstr ":mod:`pathlib` --- Rutas de sistemas orientada a objetos" +msgstr ":mod:`!pathlib` --- Rutas de sistemas orientada a objetos" #: ../Doc/library/pathlib.rst:9 -#, fuzzy msgid "**Source code:** :source:`Lib/pathlib/`" -msgstr "**Código fuente:** :source:`Lib/pathlib.py`" +msgstr "**Código fuente:** :source:`Lib/pathlib/`" #: ../Doc/library/pathlib.rst:15 msgid "" @@ -55,6 +54,12 @@ msgid "" "PosixPath subclasses PurePosixPath and Path, and WindowsPath\n" "subclasses PureWindowsPath and Path." msgstr "" +"Diagrama de herencia que muestra las clases disponibles en pathlib. La\n" +"clase más básica es PurePath, que tiene tres subclases directas:\n" +"PurePosixPath, PureWindowsPath y Path. Además de estas cuatro\n" +"clases, hay dos clases que utilizan herencia múltiple:\n" +"subclases de PosixPath, PurePosixPath y Path, y\n" +"subclases de WindowsPath, PureWindowsPath y Path." #: ../Doc/library/pathlib.rst:31 msgid "" @@ -100,8 +105,8 @@ msgstr "" #: ../Doc/library/pathlib.rst:48 msgid "" -"For low-level path manipulation on strings, you can also use the :mod:`os." -"path` module." +"For low-level path manipulation on strings, you can also use " +"the :mod:`os.path` module." msgstr "" "Para la manipulación de rutas de bajo nivel en cadenas, también puede usar " "el módulo :mod:`os.path`." @@ -116,7 +121,7 @@ msgstr "Importar la clase principal::" #: ../Doc/library/pathlib.rst:57 msgid ">>> from pathlib import Path" -msgstr "" +msgstr ">>> from pathlib import Path" #: ../Doc/library/pathlib.rst:59 msgid "Listing subdirectories::" @@ -129,6 +134,10 @@ msgid "" "[PosixPath('.hg'), PosixPath('docs'), PosixPath('dist'),\n" " PosixPath('__pycache__'), PosixPath('build')]" msgstr "" +">>> p = Path('.')\n" +">>> [x for x in p.iterdir() if x.is_dir()]\n" +"[PosixPath('.hg'), PosixPath('docs'), PosixPath('dist'),\n" +" PosixPath('__pycache__'), PosixPath('build')]" #: ../Doc/library/pathlib.rst:66 msgid "Listing Python source files in this directory tree::" @@ -141,6 +150,10 @@ msgid "" " PosixPath('pathlib.py'), PosixPath('docs/conf.py'),\n" " PosixPath('build/lib/pathlib.py')]" msgstr "" +">>> list(p.glob('**/*.py'))\n" +"[PosixPath('test_pathlib.py'), PosixPath('setup.py'),\n" +" PosixPath('pathlib.py'), PosixPath('docs/conf.py'),\n" +" PosixPath('build/lib/pathlib.py')]" #: ../Doc/library/pathlib.rst:73 msgid "Navigating inside a directory tree::" @@ -155,6 +168,12 @@ msgid "" ">>> q.resolve()\n" "PosixPath('/etc/rc.d/init.d/halt')" msgstr "" +">>> p = Path('/etc')\n" +">>> q = p / 'init.d' / 'reboot'\n" +">>> q\n" +"PosixPath('/etc/init.d/reboot')\n" +">>> q.resolve()\n" +"PosixPath('/etc/rc.d/init.d/halt')" #: ../Doc/library/pathlib.rst:82 msgid "Querying path properties::" @@ -167,6 +186,10 @@ msgid "" ">>> q.is_dir()\n" "False" msgstr "" +">>> q.exists()\n" +"True\n" +">>> q.is_dir()\n" +"False" #: ../Doc/library/pathlib.rst:89 msgid "Opening a file::" @@ -178,17 +201,21 @@ msgid "" "...\n" "'#!/bin/bash\\n'" msgstr "" +">>> with q.open() as f: f.readline()\n" +"...\n" +"'#!/bin/bash\\n'" #: ../Doc/library/pathlib.rst:97 -#, fuzzy msgid "Exceptions" -msgstr "operations" +msgstr "Excepciones" #: ../Doc/library/pathlib.rst:101 msgid "" "An exception inheriting :exc:`NotImplementedError` that is raised when an " "unsupported operation is called on a path object." msgstr "" +"Una excepción que hereda :exc:`NotImplementedError` y que se genera cuando " +"se llama a una operación no compatible en un objeto de ruta." #: ../Doc/library/pathlib.rst:110 msgid "Pure paths" @@ -217,6 +244,8 @@ msgid "" ">>> PurePath('setup.py') # Running on a Unix machine\n" "PurePosixPath('setup.py')" msgstr "" +">>> PurePath('setup.py') # Ejecutándose en una máquina Unix\n" +"PurePosixPath('setup.py')" #: ../Doc/library/pathlib.rst:124 msgid "" @@ -237,6 +266,10 @@ msgid "" ">>> PurePath(Path('foo'), Path('bar'))\n" "PurePosixPath('foo/bar')" msgstr "" +">>> PurePath('foo', 'some/path', 'bar')\n" +"PurePosixPath('foo/some/path/bar')\n" +">>> PurePath(Path('foo'), Path('bar'))\n" +"PurePosixPath('foo/bar')" #: ../Doc/library/pathlib.rst:134 msgid "When *pathsegments* is empty, the current directory is assumed::" @@ -247,11 +280,13 @@ msgid "" ">>> PurePath()\n" "PurePosixPath('.')" msgstr "" +">>> PurePath()\n" +"PurePosixPath('.')" #: ../Doc/library/pathlib.rst:139 msgid "" -"If a segment is an absolute path, all previous segments are ignored (like :" -"func:`os.path.join`)::" +"If a segment is an absolute path, all previous segments are ignored " +"(like :func:`os.path.join`)::" msgstr "" "Si un segmento es una ruta absoluta, se ignoran todos los segmentos " "anteriores (como :func:`os.path.join`)::" @@ -263,11 +298,15 @@ msgid "" ">>> PureWindowsPath('c:/Windows', 'd:bar')\n" "PureWindowsPath('d:bar')" msgstr "" +">>> PurePath('/etc', '/usr', 'lib64')\n" +"PurePosixPath('/usr/lib64')\n" +">>> PureWindowsPath('c:/Windows', 'd:bar')\n" +"PureWindowsPath('d:bar')" #: ../Doc/library/pathlib.rst:147 msgid "" -"On Windows, the drive is not reset when a rooted relative path segment (e." -"g., ``r'\\foo'``) is encountered::" +"On Windows, the drive is not reset when a rooted relative path segment " +"(e.g., ``r'\\foo'``) is encountered::" msgstr "" "En Windows, la unidad no se restablece cuando se encuentra un segmento de " "ruta relativa en la raíz (por ejemplo, ``r'\\foo'``)::" @@ -277,6 +316,8 @@ msgid "" ">>> PureWindowsPath('c:/Windows', '/Program Files')\n" "PureWindowsPath('c:/Program Files')" msgstr "" +">>> PureWindowsPath('c:/Windows', '/Program Files')\n" +"PureWindowsPath('c:/Program Files')" #: ../Doc/library/pathlib.rst:153 msgid "" @@ -300,6 +341,14 @@ msgid "" ">>> PurePath('foo/../bar')\n" "PurePosixPath('foo/../bar')" msgstr "" +">>> PurePath('foo//bar')\n" +"PurePosixPath('foo/bar')\n" +">>> PurePath('//foo/bar')\n" +"PurePosixPath('//foo/bar')\n" +">>> PurePath('foo/./bar')\n" +"PurePosixPath('foo/bar')\n" +">>> PurePath('foo/../bar')\n" +"PurePosixPath('foo/../bar')" #: ../Doc/library/pathlib.rst:166 msgid "" @@ -336,6 +385,8 @@ msgid "" ">>> PurePosixPath('/etc/hosts')\n" "PurePosixPath('/etc/hosts')" msgstr "" +">>> PurePosixPath('/etc/hosts')\n" +"PurePosixPath('/etc/hosts')" #: ../Doc/library/pathlib.rst:184 ../Doc/library/pathlib.rst:196 #: ../Doc/library/pathlib.rst:766 ../Doc/library/pathlib.rst:776 @@ -358,6 +409,10 @@ msgid "" ">>> PureWindowsPath('//server/share/file')\n" "PureWindowsPath('//server/share/file')" msgstr "" +">>> PureWindowsPath('c:/', 'Users', 'Ximénez')\n" +"PureWindowsPath('c:/Users/Ximénez')\n" +">>> PureWindowsPath('//server/share/file')\n" +"PureWindowsPath('//server/share/file')" #: ../Doc/library/pathlib.rst:200 msgid "" @@ -393,6 +448,14 @@ msgid "" ">>> PureWindowsPath('C:') < PureWindowsPath('d:')\n" "True" msgstr "" +">>> PurePosixPath('foo') == PurePosixPath('FOO')\n" +"False\n" +">>> PureWindowsPath('foo') == PureWindowsPath('FOO')\n" +"True\n" +">>> PureWindowsPath('FOO') in { PureWindowsPath('foo') }\n" +"True\n" +">>> PureWindowsPath('C:') < PureWindowsPath('d:')\n" +"True" #: ../Doc/library/pathlib.rst:220 msgid "Paths of a different flavour compare unequal and cannot be ordered::" @@ -408,6 +471,13 @@ msgid "" "TypeError: '<' not supported between instances of 'PureWindowsPath' and " "'PurePosixPath'" msgstr "" +">>> PureWindowsPath('foo') == PurePosixPath('foo')\n" +"False\n" +">>> PureWindowsPath('foo') < PurePosixPath('foo')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: '<' not supported between instances of 'PureWindowsPath' and " +"'PurePosixPath'" #: ../Doc/library/pathlib.rst:231 msgid "Operators" @@ -420,10 +490,10 @@ msgid "" "the drive is not reset when the argument is a rooted relative path (e.g., " "``r'\\foo'``)::" msgstr "" -"El operador de barra inclinada ayuda a crear rutas hijas, como :func:`os." -"path.join`. Si el argumento es una ruta absoluta, se ignora la ruta " -"anterior. En Windows, la unidad no se restablece cuando el argumento es una " -"ruta relativa en la raíz (por ejemplo, ``r'\\foo'``)::" +"El operador de barra inclinada ayuda a crear rutas hijas, " +"como :func:`os.path.join`. Si el argumento es una ruta absoluta, se ignora " +"la ruta anterior. En Windows, la unidad no se restablece cuando el argumento " +"es una ruta relativa en la raíz (por ejemplo, ``r'\\foo'``)::" #: ../Doc/library/pathlib.rst:238 msgid "" @@ -440,11 +510,23 @@ msgid "" ">>> PureWindowsPath('c:/Windows', '/Program Files')\n" "PureWindowsPath('c:/Program Files')" msgstr "" +">>> p = PurePath('/etc')\n" +">>> p\n" +"PurePosixPath('/etc')\n" +">>> p / 'init.d' / 'apache2'\n" +"PurePosixPath('/etc/init.d/apache2')\n" +">>> q = PurePath('bin')\n" +">>> '/usr' / q\n" +"PurePosixPath('/usr/bin')\n" +">>> p / '/an_absolute_path'\n" +"PurePosixPath('/an_absolute_path')\n" +">>> PureWindowsPath('c:/Windows', '/Program Files')\n" +"PureWindowsPath('c:/Program Files')" #: ../Doc/library/pathlib.rst:251 msgid "" -"A path object can be used anywhere an object implementing :class:`os." -"PathLike` is accepted::" +"A path object can be used anywhere an object " +"implementing :class:`os.PathLike` is accepted::" msgstr "" "Se puede usar un objeto ruta en cualquier lugar donde se acepte un objeto " "que implemente :class:`os.PathLike`::" @@ -456,6 +538,10 @@ msgid "" ">>> os.fspath(p)\n" "'/etc'" msgstr "" +">>> import os\n" +">>> p = PurePath('/etc')\n" +">>> os.fspath(p)\n" +"'/etc'" #: ../Doc/library/pathlib.rst:259 msgid "" @@ -477,6 +563,12 @@ msgid "" ">>> str(p)\n" "'c:\\\\Program Files'" msgstr "" +">>> p = PurePath('/etc')\n" +">>> str(p)\n" +"'/etc'\n" +">>> p = PureWindowsPath('c:/Program Files')\n" +">>> str(p)\n" +"'c:\\\\Program Files'" #: ../Doc/library/pathlib.rst:270 msgid "" @@ -484,14 +576,16 @@ msgid "" "a bytes object, as encoded by :func:`os.fsencode`::" msgstr "" "Del mismo modo, llamar a :class:`bytes` en una ruta proporciona la ruta " -"cruda del sistema de archivos como un objeto bytes, codificado por :func:`os." -"fsencode`::" +"cruda del sistema de archivos como un objeto bytes, codificado " +"por :func:`os.fsencode`::" #: ../Doc/library/pathlib.rst:273 msgid "" ">>> bytes(p)\n" "b'/etc'" msgstr "" +">>> bytes(p)\n" +"b'/etc'" #: ../Doc/library/pathlib.rst:277 msgid "" @@ -527,6 +621,13 @@ msgid "" ">>> p.parts\n" "('c:\\\\', 'Program Files', 'PSF')" msgstr "" +">>> p = PurePath('/usr/bin/python3')\n" +">>> p.parts\n" +"('/', 'usr', 'bin', 'python3')\n" +"\n" +">>> p = PureWindowsPath('c:/Program Files/PSF')\n" +">>> p.parts\n" +"('c:\\\\', 'Program Files', 'PSF')" #: ../Doc/library/pathlib.rst:299 msgid "(note how the drive and local root are regrouped in a single part)" @@ -546,6 +647,8 @@ msgid "" "The implementation of the :mod:`os.path` module used for low-level path " "parsing and joining: either :mod:`posixpath` or :mod:`ntpath`." msgstr "" +"La implementación del módulo :mod:`os.path` utilizado para el análisis y " +"unión de rutas de bajo nivel: :mod:`posixpath` o :mod:`ntpath`." #: ../Doc/library/pathlib.rst:320 msgid "A string representing the drive letter or name, if any::" @@ -561,6 +664,12 @@ msgid "" ">>> PurePosixPath('/etc').drive\n" "''" msgstr "" +">>> PureWindowsPath('c:/Program Files/').drive\n" +"'c:'\n" +">>> PureWindowsPath('/Program Files/').drive\n" +"''\n" +">>> PurePosixPath('/etc').drive\n" +"''" #: ../Doc/library/pathlib.rst:329 msgid "UNC shares are also considered drives::" @@ -571,6 +680,8 @@ msgid "" ">>> PureWindowsPath('//host/share/foo.txt').drive\n" "'\\\\\\\\host\\\\share'" msgstr "" +">>> PureWindowsPath('//host/share/foo.txt').drive\n" +"'\\\\\\\\host\\\\share'" #: ../Doc/library/pathlib.rst:336 msgid "A string representing the (local or global) root, if any::" @@ -585,6 +696,12 @@ msgid "" ">>> PurePosixPath('/etc').root\n" "'/'" msgstr "" +">>> PureWindowsPath('c:/Program Files/').root\n" +"'\\\\'\n" +">>> PureWindowsPath('c:Program Files/').root\n" +"''\n" +">>> PurePosixPath('/etc').root\n" +"'/'" #: ../Doc/library/pathlib.rst:345 msgid "UNC shares always have a root::" @@ -595,14 +712,16 @@ msgid "" ">>> PureWindowsPath('//host/share').root\n" "'\\\\'" msgstr "" +">>> PureWindowsPath('//host/share').root\n" +"'\\\\'" #: ../Doc/library/pathlib.rst:350 msgid "" -"If the path starts with more than two successive slashes, :class:`~pathlib." -"PurePosixPath` collapses them::" +"If the path starts with more than two successive " +"slashes, :class:`~pathlib.PurePosixPath` collapses them::" msgstr "" -"Si la ruta comienza con más de dos barras diagonales sucesivas, :class:" -"`~pathlib.PurePosixPath` las contrae:" +"Si la ruta comienza con más de dos barras diagonales " +"sucesivas, :class:`~pathlib.PurePosixPath` las contrae:" #: ../Doc/library/pathlib.rst:353 msgid "" @@ -613,16 +732,22 @@ msgid "" ">>> PurePosixPath('////etc').root\n" "'/'" msgstr "" +">>> PurePosixPath('//etc').root\n" +"'//'\n" +">>> PurePosixPath('///etc').root\n" +"'/'\n" +">>> PurePosixPath('////etc').root\n" +"'/'" #: ../Doc/library/pathlib.rst:362 msgid "" "This behavior conforms to *The Open Group Base Specifications Issue 6*, " -"paragraph `4.11 Pathname Resolution `_:" +"paragraph `4.11 Pathname Resolution `_:" msgstr "" "Este comportamiento se ajusta a *The Open Group Base Specifications Issue " -"6*, párrafo `4.11 Pathname Resolution `_:" +"6*, párrafo `4.11 Pathname Resolution `_:" #: ../Doc/library/pathlib.rst:366 msgid "" @@ -649,6 +774,14 @@ msgid "" ">>> PureWindowsPath('//host/share').anchor\n" "'\\\\\\\\host\\\\share\\\\'" msgstr "" +">>> PureWindowsPath('c:/Program Files/').anchor\n" +"'c:\\\\'\n" +">>> PureWindowsPath('c:Program Files/').anchor\n" +"'c:'\n" +">>> PurePosixPath('/etc').anchor\n" +"'/'\n" +">>> PureWindowsPath('//host/share').anchor\n" +"'\\\\\\\\host\\\\share\\\\'" #: ../Doc/library/pathlib.rst:386 msgid "" @@ -667,6 +800,13 @@ msgid "" ">>> p.parents[2]\n" "PureWindowsPath('c:/')" msgstr "" +">>> p = PureWindowsPath('c:/foo/bar/setup.py')\n" +">>> p.parents[0]\n" +"PureWindowsPath('c:/foo/bar')\n" +">>> p.parents[1]\n" +"PureWindowsPath('c:/foo')\n" +">>> p.parents[2]\n" +"PureWindowsPath('c:/')" #: ../Doc/library/pathlib.rst:397 msgid "" @@ -686,6 +826,9 @@ msgid "" ">>> p.parent\n" "PurePosixPath('/a/b/c')" msgstr "" +">>> p = PurePosixPath('/a/b/c/d')\n" +">>> p.parent\n" +"PurePosixPath('/a/b/c')" #: ../Doc/library/pathlib.rst:408 msgid "You cannot go past an anchor, or empty path::" @@ -700,6 +843,12 @@ msgid "" ">>> p.parent\n" "PurePosixPath('.')" msgstr "" +">>> p = PurePosixPath('/')\n" +">>> p.parent\n" +"PurePosixPath('/')\n" +">>> p = PurePosixPath('.')\n" +">>> p.parent\n" +"PurePosixPath('.')" #: ../Doc/library/pathlib.rst:418 msgid "This is a purely lexical operation, hence the following behaviour::" @@ -712,6 +861,9 @@ msgid "" ">>> p.parent\n" "PurePosixPath('foo')" msgstr "" +">>> p = PurePosixPath('foo/..')\n" +">>> p.parent\n" +"PurePosixPath('foo')" #: ../Doc/library/pathlib.rst:424 msgid "" @@ -736,6 +888,8 @@ msgid "" ">>> PurePosixPath('my/library/setup.py').name\n" "'setup.py'" msgstr "" +">>> PurePosixPath('my/library/setup.py').name\n" +"'setup.py'" #: ../Doc/library/pathlib.rst:437 msgid "UNC drive names are not considered::" @@ -748,11 +902,14 @@ msgid "" ">>> PureWindowsPath('//some/share').name\n" "''" msgstr "" +">>> PureWindowsPath('//some/share/setup.py').name\n" +"'setup.py'\n" +">>> PureWindowsPath('//some/share').name\n" +"''" #: ../Doc/library/pathlib.rst:447 -#, fuzzy msgid "The last dot-separated portion of the final component, if any::" -msgstr "La extensión del archivo del componente final, si lo hay::" +msgstr "La última porción separada por puntos del componente final, si la hay:" #: ../Doc/library/pathlib.rst:449 msgid "" @@ -763,15 +920,22 @@ msgid "" ">>> PurePosixPath('my/library').suffix\n" "''" msgstr "" +">>> PurePosixPath('my/library/setup.py').suffix\n" +"'.py'\n" +">>> PurePosixPath('my/library.tar.gz').suffix\n" +"'.gz'\n" +">>> PurePosixPath('my/library').suffix\n" +"''" #: ../Doc/library/pathlib.rst:456 msgid "This is commonly called the file extension." -msgstr "" +msgstr "Esto comúnmente se llama extensión de archivo." #: ../Doc/library/pathlib.rst:460 -#, fuzzy msgid "A list of the path's suffixes, often called file extensions::" -msgstr "Una lista de las extensiones de archivo de la ruta::" +msgstr "" +"Una lista de los sufijos de la ruta, a menudo llamados extensiones de " +"archivo:" #: ../Doc/library/pathlib.rst:462 msgid "" @@ -782,6 +946,12 @@ msgid "" ">>> PurePosixPath('my/library').suffixes\n" "[]" msgstr "" +">>> PurePosixPath('my/library.tar.gar').suffixes\n" +"['.tar', '.gar']\n" +">>> PurePosixPath('my/library.tar.gz').suffixes\n" +"['.tar', '.gz']\n" +">>> PurePosixPath('my/library').suffixes\n" +"[]" #: ../Doc/library/pathlib.rst:472 msgid "The final path component, without its suffix::" @@ -796,6 +966,12 @@ msgid "" ">>> PurePosixPath('my/library').stem\n" "'library'" msgstr "" +">>> PurePosixPath('my/library.tar.gz').stem\n" +"'library.tar'\n" +">>> PurePosixPath('my/library.tar').stem\n" +"'library'\n" +">>> PurePosixPath('my/library').stem\n" +"'library'" #: ../Doc/library/pathlib.rst:484 msgid "" @@ -811,6 +987,11 @@ msgid "" ">>> p.as_posix()\n" "'c:/windows'" msgstr "" +">>> p = PureWindowsPath('c:\\\\windows')\n" +">>> str(p)\n" +"'c:\\\\windows'\n" +">>> p.as_posix()\n" +"'c:/windows'" #: ../Doc/library/pathlib.rst:495 msgid "" @@ -836,6 +1017,19 @@ msgid "" ">>> PureWindowsPath('//some/share').is_absolute()\n" "True" msgstr "" +">>> PurePosixPath('/a/b').is_absolute()\n" +"True\n" +">>> PurePosixPath('a/b').is_absolute()\n" +"False\n" +"\n" +">>> PureWindowsPath('c:/a/b').is_absolute()\n" +"True\n" +">>> PureWindowsPath('/a/b').is_absolute()\n" +"False\n" +">>> PureWindowsPath('c:').is_absolute()\n" +"False\n" +">>> PureWindowsPath('//some/share').is_absolute()\n" +"True" #: ../Doc/library/pathlib.rst:515 msgid "Return whether or not this path is relative to the *other* path." @@ -846,6 +1040,9 @@ msgid "" "This method is string-based; it neither accesses the filesystem nor treats " "\"``..``\" segments specially. The following code is equivalent:" msgstr "" +"Este método se basa en cadenas; no accede al sistema de archivos ni trata " +"los segmentos \"``..``\" de manera especial. El siguiente código es " +"equivalente:" #: ../Doc/library/pathlib.rst:534 msgid "" @@ -862,20 +1059,25 @@ msgid "" "``False`` is always returned." msgstr "" "Con :class:`PureWindowsPath`, retorna ``True`` si la ruta se considera " -"reservada en Windows, ``False`` en caso contrario. Con :class:" -"`PurePosixPath`, siempre retorna ``False``." +"reservada en Windows, ``False`` en caso contrario. " +"Con :class:`PurePosixPath`, siempre retorna ``False``." #: ../Doc/library/pathlib.rst:543 msgid "" "Windows path names that contain a colon, or end with a dot or a space, are " "considered reserved. UNC paths may be reserved." msgstr "" +"Los nombres de ruta de Windows que contienen dos puntos o terminan con un " +"punto o un espacio se consideran reservados. Las rutas UNC pueden estar " +"reservadas." #: ../Doc/library/pathlib.rst:547 msgid "" "This method is deprecated; use :func:`os.path.isreserved` to detect reserved " "paths on Windows." msgstr "" +"Este método está obsoleto; utilice :func:`os.path.isreserved` para detectar " +"rutas reservadas en Windows." #: ../Doc/library/pathlib.rst:553 msgid "" @@ -896,15 +1098,23 @@ msgid "" ">>> PureWindowsPath('c:').joinpath('/Program Files')\n" "PureWindowsPath('c:/Program Files')" msgstr "" +">>> PurePosixPath('/etc').joinpath('passwd')\n" +"PurePosixPath('/etc/passwd')\n" +">>> PurePosixPath('/etc').joinpath(PurePosixPath('passwd'))\n" +"PurePosixPath('/etc/passwd')\n" +">>> PurePosixPath('/etc').joinpath('init.d', 'apache2')\n" +"PurePosixPath('/etc/init.d/apache2')\n" +">>> PureWindowsPath('c:').joinpath('/Program Files')\n" +"PureWindowsPath('c:/Program Files')" #: ../Doc/library/pathlib.rst:568 -#, fuzzy msgid "" "Match this path against the provided glob-style pattern. Return ``True`` if " "matching is successful, ``False`` otherwise. For example::" msgstr "" -"Haga coincidir esta ruta con el *pattern* global proporcionado. Retorna " -"``True`` si la coincidencia es exitosa, ``False`` en caso contrario." +"Compare esta ruta con el patrón de estilo glob proporcionado. Devuelva " +"``True`` si la coincidencia es exitosa, ``False`` en caso contrario. Por " +"ejemplo:" #: ../Doc/library/pathlib.rst:571 msgid "" @@ -917,10 +1127,18 @@ msgid "" ">>> PurePath('/a/b/c.py').full_match('**/*.py')\n" "True" msgstr "" +">>> PurePath('a/b.py').full_match('a/*.py')\n" +"True\n" +">>> PurePath('a/b.py').full_match('*.py')\n" +"False\n" +">>> PurePath('/a/b/c.py').full_match('/a/**')\n" +"True\n" +">>> PurePath('/a/b/c.py').full_match('**/*.py')\n" +"True" #: ../Doc/library/pathlib.rst:581 ../Doc/library/pathlib.rst:1291 msgid ":ref:`pathlib-pattern-language` documentation." -msgstr "" +msgstr "Documentación :ref:`pathlib-pattern-language`." #: ../Doc/library/pathlib.rst:583 msgid "As with other methods, case-sensitivity follows platform defaults::" @@ -935,6 +1153,10 @@ msgid "" ">>> PureWindowsPath('b.py').full_match('*.PY')\n" "True" msgstr "" +">>> PurePosixPath('b.py').full_match('*.PY')\n" +"False\n" +">>> PureWindowsPath('b.py').full_match('*.PY')\n" +"True" #: ../Doc/library/pathlib.rst:590 msgid "" @@ -944,13 +1166,12 @@ msgstr "" "comportamiento." #: ../Doc/library/pathlib.rst:597 -#, fuzzy msgid "" "Match this path against the provided non-recursive glob-style pattern. " "Return ``True`` if matching is successful, ``False`` otherwise." msgstr "" -"Haga coincidir esta ruta con el *pattern* global proporcionado. Retorna " -"``True`` si la coincidencia es exitosa, ``False`` en caso contrario." +"Compare esta ruta con el patrón de estilo glob no recursivo proporcionado. " +"Devuelva ``True`` si la coincidencia es exitosa, ``False`` en caso contrario." #: ../Doc/library/pathlib.rst:600 msgid "" @@ -959,6 +1180,10 @@ msgid "" "\"``**``\" isn't supported (it acts like non-recursive \"``*``\"), and if a " "relative pattern is provided, then matching is done from the right::" msgstr "" +"Este método es similar a :meth:`~PurePath.full_match`, pero no se permiten " +"patrones vacíos (se genera :exc:`ValueError`), no se admite el comodín " +"recursivo \"``**``\" (actúa como \"``*``\" no recursivo) y, si se " +"proporciona un patrón relativo, la coincidencia se realiza desde la derecha:" #: ../Doc/library/pathlib.rst:605 msgid "" @@ -969,11 +1194,19 @@ msgid "" ">>> PurePath('/a/b/c.py').match('a/*.py')\n" "False" msgstr "" +">>> PurePath('a/b.py').full_match('a/*.py')\n" +"True\n" +">>> PurePath('a/b.py').full_match('*.py')\n" +"False\n" +">>> PurePath('/a/b/c.py').full_match('/a/**')\n" +"True\n" +">>> PurePath('/a/b/c.py').full_match('**/*.py')\n" +"True" #: ../Doc/library/pathlib.rst:612 ../Doc/library/pathlib.rst:1310 #: ../Doc/library/pathlib.rst:1335 msgid "The *pattern* parameter accepts a :term:`path-like object`." -msgstr "" +msgstr "El parámetro *pattern* acepta un :term:`path-like object`." #: ../Doc/library/pathlib.rst:615 ../Doc/library/pathlib.rst:1304 #: ../Doc/library/pathlib.rst:1329 @@ -1003,19 +1236,31 @@ msgid "" "ValueError: '/etc/passwd' is not in the subpath of '/usr' OR one path is " "relative and the other is absolute." msgstr "" +">>> p = PurePosixPath('/etc/passwd')\n" +">>> p.relative_to('/')\n" +"PurePosixPath('etc/passwd')\n" +">>> p.relative_to('/etc')\n" +"PurePosixPath('passwd')\n" +">>> p.relative_to('/usr')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"pathlib.py\", line 941, in relative_to\n" +" raise ValueError(error_message.format(str(self), str(formatted)))\n" +"ValueError: '/etc/passwd' is not in the subpath of '/usr' OR one path is " +"relative and the other is absolute." #: ../Doc/library/pathlib.rst:636 -#, fuzzy msgid "" "When *walk_up* is false (the default), the path must start with *other*. " "When the argument is true, ``..`` entries may be added to form the relative " -"path. In all other cases, such as the paths referencing different drives, :" -"exc:`ValueError` is raised.::" +"path. In all other cases, such as the paths referencing different " +"drives, :exc:`ValueError` is raised.::" msgstr "" -"Cuando *walk_up* es False (por defecto), la ruta debe empezar con *other*. " -"Cuando el argumento es True, se pueden agregar entradas ``..`` para formar " -"la ruta relativa. En todos los demás casos, como las rutas que hacen " -"referencia a diferentes unidades, se lanza :exc:`ValueError`.::" +"Cuando *walk_up* es falso (el valor predeterminado), la ruta debe comenzar " +"con *other*. Cuando el argumento es verdadero, se pueden agregar entradas " +"``..`` para formar la ruta relativa. En todos los demás casos, como las " +"rutas que hacen referencia a diferentes unidades, se " +"genera :exc:`ValueError`.::" #: ../Doc/library/pathlib.rst:641 msgid "" @@ -1029,6 +1274,15 @@ msgid "" "ValueError: '/etc/passwd' is not on the same drive as 'foo' OR one path is " "relative and the other is absolute." msgstr "" +">>> p.relative_to('/usr', walk_up=True)\n" +"PurePosixPath('../etc/passwd')\n" +">>> p.relative_to('foo', walk_up=True)\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"pathlib.py\", line 941, in relative_to\n" +" raise ValueError(error_message.format(str(self), str(formatted)))\n" +"ValueError: '/etc/passwd' is not on the same drive as 'foo' OR one path is " +"relative and the other is absolute." #: ../Doc/library/pathlib.rst:651 msgid "" @@ -1082,6 +1336,17 @@ msgid "" " raise ValueError(\"%r has an empty name\" % (self,))\n" "ValueError: PureWindowsPath('c:/') has an empty name" msgstr "" +">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n" +">>> p.with_name('setup.py')\n" +"PureWindowsPath('c:/Downloads/setup.py')\n" +">>> p = PureWindowsPath('c:/')\n" +">>> p.with_name('setup.py')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 751, in " +"with_name\n" +" raise ValueError(\"%r has an empty name\" % (self,))\n" +"ValueError: PureWindowsPath('c:/') has an empty name" #: ../Doc/library/pathlib.rst:684 msgid "" @@ -1112,6 +1377,23 @@ msgid "" " raise ValueError(\"%r has an empty name\" % (self,))\n" "ValueError: PureWindowsPath('c:/') has an empty name" msgstr "" +">>> p = PureWindowsPath('c:/Downloads/draft.txt')\n" +">>> p.with_stem('final')\n" +"PureWindowsPath('c:/Downloads/final.txt')\n" +">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n" +">>> p.with_stem('lib')\n" +"PureWindowsPath('c:/Downloads/lib.gz')\n" +">>> p = PureWindowsPath('c:/')\n" +">>> p.with_stem('')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 861, in " +"with_stem\n" +" return self.with_name(stem + self.suffix)\n" +" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 851, in " +"with_name\n" +" raise ValueError(\"%r has an empty name\" % (self,))\n" +"ValueError: PureWindowsPath('c:/') has an empty name" #: ../Doc/library/pathlib.rst:708 msgid "" @@ -1135,6 +1417,15 @@ msgid "" ">>> p.with_suffix('')\n" "PureWindowsPath('README')" msgstr "" +">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n" +">>> p.with_suffix('.bz2')\n" +"PureWindowsPath('c:/Downloads/pathlib.tar.bz2')\n" +">>> p = PureWindowsPath('README')\n" +">>> p.with_suffix('.txt')\n" +"PureWindowsPath('README.txt')\n" +">>> p = PureWindowsPath('README.txt')\n" +">>> p.with_suffix('')\n" +"PureWindowsPath('README')" #: ../Doc/library/pathlib.rst:725 msgid "" @@ -1144,9 +1435,9 @@ msgid "" "this method to pass information to derivative paths, for example::" msgstr "" "Crea un nuevo objeto de ruta del mismo tipo combinando los *pathsegments* " -"dados. Este método se llama siempre que se crea una ruta derivada, como :" -"attr:`parent` y :meth:`relative_to`. Las subclases pueden anular este método " -"para pasar información a las rutas derivadas, por ejemplo::" +"dados. Este método se llama siempre que se crea una ruta derivada, " +"como :attr:`parent` y :meth:`relative_to`. Las subclases pueden anular este " +"método para pasar información a las rutas derivadas, por ejemplo::" #: ../Doc/library/pathlib.rst:730 msgid "" @@ -1164,6 +1455,19 @@ msgid "" "hosts = etc / 'hosts'\n" "print(hosts.session_id) # 42" msgstr "" +"from pathlib import PurePosixPath\n" +"\n" +"class MyPath(PurePosixPath):\n" +" def __init__(self, *pathsegments, session_id):\n" +" super().__init__(*pathsegments)\n" +" self.session_id = session_id\n" +"\n" +" def with_segments(self, *pathsegments):\n" +" return type(self)(*pathsegments, session_id=self.session_id)\n" +"\n" +"etc = MyPath('/etc', session_id=42)\n" +"hosts = etc / 'hosts'\n" +"print(hosts.session_id) # 42" #: ../Doc/library/pathlib.rst:751 msgid "Concrete paths" @@ -1187,14 +1491,16 @@ msgid "" "or a :class:`WindowsPath`)::" msgstr "" "Una subclase de :class:`PurePath`, esta clase representa rutas concretas de " -"la *familia* ruta del sistema (al crear una instancia crea ya sea :class:" -"`PosixPath` o :class:`WindowsPath`)::" +"la *familia* ruta del sistema (al crear una instancia crea ya " +"sea :class:`PosixPath` o :class:`WindowsPath`)::" #: ../Doc/library/pathlib.rst:763 msgid "" ">>> Path('setup.py')\n" "PosixPath('setup.py')" msgstr "" +">>> Path('setup.py')\n" +"PosixPath('setup.py')" #: ../Doc/library/pathlib.rst:770 msgid "" @@ -1209,12 +1515,16 @@ msgid "" ">>> PosixPath('/etc/hosts')\n" "PosixPath('/etc/hosts')" msgstr "" +">>> PosixPath('/etc/hosts')\n" +"PosixPath('/etc/hosts')" #: ../Doc/library/pathlib.rst:778 msgid "" -"Raises :exc:`UnsupportedOperation` on Windows. In previous versions, :exc:" -"`NotImplementedError` was raised instead." +"Raises :exc:`UnsupportedOperation` on Windows. In previous " +"versions, :exc:`NotImplementedError` was raised instead." msgstr "" +"Genera el error :exc:`UnsupportedOperation` en Windows. En versiones " +"anteriores, se generaba el error :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:785 msgid "" @@ -1229,12 +1539,17 @@ msgid "" ">>> WindowsPath('c:/', 'Users', 'Ximénez')\n" "WindowsPath('c:/Users/Ximénez')" msgstr "" +">>> WindowsPath('c:/', 'Users', 'Ximénez')\n" +"WindowsPath('c:/Users/Ximénez')" #: ../Doc/library/pathlib.rst:793 msgid "" "Raises :exc:`UnsupportedOperation` on non-Windows platforms. In previous " "versions, :exc:`NotImplementedError` was raised instead." msgstr "" +"Genera el error :exc:`UnsupportedOperation` en plataformas que no sean " +"Windows. En versiones anteriores, se generaba el " +"error :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:798 msgid "" @@ -1262,47 +1577,67 @@ msgid "" " % (cls.__name__,))\n" "UnsupportedOperation: cannot instantiate 'WindowsPath' on your system" msgstr "" +">>> import os\n" +">>> os.name\n" +"'posix'\n" +">>> Path('setup.py')\n" +"PosixPath('setup.py')\n" +">>> PosixPath('setup.py')\n" +"PosixPath('setup.py')\n" +">>> WindowsPath('setup.py')\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +" File \"pathlib.py\", line 798, in __new__\n" +" % (cls.__name__,))\n" +"UnsupportedOperation: cannot instantiate 'WindowsPath' on your system" #: ../Doc/library/pathlib.rst:816 -#, fuzzy msgid "" "Some concrete path methods can raise an :exc:`OSError` if a system call " "fails (for example because the path doesn't exist)." msgstr "" -"Las rutas concretas proporcionan los siguientes métodos -además de los " -"métodos de ruta puros-. Muchos de estos métodos pueden generar un :exc:" -"`OSError` si falla una llamada al sistema (por ejemplo, porque la ruta no " -"existe)." +"Algunos métodos de ruta concretos pueden generar un :exc:`OSError` si falla " +"una llamada del sistema (por ejemplo, porque la ruta no existe)." #: ../Doc/library/pathlib.rst:821 msgid "Parsing and generating URIs" -msgstr "" +msgstr "Análisis y generación de URI" #: ../Doc/library/pathlib.rst:823 msgid "" "Concrete path objects can be created from, and represented as, 'file' URIs " "conforming to :rfc:`8089`." msgstr "" +"Los objetos de ruta concretos se pueden crear y representar como URI de " +"\"archivo\" que cumplan con :rfc:`8089`." #: ../Doc/library/pathlib.rst:828 msgid "" "File URIs are not portable across machines with different :ref:`filesystem " "encodings `." msgstr "" +"Los URI de archivos no son portables entre máquinas con " +"diferentes :ref:`filesystem encodings `." #: ../Doc/library/pathlib.rst:833 msgid "Return a new path object from parsing a 'file' URI. For example::" msgstr "" +"Devuelve un nuevo objeto de ruta a partir del análisis de una URL de " +"\"archivo\". Por ejemplo:" #: ../Doc/library/pathlib.rst:835 msgid "" ">>> p = Path.from_uri('file:///etc/hosts')\n" "PosixPath('/etc/hosts')" msgstr "" +">>> p = Path.from_uri('file:///etc/hosts')\n" +"PosixPath('/etc/hosts')" #: ../Doc/library/pathlib.rst:838 msgid "On Windows, DOS device and UNC paths may be parsed from URIs::" msgstr "" +"En Windows, los dispositivos DOS y las rutas UNC se pueden analizar desde " +"las URI:" #: ../Doc/library/pathlib.rst:840 msgid "" @@ -1311,10 +1646,14 @@ msgid "" ">>> p = Path.from_uri('file://server/share')\n" "WindowsPath('//server/share')" msgstr "" +">>> p = Path.from_uri('file:///c:/windows')\n" +"WindowsPath('c:/windows')\n" +">>> p = Path.from_uri('file://server/share')\n" +"WindowsPath('//server/share')" #: ../Doc/library/pathlib.rst:845 msgid "Several variant forms are supported::" -msgstr "" +msgstr "Se admiten varias formas variantes:" #: ../Doc/library/pathlib.rst:847 msgid "" @@ -1327,21 +1666,30 @@ msgid "" ">>> p = Path.from_uri('file:/c|/windows')\n" "WindowsPath('c:/windows')" msgstr "" +">>> p = Path.from_uri('file:////server/share')\n" +"WindowsPath('//server/share')\n" +">>> p = Path.from_uri('file://///server/share')\n" +"WindowsPath('//server/share')\n" +">>> p = Path.from_uri('file:c:/windows')\n" +"WindowsPath('c:/windows')\n" +">>> p = Path.from_uri('file:/c|/windows')\n" +"WindowsPath('c:/windows')" #: ../Doc/library/pathlib.rst:856 msgid "" ":exc:`ValueError` is raised if the URI does not start with ``file:``, or the " "parsed path isn't absolute." msgstr "" +"Se genera :exc:`ValueError` si la URI no comienza con ``file:`` o la ruta " +"analizada no es absoluta." #: ../Doc/library/pathlib.rst:864 -#, fuzzy msgid "" "Represent the path as a 'file' URI. :exc:`ValueError` is raised if the path " "isn't absolute." msgstr "" -"Representa la ruta como un ``file`` URI. :exc:`ValueError` se genera si la " -"ruta no es absoluta." +"Representa la ruta como una URL de \"archivo\". Se genera :exc:`ValueError` " +"si la ruta no es absoluta." #: ../Doc/library/pathlib.rst:867 msgid "" @@ -1352,16 +1700,25 @@ msgid "" ">>> p.as_uri()\n" "'file:///c:/Windows'" msgstr "" +">>> p = PosixPath('/etc/passwd')\n" +">>> p.as_uri()\n" +"'file:///etc/passwd'\n" +">>> p = WindowsPath('c:/Windows')\n" +">>> p.as_uri()\n" +"'file:///c:/Windows'" #: ../Doc/library/pathlib.rst:876 msgid "" "For historical reasons, this method is also available from :class:`PurePath` " "objects. However, its use of :func:`os.fsencode` makes it strictly impure." msgstr "" +"Por razones históricas, este método también está disponible para " +"objetos :class:`PurePath`. Sin embargo, su uso en :func:`os.fsencode` lo " +"hace estrictamente impuro." #: ../Doc/library/pathlib.rst:882 msgid "Expanding and resolving paths" -msgstr "" +msgstr "Ampliando y resolviendo caminos" #: ../Doc/library/pathlib.rst:886 msgid "" @@ -1371,20 +1728,22 @@ msgid "" msgstr "" "Retorna un nuevo objeto ruta que representa el directorio de inicio del " "usuario (como lo retorna :func:`os.path.expanduser` con el agregado ``~``). " -"Si el directorio de inicio no se puede resolver, se lanza :exc:" -"`RuntimeError`." +"Si el directorio de inicio no se puede resolver, se " +"lanza :exc:`RuntimeError`." #: ../Doc/library/pathlib.rst:892 msgid "" ">>> Path.home()\n" "PosixPath('/home/antoine')" msgstr "" +">>> Path.home()\n" +"PosixPath('/home/antoine')" #: ../Doc/library/pathlib.rst:900 msgid "" "Return a new path with expanded ``~`` and ``~user`` constructs, as returned " -"by :meth:`os.path.expanduser`. If a home directory can't be resolved, :exc:" -"`RuntimeError` is raised." +"by :meth:`os.path.expanduser`. If a home directory can't be " +"resolved, :exc:`RuntimeError` is raised." msgstr "" "Retorna una nueva ruta con las construcciones ``~`` y ``~user`` expandidas, " "como lo retorna :meth:`os.path.expanduser`. Si el directorio de inicio no se " @@ -1396,11 +1755,14 @@ msgid "" ">>> p.expanduser()\n" "PosixPath('/home/eric/films/Monty Python')" msgstr "" +">>> p = PosixPath('~/films/Monty Python')\n" +">>> p.expanduser()\n" +"PosixPath('/home/eric/films/Monty Python')" #: ../Doc/library/pathlib.rst:915 msgid "" -"Return a new path object representing the current directory (as returned by :" -"func:`os.getcwd`)::" +"Return a new path object representing the current directory (as returned " +"by :func:`os.getcwd`)::" msgstr "" "Retorna un nuevo objeto ruta que representa el directorio actual (como lo " "retorna :func:`os.getcwd`)::" @@ -1410,6 +1772,8 @@ msgid "" ">>> Path.cwd()\n" "PosixPath('/home/antoine/pathlib')" msgstr "" +">>> Path.cwd()\n" +"PosixPath('/home/antoine/pathlib')" #: ../Doc/library/pathlib.rst:924 msgid "" @@ -1427,6 +1791,11 @@ msgid "" ">>> p.absolute()\n" "PosixPath('/home/antoine/pathlib/tests')" msgstr "" +">>> p = Path('tests')\n" +">>> p\n" +"PosixPath('tests')\n" +">>> p.absolute()\n" +"PosixPath('/home/antoine/pathlib/tests')" #: ../Doc/library/pathlib.rst:936 msgid "" @@ -1444,6 +1813,11 @@ msgid "" ">>> p.resolve()\n" "PosixPath('/home/antoine/pathlib')" msgstr "" +">>> p = Path()\n" +">>> p\n" +"PosixPath('.')\n" +">>> p.resolve()\n" +"PosixPath('/home/antoine/pathlib')" #: ../Doc/library/pathlib.rst:945 msgid "" @@ -1459,20 +1833,21 @@ msgid "" ">>> p.resolve()\n" "PosixPath('/home/antoine/pathlib/setup.py')" msgstr "" +">>> p = Path('docs/../setup.py')\n" +">>> p.resolve()\n" +"PosixPath('/home/antoine/pathlib/setup.py')" #: ../Doc/library/pathlib.rst:951 -#, fuzzy msgid "" "If a path doesn't exist or a symlink loop is encountered, and *strict* is " "``True``, :exc:`OSError` is raised. If *strict* is ``False``, the path is " "resolved as far as possible and any remainder is appended without checking " "whether it exists." msgstr "" -"Si la ruta no existe y *strict* es ``True``, se genera :exc:" -"`FileNotFoundError`. Si *strict* es ``False``, la ruta se resuelve en la " -"medida de lo posible y se agrega el resto sin verificar si existe. Si se " -"encuentra un bucle infinito en la resolución de la ruta se genera :exc:" -"`RuntimeError`." +"Si no existe una ruta o se encuentra un bucle de enlace simbólico y *strict* " +"es ``True``, se genera :exc:`OSError`. Si *strict* es ``False``, la ruta se " +"resuelve en la medida de lo posible y cualquier resto se agrega sin " +"verificar si existe." #: ../Doc/library/pathlib.rst:956 msgid "The *strict* parameter was added (pre-3.6 behavior is strict)." @@ -1485,14 +1860,18 @@ msgid "" "strict mode, and no exception is raised in non-strict mode. In previous " "versions, :exc:`RuntimeError` is raised no matter the value of *strict*." msgstr "" +"Los bucles de enlaces simbólicos se tratan como otros " +"errores: :exc:`OSError` se genera en modo estricto y no se genera ninguna " +"excepción en modo no estricto. En versiones anteriores, :exc:`RuntimeError` " +"se genera sin importar el valor de *strict*." #: ../Doc/library/pathlib.rst:967 msgid "" -"Return the path to which the symbolic link points (as returned by :func:`os." -"readlink`)::" +"Return the path to which the symbolic link points (as returned " +"by :func:`os.readlink`)::" msgstr "" -"Retorna la ruta a la que apunta el vínculo simbólico (como lo retorna :func:" -"`os.readlink`)::" +"Retorna la ruta a la que apunta el vínculo simbólico (como lo " +"retorna :func:`os.readlink`)::" #: ../Doc/library/pathlib.rst:970 msgid "" @@ -1501,43 +1880,42 @@ msgid "" ">>> p.readlink()\n" "PosixPath('setup.py')" msgstr "" +">>> p = Path('mylink')\n" +">>> p.symlink_to('setup.py')\n" +">>> p.readlink()\n" +"PosixPath('setup.py')" #: ../Doc/library/pathlib.rst:977 msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.readlink` is not available. " "In previous versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si :func:`os.readlink` no está " +"disponible. En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:983 msgid "Querying file type and status" -msgstr "" +msgstr "Consulta de tipo de archivo y estado" #: ../Doc/library/pathlib.rst:987 -#, fuzzy msgid "" -":meth:`~Path.exists`, :meth:`~Path.is_dir`, :meth:`~Path.is_file`, :meth:" -"`~Path.is_mount`, :meth:`~Path.is_symlink`, :meth:`~Path.is_block_device`, :" -"meth:`~Path.is_char_device`, :meth:`~Path.is_fifo`, :meth:`~Path.is_socket` " +":meth:`~Path.exists`, :meth:`~Path.is_dir`, :meth:`~Path.is_file`, :meth:`~Path.is_mount`, :meth:`~Path.is_symlink`, :meth:`~Path.is_block_device`, :meth:`~Path.is_char_device`, :meth:`~Path.is_fifo`, :meth:`~Path.is_socket` " "now return ``False`` instead of raising an exception for paths that contain " "characters unrepresentable at the OS level." msgstr "" -":meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`, :" -"meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`, :meth:`~Path." -"is_block_device()`, :meth:`~Path.is_char_device()`, :meth:`~Path." -"is_fifo()`, :meth:`~Path.is_socket()` ahora retorna ``False`` en lugar de " -"generar una excepción para las rutas que contienen caracteres que no se " -"pueden representar a nivel del sistema operativo." +":meth:`~Path.exists`, :meth:`~Path.is_dir`, :meth:`~Path.is_file`, :meth:`~Path.is_mount`, :meth:`~Path.is_symlink`, :meth:`~Path.is_block_device`, :meth:`~Path.is_char_device`, :meth:`~Path.is_fifo`, :meth:`~Path.is_socket` " +"ahora devuelven ``False`` en lugar de generar una excepción para las rutas " +"que contienen caracteres no representables en el nivel del sistema operativo." #: ../Doc/library/pathlib.rst:997 -#, fuzzy msgid "" "Return an :class:`os.stat_result` object containing information about this " "path, like :func:`os.stat`. The result is looked up at each call to this " "method." msgstr "" -"Retorna un objeto :class:`os.stat_result` que contiene información sobre " -"esta ruta, del mismo modo que :func:`os.stat`. El resultado se consulta en " -"cada llamada a este método." +"Devuelve un objeto :class:`os.stat_result` que contiene información sobre " +"esta ruta, como :func:`os.stat`. El resultado se consulta en cada llamada a " +"este método." #: ../Doc/library/pathlib.rst:1000 msgid "" @@ -1556,6 +1934,11 @@ msgid "" ">>> p.stat().st_mtime\n" "1327883547.852554" msgstr "" +">>> p = Path('setup.py')\n" +">>> p.stat().st_size\n" +"956\n" +">>> p.stat().st_mtime\n" +"1327883547.852554" #: ../Doc/library/pathlib.rst:1011 ../Doc/library/pathlib.rst:1039 #: ../Doc/library/pathlib.rst:1054 ../Doc/library/pathlib.rst:1069 @@ -1597,16 +1980,22 @@ msgid "" ">>> Path('nonexistentfile').exists()\n" "False" msgstr "" +">>> Path('.').exists()\n" +"True\n" +">>> Path('setup.py').exists()\n" +"True\n" +">>> Path('/etc').exists()\n" +"True\n" +">>> Path('nonexistentfile').exists()\n" +"False" #: ../Doc/library/pathlib.rst:1045 -#, fuzzy msgid "" "Return ``True`` if the path points to a regular file, ``False`` if it points " "to another kind of file." msgstr "" -"Retorna ``True`` si la ruta apunta a un archivo normal (o un enlace " -"simbólico que apunta a un archivo normal), ``Falso`` si apunta a otro tipo " -"de archivo." +"Devuelve ``True`` si la ruta apunta a un archivo normal, ``False`` si apunta " +"a otro tipo de archivo." #: ../Doc/library/pathlib.rst:1048 ../Doc/library/pathlib.rst:1063 #: ../Doc/library/pathlib.rst:1111 ../Doc/library/pathlib.rst:1120 @@ -1619,31 +2008,29 @@ msgstr "" "roto; se propagan otros errores (como errores de permiso)." #: ../Doc/library/pathlib.rst:1051 -#, fuzzy msgid "" "This method normally follows symlinks; to exclude symlinks, add the argument " "``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue los enlaces simbólicos; para excluirlos, " +"agregue el argumento ``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1060 -#, fuzzy msgid "" "Return ``True`` if the path points to a directory, ``False`` if it points to " "another kind of file." msgstr "" -"Retorna ``True`` si la ruta apunta a un directorio (o un enlace simbólico " -"que apunta a un directorio), ``False`` si apunta a otro tipo de archivo." +"Devuelve ``True`` si la ruta apunta a un directorio, ``False`` si apunta a " +"otro tipo de archivo." #: ../Doc/library/pathlib.rst:1066 -#, fuzzy msgid "" "This method normally follows symlinks; to exclude symlinks to directories, " "add the argument ``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue los enlaces simbólicos; para excluir los " +"enlaces simbólicos a directorios, agregue el argumento " +"``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1075 msgid "" @@ -1730,12 +2117,12 @@ msgstr "" #: ../Doc/library/pathlib.rst:1144 msgid "" "Return whether this path points to the same file as *other_path*, which can " -"be either a Path object, or a string. The semantics are similar to :func:" -"`os.path.samefile` and :func:`os.path.samestat`." +"be either a Path object, or a string. The semantics are similar " +"to :func:`os.path.samefile` and :func:`os.path.samestat`." msgstr "" "Retorna si la ruta apunta al mismo archivo que *other_path*, que puede ser " -"un objeto *Path* o una cadena. La semántica es similar a :func:`os.path." -"samefile` y :func:`os.path.samestat`." +"un objeto *Path* o una cadena. La semántica es similar " +"a :func:`os.path.samefile` y :func:`os.path.samestat`." #: ../Doc/library/pathlib.rst:1148 msgid "" @@ -1754,18 +2141,24 @@ msgid "" ">>> p.samefile('spam')\n" "True" msgstr "" +">>> p = Path('spam')\n" +">>> q = Path('eggs')\n" +">>> p.samefile(q)\n" +"False\n" +">>> p.samefile('spam')\n" +"True" #: ../Doc/library/pathlib.rst:1164 msgid "Reading and writing files" -msgstr "" +msgstr "Lectura y escritura de archivos" #: ../Doc/library/pathlib.rst:1169 msgid "" "Open the file pointed to by the path, like the built-in :func:`open` " "function does::" msgstr "" -"Abre el archivo señalado por la ruta, como lo hace la función incorporada :" -"func:`open`::" +"Abre el archivo señalado por la ruta, como lo hace la función " +"incorporada :func:`open`::" #: ../Doc/library/pathlib.rst:1172 msgid "" @@ -1775,6 +2168,11 @@ msgid "" "...\n" "'#!/usr/bin/env python3\\n'" msgstr "" +">>> p = Path('setup.py')\n" +">>> with p.open() as f:\n" +"... f.readline()\n" +"...\n" +"'#!/usr/bin/env python3\\n'" #: ../Doc/library/pathlib.rst:1181 msgid "Return the decoded contents of the pointed-to file as a string::" @@ -1789,6 +2187,11 @@ msgid "" ">>> p.read_text()\n" "'Text file contents'" msgstr "" +">>> p = Path('my_text_file')\n" +">>> p.write_text('Text file contents')\n" +"18\n" +">>> p.read_text()\n" +"'Text file contents'" #: ../Doc/library/pathlib.rst:1189 msgid "" @@ -1815,6 +2218,11 @@ msgid "" ">>> p.read_bytes()\n" "b'Binary file contents'" msgstr "" +">>> p = Path('my_binary_file')\n" +">>> p.write_bytes(b'Binary file contents')\n" +"20\n" +">>> p.read_bytes()\n" +"b'Binary file contents'" #: ../Doc/library/pathlib.rst:1213 msgid "" @@ -1843,9 +2251,8 @@ msgid "An existing file of the same name is overwritten." msgstr "Se sobrescribe un archivo existente con el mismo nombre." #: ../Doc/library/pathlib.rst:1248 -#, fuzzy msgid "Reading directories" -msgstr "Listado de subdirectorios::" +msgstr "Directorios de lectura" #: ../Doc/library/pathlib.rst:1252 msgid "" @@ -1868,25 +2275,36 @@ msgid "" "PosixPath('docs/_static')\n" "PosixPath('docs/Makefile')" msgstr "" +">>> p = Path('docs')\n" +">>> for child in p.iterdir(): child\n" +"...\n" +"PosixPath('docs/conf.py')\n" +"PosixPath('docs/_templates')\n" +"PosixPath('docs/make.bat')\n" +"PosixPath('docs/index.rst')\n" +"PosixPath('docs/_build')\n" +"PosixPath('docs/_static')\n" +"PosixPath('docs/Makefile')" #: ../Doc/library/pathlib.rst:1266 -#, fuzzy msgid "" "The children are yielded in arbitrary order, and the special entries ``'.'`` " "and ``'..'`` are not included. If a file is removed from or added to the " "directory after creating the iterator, it is unspecified whether a path " "object for that file is included." msgstr "" -"Los hijos se generan en orden arbitrario y las entradas especiales ``'.'`` y " -"``'..'`` no están incluidas. Si un archivo se elimina o se agrega al " -"directorio después de crear el iterador, no se especifica si se incluirá un " -"objeto de ruta para ese archivo." +"Los elementos secundarios se obtienen en un orden arbitrario y no se " +"incluyen las entradas especiales ``'.'`` y ``'..'``. Si se elimina o se " +"agrega un archivo al directorio después de crear el iterador, no se " +"especifica si se incluye un objeto de ruta para ese archivo." #: ../Doc/library/pathlib.rst:1271 msgid "" "If the path is not a directory or otherwise inaccessible, :exc:`OSError` is " "raised." msgstr "" +"Si la ruta no es un directorio o es inaccesible por algún motivo, se " +"genera :exc:`OSError`." #: ../Doc/library/pathlib.rst:1276 msgid "" @@ -1899,8 +2317,8 @@ msgstr "" #: ../Doc/library/pathlib.rst:1279 msgid "" ">>> sorted(Path('.').glob('*.py'))\n" -"[PosixPath('pathlib.py'), PosixPath('setup.py'), PosixPath('test_pathlib." -"py')]\n" +"[PosixPath('pathlib.py'), PosixPath('setup.py'), " +"PosixPath('test_pathlib.py')]\n" ">>> sorted(Path('.').glob('*/*.py'))\n" "[PosixPath('docs/conf.py')]\n" ">>> sorted(Path('.').glob('**/*.py'))\n" @@ -1910,6 +2328,17 @@ msgid "" " PosixPath('setup.py'),\n" " PosixPath('test_pathlib.py')]" msgstr "" +">>> sorted(Path('.').glob('*.py'))\n" +"[PosixPath('pathlib.py'), PosixPath('setup.py'), " +"PosixPath('test_pathlib.py')]\n" +">>> sorted(Path('.').glob('*/*.py'))\n" +"[PosixPath('docs/conf.py')]\n" +">>> sorted(Path('.').glob('**/*.py'))\n" +"[PosixPath('build/lib/pathlib.py'),\n" +" PosixPath('docs/conf.py'),\n" +" PosixPath('pathlib.py'),\n" +" PosixPath('setup.py'),\n" +" PosixPath('test_pathlib.py')]" #: ../Doc/library/pathlib.rst:1293 msgid "" @@ -1931,6 +2360,10 @@ msgid "" "``False``, this method follows symlinks except when expanding \"``**``\" " "wildcards. Set *recurse_symlinks* to ``True`` to always follow symlinks." msgstr "" +"De forma predeterminada, o cuando el argumento de palabra clave " +"*recurse_symlinks* se establece en ``False``, este método sigue los enlaces " +"simbólicos excepto cuando se expanden los comodines \"``**``\". Establezca " +"*recurse_symlinks* en ``True`` para seguir siempre los enlaces simbólicos." #: ../Doc/library/pathlib.rst:1302 msgid "" @@ -1941,9 +2374,8 @@ msgstr "" "argumentos ``self``, ``pattern``." #: ../Doc/library/pathlib.rst:1307 ../Doc/library/pathlib.rst:1332 -#, fuzzy msgid "The *recurse_symlinks* parameter was added." -msgstr "Se agregó el parámetro *follow_symlinks*." +msgstr "Se agregó el parámetro *recurse_symlinks*." #: ../Doc/library/pathlib.rst:1313 msgid "" @@ -1951,20 +2383,21 @@ msgid "" "suppressed. In previous versions, such exceptions are suppressed in many " "cases, but not all." msgstr "" +"Se suprimen todas las excepciones :exc:`OSError` generadas al escanear el " +"sistema de archivos. En versiones anteriores, dichas excepciones se " +"suprimían en muchos casos, pero no en todos." #: ../Doc/library/pathlib.rst:1321 -#, fuzzy msgid "" -"Glob the given relative *pattern* recursively. This is like calling :func:" -"`Path.glob` with \"``**/``\" added in front of the *pattern*." +"Glob the given relative *pattern* recursively. This is like " +"calling :func:`Path.glob` with \"``**/``\" added in front of the *pattern*." msgstr "" -"Agrupa el *pattern* relativo dado de forma recursiva. Esto es como llamar a :" -"func:`Path.glob` con \"``**/``\" agregado antes del *pattern*, donde los " -"*patterns* son los mismos que para :mod:`fnmatch`::" +"Incorpore de forma recursiva el *pattern* relativo dado. Es como llamar " +"a :func:`Path.glob` con \"``**/``\" agregado delante de *pattern*." #: ../Doc/library/pathlib.rst:1325 msgid ":ref:`pathlib-pattern-language` and :meth:`Path.glob` documentation." -msgstr "" +msgstr "Documentación :ref:`pathlib-pattern-language` y :meth:`Path.glob`." #: ../Doc/library/pathlib.rst:1327 msgid "" @@ -2029,28 +2462,29 @@ msgstr "" "las tripletas del directorio y sus subdirectorios." #: ../Doc/library/pathlib.rst:1364 -#, fuzzy msgid "" "When *top_down* is true, the caller can modify the *dirnames* list in-place " -"(for example, using :keyword:`del` or slice assignment), and :meth:`Path." -"walk` will only recurse into the subdirectories whose names remain in " -"*dirnames*. This can be used to prune the search, or to impose a specific " -"order of visiting, or even to inform :meth:`Path.walk` about directories the " -"caller creates or renames before it resumes :meth:`Path.walk` again. " -"Modifying *dirnames* when *top_down* is false has no effect on the behavior " -"of :meth:`Path.walk` since the directories in *dirnames* have already been " -"generated by the time *dirnames* is yielded to the caller." +"(for example, using :keyword:`del` or slice assignment), " +"and :meth:`Path.walk` will only recurse into the subdirectories whose names " +"remain in *dirnames*. This can be used to prune the search, or to impose a " +"specific order of visiting, or even to inform :meth:`Path.walk` about " +"directories the caller creates or renames before it " +"resumes :meth:`Path.walk` again. Modifying *dirnames* when *top_down* is " +"false has no effect on the behavior of :meth:`Path.walk` since the " +"directories in *dirnames* have already been generated by the time *dirnames* " +"is yielded to the caller." msgstr "" "Cuando *top_down* es verdadero, el llamador puede modificar la lista " -"*dirnames* en el lugar (por ejemplo, al usar :keyword:`del` o la asignación " -"de segmentos), y :meth:`Path.walk` solo recurrirá a los subdirectorios cuyos " -"nombres permanezcan en *dirnames*. Esto se puede usar para reducir la " -"búsqueda, o para imponer un orden específico de visita, o incluso para " -"informar a :meth:`Path.walk` sobre los directorios que el llamador crea o " -"renombra antes de que reanude :meth:`Path.walk` nuevamente. Modificar " -"*dirnames* cuando *top_down* es falso no tiene efecto en el comportamiento " -"de :meth:`Path.walk()` ya que los directorios en *dirnames* ya se han " -"generado en el momento en que *dirnames* se entrega al llamador." +"*dirnames* en el lugar (por ejemplo, utilizando :keyword:`del` o la " +"asignación de sectores), y :meth:`Path.walk` solo recurrirá a los " +"subdirectorios cuyos nombres permanezcan en *dirnames*. Esto se puede " +"utilizar para podar la búsqueda, o para imponer un orden específico de " +"visita, o incluso para informar a :meth:`Path.walk` sobre los directorios " +"que el llamador crea o renombra antes de reanudar :meth:`Path.walk` " +"nuevamente. Modificar *dirnames* cuando *top_down* es falso no tiene ningún " +"efecto sobre el comportamiento de :meth:`Path.walk` ya que los directorios " +"en *dirnames* ya se han generado en el momento en que *dirnames* se cede al " +"llamador." #: ../Doc/library/pathlib.rst:1374 msgid "" @@ -2085,8 +2519,9 @@ msgstr "" #: ../Doc/library/pathlib.rst:1387 msgid "" "Be aware that setting *follow_symlinks* to true can lead to infinite " -"recursion if a link points to a parent directory of itself. :meth:`Path." -"walk` does not keep track of the directories it has already visited." +"recursion if a link points to a parent directory of " +"itself. :meth:`Path.walk` does not keep track of the directories it has " +"already visited." msgstr "" "Tener en cuenta que establecer *follow_symlinks* como verdadero puede " "generar una recursión infinita si un enlace apunta a un directorio principal " @@ -2103,9 +2538,9 @@ msgid "" msgstr "" ":meth:`Path.walk` asume que los directorios que recorre no se modifican " "durante la ejecución. Por ejemplo, si un directorio de *dirnames* ha sido " -"reemplazado por un enlace simbólico y *follow_symlinks* es falso, :meth:" -"`Path.walk` intentará descender a él. Para evitar este comportamiento, " -"elimine los directorios de *dirnames* según corresponda." +"reemplazado por un enlace simbólico y *follow_symlinks* es " +"falso, :meth:`Path.walk` intentará descender a él. Para evitar este " +"comportamiento, elimine los directorios de *dirnames* según corresponda." #: ../Doc/library/pathlib.rst:1400 msgid "" @@ -2126,8 +2561,8 @@ msgstr "" #: ../Doc/library/pathlib.rst:1406 msgid "" "from pathlib import Path\n" -"for root, dirs, files in Path(\"cpython/Lib/concurrent\")." -"walk(on_error=print):\n" +"for root, dirs, files in Path(\"cpython/Lib/" +"concurrent\").walk(on_error=print):\n" " print(\n" " root,\n" " \"consumes\",\n" @@ -2139,6 +2574,19 @@ msgid "" " if '__pycache__' in dirs:\n" " dirs.remove('__pycache__')" msgstr "" +"from pathlib import Path\n" +"for root, dirs, files in Path(\"cpython/Lib/" +"concurrent\").walk(on_error=print):\n" +" print(\n" +" root,\n" +" \"consumes\",\n" +" sum((root / file).stat().st_size for file in files),\n" +" \"bytes in\",\n" +" len(files),\n" +" \"non-directory files\"\n" +" )\n" +" if '__pycache__' in dirs:\n" +" dirs.remove('__pycache__')" #: ../Doc/library/pathlib.rst:1419 msgid "" @@ -2161,44 +2609,52 @@ msgid "" " for name in dirs:\n" " (root / name).rmdir()" msgstr "" +"# Delete everything reachable from the directory \"top\".\n" +"# CAUTION: This is dangerous! For example, if top == Path('/'),\n" +"# it could delete all of your files.\n" +"for root, dirs, files in top.walk(top_down=False):\n" +" for name in files:\n" +" (root / name).unlink()\n" +" for name in dirs:\n" +" (root / name).rmdir()" #: ../Doc/library/pathlib.rst:1436 -#, fuzzy msgid "Creating files and directories" -msgstr "Listado de subdirectorios::" +msgstr "Creando archivos y directorios" #: ../Doc/library/pathlib.rst:1440 -#, fuzzy msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process's ``umask`` value to determine the file mode and access flags. " "If the file already exists, the function succeeds when *exist_ok* is true " -"(and its modification time is updated to the current time), otherwise :exc:" -"`FileExistsError` is raised." +"(and its modification time is updated to the current time), " +"otherwise :exc:`FileExistsError` is raised." msgstr "" -"Crea un archivo en la ruta dada. Si se proporciona *mode*, se combina con el " -"valor del proceso ``umask`` para determinar el modo de archivo y los " -"indicadores de acceso. Si el archivo ya existe, la función tiene éxito si " -"*exist_ok* es verdadero (y su hora de modificación se actualiza a la hora " -"actual), de lo contrario se genera :exc:`FileExistsError`." +"Crea un archivo en esta ruta dada. Si se proporciona *mode*, se combina con " +"el valor ``umask`` del proceso para determinar el modo de archivo y los " +"indicadores de acceso. Si el archivo ya existe, la función se ejecuta " +"correctamente cuando *exist_ok* es verdadero (y su hora de modificación se " +"actualiza a la hora actual); de lo contrario, se " +"genera :exc:`FileExistsError`." #: ../Doc/library/pathlib.rst:1447 msgid "" -"The :meth:`~Path.open`, :meth:`~Path.write_text` and :meth:`~Path." -"write_bytes` methods are often used to create files." +"The :meth:`~Path.open`, :meth:`~Path.write_text` " +"and :meth:`~Path.write_bytes` methods are often used to create files." msgstr "" +"Los métodos :meth:`~Path.open`, :meth:`~Path.write_text` " +"y :meth:`~Path.write_bytes` se utilizan a menudo para crear archivos." #: ../Doc/library/pathlib.rst:1453 -#, fuzzy msgid "" "Create a new directory at this given path. If *mode* is given, it is " "combined with the process's ``umask`` value to determine the file mode and " "access flags. If the path already exists, :exc:`FileExistsError` is raised." msgstr "" -"Crea un nuevo directorio en la ruta dada. Si se proporciona *mode*, se " -"combina con el valor del proceso ``umask`` para determinar el modo de " -"archivo y los derechos de acceso. Si la ruta ya existe, se genera :exc:" -"`FileExistsError`." +"Crea un nuevo directorio en esta ruta indicada. Si se proporciona *mode*, se " +"combina con el valor ``umask`` del proceso para determinar el modo de " +"archivo y los indicadores de acceso. Si la ruta ya existe, se " +"genera :exc:`FileExistsError`." #: ../Doc/library/pathlib.rst:1458 msgid "" @@ -2212,8 +2668,8 @@ msgstr "" #: ../Doc/library/pathlib.rst:1462 msgid "" -"If *parents* is false (the default), a missing parent raises :exc:" -"`FileNotFoundError`." +"If *parents* is false (the default), a missing parent " +"raises :exc:`FileNotFoundError`." msgstr "" "Si *parents* es falso (el valor predeterminado), se genera un padre que " "falta :exc:`FileNotFoundError`." @@ -2223,28 +2679,26 @@ msgid "" "If *exist_ok* is false (the default), :exc:`FileExistsError` is raised if " "the target directory already exists." msgstr "" -"Si *exist_ok* es falso (el valor predeterminado), se genera :exc:" -"`FileExistsError` si el directorio de destino ya existe." +"Si *exist_ok* es falso (el valor predeterminado), se " +"genera :exc:`FileExistsError` si el directorio de destino ya existe." #: ../Doc/library/pathlib.rst:1468 -#, fuzzy msgid "" "If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the " "given path already exists in the file system and is not a directory (same " "behavior as the POSIX ``mkdir -p`` command)." msgstr "" -"Si *missing_ok* es verdadero, las excepciones :exc:`FileNotFoundError` serán " -"ignoradas (el mismo comportamiento que el comando POSIX ``rm -f``)." +"Si *exist_ok* es verdadero, no se generará :exc:`FileExistsError` a menos " +"que la ruta dada ya exista en el sistema de archivos y no sea un directorio " +"(el mismo comportamiento que el comando POSIX ``mkdir -p``)." #: ../Doc/library/pathlib.rst:1472 msgid "The *exist_ok* parameter was added." msgstr "Se agregó el parámetro *exist_ok*." #: ../Doc/library/pathlib.rst:1478 -#, fuzzy msgid "Make this path a symbolic link pointing to *target*." -msgstr "" -"Hace de esta ruta un enlace fijo que apunta al mismo archivo que *target*." +msgstr "Convierte esta ruta en un enlace simbólico que apunte a *target*." #: ../Doc/library/pathlib.rst:1480 msgid "" @@ -2254,6 +2708,13 @@ msgid "" "a directory if *target_is_directory* is true or a file symlink (the default) " "otherwise. On non-Windows platforms, *target_is_directory* is ignored." msgstr "" +"En Windows, un enlace simbólico representa un archivo o un directorio y no " +"se transforma en el destino de forma dinámica. Si el destino está presente, " +"se creará el tipo de enlace simbólico para que coincida. De lo contrario, el " +"enlace simbólico se creará como un directorio si *target_is_directory* es " +"verdadero o como un enlace simbólico de archivo (el valor predeterminado) en " +"caso contrario. En plataformas que no sean Windows, se ignora " +"*target_is_directory*." #: ../Doc/library/pathlib.rst:1488 msgid "" @@ -2266,19 +2727,29 @@ msgid "" ">>> p.lstat().st_size\n" "8" msgstr "" +">>> p = Path('mylink')\n" +">>> p.symlink_to('setup.py')\n" +">>> p.resolve()\n" +"PosixPath('/home/antoine/pathlib/setup.py')\n" +">>> p.stat().st_size\n" +"956\n" +">>> p.lstat().st_size\n" +"8" #: ../Doc/library/pathlib.rst:1498 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "" -"El orden de los argumentos (*link*, *target*) es el reverso de :func:`os." -"symlink`'s." +"El orden de los argumentos (*link*, *target*) es el reverso " +"de :func:`os.symlink`'s." #: ../Doc/library/pathlib.rst:1501 msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.symlink` is not available. " "In previous versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si :func:`os.symlink` no está disponible. " +"En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1508 msgid "Make this path a hard link to the same file as *target*." @@ -2296,25 +2767,27 @@ msgid "" "Raises :exc:`UnsupportedOperation` if :func:`os.link` is not available. In " "previous versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si :func:`os.link` no está disponible. En " +"versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1522 msgid "Renaming and deleting" -msgstr "" +msgstr "Cambiar nombre y eliminar" #: ../Doc/library/pathlib.rst:1526 -#, fuzzy msgid "" -"Rename this file or directory to the given *target*, and return a new :class:" -"`!Path` instance pointing to *target*. On Unix, if *target* exists and is a " -"file, it will be replaced silently if the user has permission. On Windows, " -"if *target* exists, :exc:`FileExistsError` will be raised. *target* can be " -"either a string or another path object::" +"Rename this file or directory to the given *target*, and return a " +"new :class:`!Path` instance pointing to *target*. On Unix, if *target* " +"exists and is a file, it will be replaced silently if the user has " +"permission. On Windows, if *target* exists, :exc:`FileExistsError` will be " +"raised. *target* can be either a string or another path object::" msgstr "" -"Cambia el nombre de este archivo o directorio al *target* dado y retorna una " -"nueva instancia de *Path* apuntando al *target*. En Unix, si el *target* " -"existe y es un archivo, se reemplazará silenciosamente si el usuario tiene " -"permiso. En Windows, si el *target* existe, se lanzará una excepción :exc:" -"`FileExistsError`. El *target* puede ser una cadena u otro objeto de ruta:" +"Cambie el nombre de este archivo o directorio al *target* indicado y " +"devuelva una nueva instancia de :class:`!Path` que apunte a *target*. En " +"Unix, si *target* existe y es un archivo, se reemplazará de forma silenciosa " +"si el usuario tiene permiso. En Windows, si *target* existe, se " +"generará :exc:`FileExistsError`. *target* puede ser una cadena u otro objeto " +"de ruta:" #: ../Doc/library/pathlib.rst:1532 msgid "" @@ -2327,17 +2800,24 @@ msgid "" ">>> target.open().read()\n" "'some text'" msgstr "" +">>> p = Path('foo')\n" +">>> p.open('w').write('some text')\n" +"9\n" +">>> target = Path('bar')\n" +">>> p.rename(target)\n" +"PosixPath('bar')\n" +">>> target.open().read()\n" +"'some text'" #: ../Doc/library/pathlib.rst:1541 ../Doc/library/pathlib.rst:1557 -#, fuzzy msgid "" "The target path may be absolute or relative. Relative paths are interpreted " -"relative to the current working directory, *not* the directory of the :class:" -"`!Path` object." +"relative to the current working directory, *not* the directory of " +"the :class:`!Path` object." msgstr "" -"La ruta de destino puede ser absoluta o relativa. Las rutas de acceso " -"relativas se interpretan en relación con el directorio de trabajo actual, " -"*no* el directorio del objeto Path." +"La ruta de destino puede ser absoluta o relativa. Las rutas relativas se " +"interpretan en relación con el directorio de trabajo actual, *not* el " +"directorio del objeto :class:`!Path`." #: ../Doc/library/pathlib.rst:1545 msgid "" @@ -2347,25 +2827,25 @@ msgstr "" "Se implementa en términos de :func:`os.rename` y ofrece las mismas garantías." #: ../Doc/library/pathlib.rst:1547 ../Doc/library/pathlib.rst:1561 -#, fuzzy msgid "Added return value, return the new :class:`!Path` instance." -msgstr "Valor de retorno agregado, retorna la nueva instancia de *Path*." +msgstr "" +"Se agregó valor de retorno, devuelve la nueva instancia :class:`!Path`." #: ../Doc/library/pathlib.rst:1553 -#, fuzzy msgid "" -"Rename this file or directory to the given *target*, and return a new :class:" -"`!Path` instance pointing to *target*. If *target* points to an existing " -"file or empty directory, it will be unconditionally replaced." +"Rename this file or directory to the given *target*, and return a " +"new :class:`!Path` instance pointing to *target*. If *target* points to an " +"existing file or empty directory, it will be unconditionally replaced." msgstr "" -"Cambia el nombre de este archivo o directorio al *target* dado y retorna una " -"nueva instancia de *Path* que apunte a *target*. Si *target* apunta a un " -"archivo existente o a un directorio vacío, se reemplazará incondicionalmente." +"Cambie el nombre de este archivo o directorio por el *target* indicado y " +"devuelva una nueva instancia de :class:`!Path` que apunte a *target*. Si " +"*target* apunta a un archivo existente o a un directorio vacío, se " +"reemplazará sin condiciones." #: ../Doc/library/pathlib.rst:1567 msgid "" -"Remove this file or symbolic link. If the path points to a directory, use :" -"func:`Path.rmdir` instead." +"Remove this file or symbolic link. If the path points to a directory, " +"use :func:`Path.rmdir` instead." msgstr "" "Elimine el archivo o enlace simbólico. Si la ruta apunta a un directorio, " "use :func:`Path.rmdir` en su lugar." @@ -2375,8 +2855,8 @@ msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." msgstr "" -"Si *missing_ok* es falso (el valor predeterminado), se genera :exc:" -"`FileNotFoundError` si la ruta no existe." +"Si *missing_ok* es falso (el valor predeterminado), se " +"genera :exc:`FileNotFoundError` si la ruta no existe." #: ../Doc/library/pathlib.rst:1573 msgid "" @@ -2396,57 +2876,58 @@ msgstr "Elimina el directorio. El directorio debe estar vacío." #: ../Doc/library/pathlib.rst:1586 msgid "Permissions and ownership" -msgstr "" +msgstr "Permisos y propiedad" #: ../Doc/library/pathlib.rst:1590 -#, fuzzy msgid "" "Return the name of the user owning the file. :exc:`KeyError` is raised if " "the file's user identifier (UID) isn't found in the system database." msgstr "" -"Retorna el nombre del usuario propietario del archivo. :exc:`KeyError` se " -"genera si el *uid* del archivo no se encuentra en la base de datos del " -"sistema." +"Devuelve el nombre del usuario propietario del archivo. Se genera el " +"error :exc:`KeyError` si el identificador de usuario (UID) del archivo no se " +"encuentra en la base de datos del sistema." #: ../Doc/library/pathlib.rst:1593 -#, fuzzy msgid "" "This method normally follows symlinks; to get the owner of the symlink, add " "the argument ``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue enlaces simbólicos; para obtener el " +"propietario del enlace simbólico, agregue el argumento " +"``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1596 msgid "" "Raises :exc:`UnsupportedOperation` if the :mod:`pwd` module is not " "available. In earlier versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si el módulo :mod:`pwd` no está " +"disponible. En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1606 -#, fuzzy msgid "" "Return the name of the group owning the file. :exc:`KeyError` is raised if " "the file's group identifier (GID) isn't found in the system database." msgstr "" -"Retorna el nombre del grupo propietario del archivo. :exc:`KeyError` se " -"genera si el *gid* del archivo no se encuentra en la base de datos del " -"sistema." +"Devuelve el nombre del grupo propietario del archivo. Se " +"genera :exc:`KeyError` si no se encuentra el identificador de grupo (GID) " +"del archivo en la base de datos del sistema." #: ../Doc/library/pathlib.rst:1609 -#, fuzzy msgid "" "This method normally follows symlinks; to get the group of the symlink, add " "the argument ``follow_symlinks=False``." msgstr "" -"Este método normalmente sigue enlaces simbólicos; para comprobar si existe " -"un enlace simbólico, agregue el argumento ``follow_symlinks=False``." +"Este método normalmente sigue enlaces simbólicos; para obtener el grupo del " +"enlace simbólico, agregue el argumento ``follow_symlinks=False``." #: ../Doc/library/pathlib.rst:1612 msgid "" "Raises :exc:`UnsupportedOperation` if the :mod:`grp` module is not " "available. In earlier versions, :exc:`NotImplementedError` was raised." msgstr "" +"Genera :exc:`UnsupportedOperation` si el módulo :mod:`grp` no está " +"disponible. En versiones anteriores, se generaba :exc:`NotImplementedError`." #: ../Doc/library/pathlib.rst:1622 msgid "Change the file mode and permissions, like :func:`os.chmod`." @@ -2460,8 +2941,8 @@ msgid "" msgstr "" "Este método normalmente sigue enlaces simbólicos. Algunas versiones de Unix " "admiten el cambio de permisos en el enlace simbólico en sí; en estas " -"plataformas puede agregar el argumento ``follow_symlinks=False``, o usar :" -"meth:`~Path.lchmod`." +"plataformas puede agregar el argumento ``follow_symlinks=False``, o " +"usar :meth:`~Path.lchmod`." #: ../Doc/library/pathlib.rst:1630 msgid "" @@ -2472,6 +2953,12 @@ msgid "" ">>> p.stat().st_mode\n" "33060" msgstr "" +">>> p = Path('setup.py')\n" +">>> p.stat().st_mode\n" +"33277\n" +">>> p.chmod(0o444)\n" +">>> p.stat().st_mode\n" +"33060" #: ../Doc/library/pathlib.rst:1643 msgid "" @@ -2483,162 +2970,184 @@ msgstr "" #: ../Doc/library/pathlib.rst:1650 msgid "Pattern language" -msgstr "" +msgstr "Lenguaje de patrones" #: ../Doc/library/pathlib.rst:1652 msgid "" -"The following wildcards are supported in patterns for :meth:`~PurePath." -"full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:" +"The following wildcards are supported in patterns " +"for :meth:`~PurePath.full_match`, :meth:`~Path.glob` and :meth:`~Path.rglob`:" msgstr "" +"Los siguientes comodines son compatibles con los patrones " +"para :meth:`~PurePath.full_match`, :meth:`~Path.glob` y :meth:`~Path.rglob`:" #: ../Doc/library/pathlib.rst:1655 msgid "``**`` (entire segment)" -msgstr "" +msgstr "``**`` (segmento completo)" #: ../Doc/library/pathlib.rst:1656 msgid "Matches any number of file or directory segments, including zero." msgstr "" +"Coincide con cualquier número de segmentos de archivo o directorio, incluido " +"cero." #: ../Doc/library/pathlib.rst:1657 msgid "``*`` (entire segment)" -msgstr "" +msgstr "``*`` (segmento completo)" #: ../Doc/library/pathlib.rst:1658 msgid "Matches one file or directory segment." -msgstr "" +msgstr "Coincide con un segmento de archivo o directorio." #: ../Doc/library/pathlib.rst:1659 msgid "``*`` (part of a segment)" -msgstr "" +msgstr "``*`` (parte de un segmento)" #: ../Doc/library/pathlib.rst:1660 msgid "Matches any number of non-separator characters, including zero." msgstr "" +"Coincide con cualquier número de caracteres no separadores, incluido el cero." #: ../Doc/library/pathlib.rst:1661 msgid "``?``" -msgstr "" +msgstr "``?``" #: ../Doc/library/pathlib.rst:1662 msgid "Matches one non-separator character." -msgstr "" +msgstr "Coincide con un carácter no separador." #: ../Doc/library/pathlib.rst:1663 msgid "``[seq]``" -msgstr "" +msgstr "``[seq]``" #: ../Doc/library/pathlib.rst:1664 msgid "Matches one character in *seq*." -msgstr "" +msgstr "Coincide con un carácter en *seq*." #: ../Doc/library/pathlib.rst:1666 msgid "``[!seq]``" -msgstr "" +msgstr "``[!seq]``" #: ../Doc/library/pathlib.rst:1666 msgid "Matches one character not in *seq*." -msgstr "" +msgstr "Coincide con un carácter que no está en *seq*." #: ../Doc/library/pathlib.rst:1668 msgid "" "For a literal match, wrap the meta-characters in brackets. For example, " "``\"[?]\"`` matches the character ``\"?\"``." msgstr "" +"Para una coincidencia literal, encierre los metacaracteres entre corchetes. " +"Por ejemplo, ``\"[?]\"`` coincide con el carácter ``\"?\"``." #: ../Doc/library/pathlib.rst:1671 msgid "The \"``**``\" wildcard enables recursive globbing. A few examples:" msgstr "" +"El comodín \"``**``\" permite la codificación recursiva. Algunos ejemplos:" #: ../Doc/library/pathlib.rst:1674 msgid "Pattern" -msgstr "" +msgstr "Patrón" #: ../Doc/library/pathlib.rst:1674 msgid "Meaning" -msgstr "" +msgstr "Significado" #: ../Doc/library/pathlib.rst:1676 msgid "\"``**/*``\"" -msgstr "" +msgstr "\"``**/*``\"" #: ../Doc/library/pathlib.rst:1676 msgid "Any path with at least one segment." -msgstr "" +msgstr "Cualquier camino con al menos un segmento." #: ../Doc/library/pathlib.rst:1677 msgid "\"``**/*.py``\"" -msgstr "" +msgstr "\"``**/*.py``\"" #: ../Doc/library/pathlib.rst:1677 msgid "Any path with a final segment ending \"``.py``\"." -msgstr "" +msgstr "Cualquier ruta con un segmento final que termine \"``.py``\"." #: ../Doc/library/pathlib.rst:1678 msgid "\"``assets/**``\"" -msgstr "" +msgstr "\"``assets/**``\"" #: ../Doc/library/pathlib.rst:1678 msgid "Any path starting with \"``assets/``\"." -msgstr "" +msgstr "Cualquier ruta que comience con \"``assets/``\"." #: ../Doc/library/pathlib.rst:1679 msgid "\"``assets/**/*``\"" -msgstr "" +msgstr "\"``assets/**/*``\"" #: ../Doc/library/pathlib.rst:1679 msgid "" "Any path starting with \"``assets/``\", excluding \"``assets/``\" itself." msgstr "" +"Cualquier ruta que comience con \"``assets/``\", excluyendo \"``assets/``\" " +"en sí." #: ../Doc/library/pathlib.rst:1683 msgid "" "Globbing with the \"``**``\" wildcard visits every directory in the tree. " "Large directory trees may take a long time to search." msgstr "" +"Al utilizar el comodín \"``**``\", se visitan todos los directorios del " +"árbol. Las búsquedas en árboles de directorios grandes pueden llevar mucho " +"tiempo." #: ../Doc/library/pathlib.rst:1686 msgid "" "Globbing with a pattern that ends with \"``**``\" returns both files and " "directories. In previous versions, only directories were returned." msgstr "" +"La codificación con un patrón que termina en \"``**``\" devuelve tanto " +"archivos como directorios. En versiones anteriores, solo se devolvían " +"directorios." #: ../Doc/library/pathlib.rst:1690 msgid "" "In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added " "to the pattern to match only directories." msgstr "" +"En :meth:`Path.glob` y :meth:`~Path.rglob`, se puede agregar una barra " +"diagonal final al patrón para que coincida solo con directorios." #: ../Doc/library/pathlib.rst:1693 -#, fuzzy msgid "" -"Globbing with a pattern that ends with a pathname components separator (:" -"data:`~os.sep` or :data:`~os.altsep`) returns only directories." +"Globbing with a pattern that ends with a pathname components separator " +"(:data:`~os.sep` or :data:`~os.altsep`) returns only directories." msgstr "" -"Retorna solo directorios si *pattern* termina con un separador de " -"componentes de nombre de ruta (:data:`~os.sep` o :data:`~os.altsep`)." +"El uso de un patrón que termina con un separador de componentes de ruta de " +"acceso (:data:`~os.sep` o :data:`~os.altsep`) solo devuelve directorios." #: ../Doc/library/pathlib.rst:1699 -#, fuzzy msgid "Comparison to the :mod:`glob` module" -msgstr "Correspondencia a herramientas en el módulo :mod:`os`" +msgstr "Comparación con el módulo :mod:`glob`" #: ../Doc/library/pathlib.rst:1701 msgid "" -"The patterns accepted and results generated by :meth:`Path.glob` and :meth:" -"`Path.rglob` differ slightly from those by the :mod:`glob` module:" +"The patterns accepted and results generated by :meth:`Path.glob` " +"and :meth:`Path.rglob` differ slightly from those by the :mod:`glob` module:" msgstr "" +"Los patrones aceptados y los resultados generados por :meth:`Path.glob` " +"y :meth:`Path.rglob` difieren ligeramente de los del módulo :mod:`glob`:" #: ../Doc/library/pathlib.rst:1704 msgid "" "Files beginning with a dot are not special in pathlib. This is like passing " "``include_hidden=True`` to :func:`glob.glob`." msgstr "" +"Los archivos que comienzan con un punto no son especiales en pathlib. Es " +"como pasar ``include_hidden=True`` a :func:`glob.glob`." #: ../Doc/library/pathlib.rst:1706 msgid "" "\"``**``\" pattern components are always recursive in pathlib. This is like " "passing ``recursive=True`` to :func:`glob.glob`." msgstr "" +"Los componentes del patrón \"``**``\" siempre son recursivos en pathlib. " +"Esto es como pasar ``recursive=True`` a :func:`glob.glob`." #: ../Doc/library/pathlib.rst:1708 msgid "" @@ -2646,19 +3155,29 @@ msgid "" "This behaviour has no equivalent in :func:`glob.glob`, but you can pass " "``recurse_symlinks=True`` to :meth:`Path.glob` for compatible behaviour." msgstr "" +"Los componentes del patrón \"``**``\" no siguen los enlaces simbólicos de " +"forma predeterminada en pathlib. Este comportamiento no tiene equivalente " +"en :func:`glob.glob`, pero puede pasar ``recurse_symlinks=True`` " +"a :meth:`Path.glob` para lograr un comportamiento compatible." #: ../Doc/library/pathlib.rst:1711 msgid "" "Like all :class:`PurePath` and :class:`Path` objects, the values returned " "from :meth:`Path.glob` and :meth:`Path.rglob` don't include trailing slashes." msgstr "" +"Al igual que todos los objetos :class:`PurePath` y :class:`Path`, los " +"valores devueltos por :meth:`Path.glob` y :meth:`Path.rglob` no incluyen " +"barras diagonales finales." #: ../Doc/library/pathlib.rst:1714 msgid "" "The values returned from pathlib's ``path.glob()`` and ``path.rglob()`` " -"include the *path* as a prefix, unlike the results of ``glob." -"glob(root_dir=path)``." +"include the *path* as a prefix, unlike the results of " +"``glob.glob(root_dir=path)``." msgstr "" +"Los valores devueltos de ``path.glob()`` y ``path.rglob()`` de pathlib " +"incluyen *path* como prefijo, a diferencia de los resultados de " +"``glob.glob(root_dir=path)``." #: ../Doc/library/pathlib.rst:1717 msgid "" @@ -2667,34 +3186,50 @@ msgid "" "results of ``glob.glob(root_dir=path)`` never include an empty string that " "would correspond to *path*." msgstr "" +"Los valores devueltos de ``path.glob()`` y ``path.rglob()`` de pathlib " +"pueden incluir el propio *path*, por ejemplo, al incluir \"``**``\", " +"mientras que los resultados de ``glob.glob(root_dir=path)`` nunca incluyen " +"una cadena vacía que corresponda a *path*." #: ../Doc/library/pathlib.rst:1724 -#, fuzzy msgid "Comparison to the :mod:`os` and :mod:`os.path` modules" -msgstr ":mod:`os` y :mod:`os.path`" +msgstr "Comparación con los módulos :mod:`os` y :mod:`os.path`" #: ../Doc/library/pathlib.rst:1726 msgid "" "pathlib implements path operations using :class:`PurePath` and :class:`Path` " -"objects, and so it's said to be *object-oriented*. On the other hand, the :" -"mod:`os` and :mod:`os.path` modules supply functions that work with low-" +"objects, and so it's said to be *object-oriented*. On the other hand, " +"the :mod:`os` and :mod:`os.path` modules supply functions that work with low-" "level ``str`` and ``bytes`` objects, which is a more *procedural* approach. " "Some users consider the object-oriented style to be more readable." msgstr "" +"pathlib implementa operaciones de ruta utilizando objetos :class:`PurePath` " +"y :class:`Path`, por lo que se dice que es *object-oriented*. Por otro lado, " +"los módulos :mod:`os` y :mod:`os.path` proporcionan funciones que funcionan " +"con objetos ``str`` y ``bytes`` de bajo nivel, lo que es un enfoque más " +"propio de *procedural*. Algunos usuarios consideran que el estilo orientado " +"a objetos es más legible." #: ../Doc/library/pathlib.rst:1732 msgid "" -"Many functions in :mod:`os` and :mod:`os.path` support ``bytes`` paths and :" -"ref:`paths relative to directory descriptors `. These features " +"Many functions in :mod:`os` and :mod:`os.path` support ``bytes`` paths " +"and :ref:`paths relative to directory descriptors `. These features " "aren't available in pathlib." msgstr "" +"Muchas funciones de :mod:`os` y :mod:`os.path` admiten rutas ``bytes`` " +"y :ref:`paths relative to directory descriptors `. Estas funciones " +"no están disponibles en pathlib." #: ../Doc/library/pathlib.rst:1736 msgid "" -"Python's ``str`` and ``bytes`` types, and portions of the :mod:`os` and :mod:" -"`os.path` modules, are written in C and are very speedy. pathlib is written " -"in pure Python and is often slower, but rarely slow enough to matter." +"Python's ``str`` and ``bytes`` types, and portions of the :mod:`os` " +"and :mod:`os.path` modules, are written in C and are very speedy. pathlib is " +"written in pure Python and is often slower, but rarely slow enough to matter." msgstr "" +"Los tipos ``str`` y ``bytes`` de Python, y partes de los módulos :mod:`os` " +"y :mod:`os.path`, están escritos en C y son muy rápidos. pathlib está " +"escrito en Python puro y a menudo es más lento, pero rara vez lo " +"suficientemente lento como para ser importante." #: ../Doc/library/pathlib.rst:1740 msgid "" @@ -2704,11 +3239,19 @@ msgid "" "are involved, :meth:`Path.absolute` preserves these segments for greater " "safety." msgstr "" +"la normalización de rutas de pathlib es ligeramente más estricta y " +"consistente que la de :mod:`os.path`. Por ejemplo, mientras " +"que :func:`os.path.abspath` elimina los segmentos \"``..``\" de una ruta, " +"que pueden cambiar su significado si hay enlaces simbólicos " +"involucrados, :meth:`Path.absolute` conserva estos segmentos para mayor " +"seguridad." #: ../Doc/library/pathlib.rst:1745 msgid "" "pathlib's path normalization may render it unsuitable for some applications:" msgstr "" +"la normalización de rutas de pathlib puede hacer que no sea adecuado para " +"algunas aplicaciones:" #: ../Doc/library/pathlib.rst:1747 msgid "" @@ -2718,6 +3261,11 @@ msgid "" "separator may allow the path to be resolved as either a file or directory, " "rather than a directory only." msgstr "" +"pathlib normaliza ``Path(\"my_folder/\")`` a ``Path(\"my_folder\")``, lo que " +"cambia el significado de una ruta cuando se proporciona a varias API del " +"sistema operativo y utilidades de línea de comandos. En concreto, la " +"ausencia de un separador final puede permitir que la ruta se resuelva como " +"un archivo o directorio, en lugar de solo como un directorio." #: ../Doc/library/pathlib.rst:1752 msgid "" @@ -2727,21 +3275,28 @@ msgid "" "a separator in the path may force it to be looked up in :envvar:`PATH` " "rather than the current directory." msgstr "" +"pathlib normaliza ``Path(\"./my_program\")`` a ``Path(\"my_program\")``, lo " +"que cambia el significado de una ruta cuando se utiliza como ruta de " +"búsqueda ejecutable, como en un shell o al generar un proceso secundario. En " +"concreto, la ausencia de un separador en la ruta puede obligar a que se " +"busque en :envvar:`PATH` en lugar de en el directorio actual." #: ../Doc/library/pathlib.rst:1758 msgid "" "As a consequence of these differences, pathlib is not a drop-in replacement " "for :mod:`os.path`." msgstr "" +"Como consecuencia de estas diferencias, pathlib no es un reemplazo directo " +"para :mod:`os.path`." #: ../Doc/library/pathlib.rst:1763 msgid "Corresponding tools" -msgstr "" +msgstr "Herramientas correspondientes" #: ../Doc/library/pathlib.rst:1765 msgid "" -"Below is a table mapping various :mod:`os` functions to their corresponding :" -"class:`PurePath`/:class:`Path` equivalent." +"Below is a table mapping various :mod:`os` functions to their " +"corresponding :class:`PurePath`/:class:`Path` equivalent." msgstr "" "A continuación se muestra una tabla que asigna varias funciones :mod:`os` a " "sus equivalentes en :class:`PurePath`/:class:`Path`." @@ -2775,18 +3330,16 @@ msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" #: ../Doc/library/pathlib.rst:1773 -#, fuzzy msgid ":attr:`PurePath.stem`, :attr:`PurePath.suffix`" -msgstr ":attr:`PurePath.stem` y :attr:`PurePath.suffix`" +msgstr ":attr:`PurePath.stem`, :attr:`PurePath.suffix`" #: ../Doc/library/pathlib.rst:1774 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" #: ../Doc/library/pathlib.rst:1774 -#, fuzzy msgid ":meth:`PurePath.joinpath`" -msgstr ":func:`PurePath.joinpath`" +msgstr ":meth:`PurePath.joinpath`" #: ../Doc/library/pathlib.rst:1775 msgid ":func:`os.path.isabs`" @@ -2801,18 +3354,16 @@ msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" #: ../Doc/library/pathlib.rst:1776 -#, fuzzy msgid ":meth:`PurePath.relative_to` [1]_" -msgstr ":meth:`PurePath.relative_to` [#]_" +msgstr ":meth:`PurePath.relative_to` [1]_" #: ../Doc/library/pathlib.rst:1777 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" #: ../Doc/library/pathlib.rst:1777 -#, fuzzy msgid ":meth:`Path.expanduser` [2]_" -msgstr ":meth:`Path.absolute` [#]_" +msgstr ":meth:`Path.expanduser` [2]_" #: ../Doc/library/pathlib.rst:1778 msgid ":func:`os.path.realpath`" @@ -2827,9 +3378,8 @@ msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" #: ../Doc/library/pathlib.rst:1779 -#, fuzzy msgid ":meth:`Path.absolute` [3]_" -msgstr ":meth:`Path.absolute` [#]_" +msgstr ":meth:`Path.absolute` [3]_" #: ../Doc/library/pathlib.rst:1780 msgid ":func:`os.path.exists`" @@ -2864,24 +3414,20 @@ msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" #: ../Doc/library/pathlib.rst:1784 -#, fuzzy msgid ":func:`os.path.isjunction`" -msgstr ":func:`os.path.islink`" +msgstr ":func:`os.path.isjunction`" #: ../Doc/library/pathlib.rst:1784 -#, fuzzy msgid ":meth:`Path.is_junction`" -msgstr ":meth:`Path.unlink`" +msgstr ":meth:`Path.is_junction`" #: ../Doc/library/pathlib.rst:1785 -#, fuzzy msgid ":func:`os.path.ismount`" -msgstr ":func:`os.path.islink`" +msgstr ":func:`os.path.ismount`" #: ../Doc/library/pathlib.rst:1785 -#, fuzzy msgid ":meth:`Path.is_mount`" -msgstr ":meth:`Path.is_symlink`" +msgstr ":meth:`Path.is_mount`" #: ../Doc/library/pathlib.rst:1786 msgid ":func:`os.path.samefile`" @@ -2896,28 +3442,24 @@ msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" #: ../Doc/library/pathlib.rst:1787 -#, fuzzy msgid ":meth:`Path.cwd`" -msgstr ":meth:`Path.chmod`" +msgstr ":meth:`Path.cwd`" #: ../Doc/library/pathlib.rst:1788 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" #: ../Doc/library/pathlib.rst:1788 -#, fuzzy msgid ":meth:`Path.stat`" -msgstr ":meth:`Path.exists`" +msgstr ":meth:`Path.stat`" #: ../Doc/library/pathlib.rst:1789 -#, fuzzy msgid ":func:`os.lstat`" -msgstr ":func:`os.stat`" +msgstr ":func:`os.lstat`" #: ../Doc/library/pathlib.rst:1789 -#, fuzzy msgid ":meth:`Path.lstat`" -msgstr ":meth:`Path.exists`" +msgstr ":meth:`Path.lstat`" #: ../Doc/library/pathlib.rst:1790 msgid ":func:`os.listdir`" @@ -2932,14 +3474,12 @@ msgid ":func:`os.walk`" msgstr ":func:`os.walk`" #: ../Doc/library/pathlib.rst:1791 -#, fuzzy msgid ":meth:`Path.walk` [4]_" -msgstr ":meth:`Path.walk`" +msgstr ":meth:`Path.walk` [4]_" #: ../Doc/library/pathlib.rst:1792 -#, fuzzy msgid ":func:`os.mkdir`, :func:`os.makedirs`" -msgstr ":func:`os.remove`, :func:`os.unlink`" +msgstr ":func:`os.mkdir`, :func:`os.makedirs`" #: ../Doc/library/pathlib.rst:1792 msgid ":meth:`Path.mkdir`" @@ -3010,14 +3550,12 @@ msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" #: ../Doc/library/pathlib.rst:1801 -#, fuzzy msgid ":func:`os.lchmod`" -msgstr ":func:`os.chmod`" +msgstr ":func:`os.lchmod`" #: ../Doc/library/pathlib.rst:1801 -#, fuzzy msgid ":meth:`Path.lchmod`" -msgstr ":meth:`Path.chmod`" +msgstr ":meth:`Path.lchmod`" #: ../Doc/library/pathlib.rst:1805 msgid "Footnotes" @@ -3030,24 +3568,31 @@ msgid "" "is a lexical operation that raises :exc:`ValueError` when its inputs' " "anchors differ (e.g. if one path is absolute and the other relative.)" msgstr "" +":func:`os.path.relpath` llama a :func:`~os.path.abspath` para hacer que las " +"rutas sean absolutas y eliminar partes \"``..``\", mientras " +"que :meth:`PurePath.relative_to` es una operación léxica que " +"genera :exc:`ValueError` cuando los anclajes de sus entradas difieren (por " +"ejemplo, si una ruta es absoluta y la otra relativa)." #: ../Doc/library/pathlib.rst:1810 msgid "" ":func:`os.path.expanduser` returns the path unchanged if the home directory " -"can't be resolved, whereas :meth:`Path.expanduser` raises :exc:" -"`RuntimeError`." +"can't be resolved, whereas :meth:`Path.expanduser` " +"raises :exc:`RuntimeError`." msgstr "" +":func:`os.path.expanduser` devuelve la ruta sin cambios si no se puede " +"resolver el directorio de inicio, mientras que :meth:`Path.expanduser` " +"genera :exc:`RuntimeError`." #: ../Doc/library/pathlib.rst:1813 -#, fuzzy msgid "" ":func:`os.path.abspath` removes \"``..``\" components without resolving " -"symlinks, which may change the meaning of the path, whereas :meth:`Path." -"absolute` leaves any \"``..``\" components in the path." +"symlinks, which may change the meaning of the path, " +"whereas :meth:`Path.absolute` leaves any \"``..``\" components in the path." msgstr "" -":func:`os.path.abspath` normaliza la ruta resultante, lo cual puede cambiar " -"su significado en presencia de enlaces simbólicos, mientras que :meth:`Path." -"absolute` no lo hace." +":func:`os.path.abspath` elimina los componentes \"``..``\" sin resolver los " +"enlaces simbólicos, lo que puede cambiar el significado de la ruta, mientras " +"que :meth:`Path.absolute` deja cualquier componente \"``..``\" en la ruta." #: ../Doc/library/pathlib.rst:1816 msgid "" @@ -3055,6 +3600,10 @@ msgid "" "*dirnames* and *filenames*, whereas :meth:`Path.walk` categorizes all " "symlinks into *filenames* when *follow_symlinks* is false (the default.)" msgstr "" +":func:`os.walk` siempre sigue los enlaces simbólicos al categorizar rutas en " +"*dirnames* y *filenames*, mientras que :meth:`Path.walk` categoriza todos " +"los enlaces simbólicos en *filenames* cuando *follow_symlinks* es falso (el " +"valor predeterminado)." # Es parte del índice? #: ../Doc/library/pathlib.rst:11 From 15afcb459c1610bfb226676d4a73e490a10c367c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 12:20:34 +0200 Subject: [PATCH 24/40] Translate library/os (#3327) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2994 --------- Co-authored-by: Sofía Denner --- dictionaries/library_os.txt | 26 +- library/os.po | 1557 ++++++++++++++++++++--------------- 2 files changed, 929 insertions(+), 654 deletions(-) diff --git a/dictionaries/library_os.txt b/dictionaries/library_os.txt index 97081ad219..25895a01fc 100644 --- a/dictionaries/library_os.txt +++ b/dictionaries/library_os.txt @@ -1,28 +1,43 @@ -configurarlos -ctime Cygwin +Desasociar Desestablece +Reasociar +TerminateProcess +cancelable +configurarlos +ctime +decodificables +effective egid ejecutabilidad entropía errno euid +eventfd execv fork +gethostname glibc group initgroups inodo +inodos interactividad merge misceláneas nanosegundos +procfs +pseudoarchivo +pseudoterminal pty putenv quantum +reasocia reescritura rgid +rmdir robin +rootfd round ruid setgid @@ -36,7 +51,12 @@ stdio subcapa subshell suid +supports syscall -TerminateProcess +sysfs +timerfd +topdown umask +unlink urandom +work diff --git a/library/os.po b/library/os.po index d2d585562f..9f89adb3e9 100644 --- a/library/os.po +++ b/library/os.po @@ -11,20 +11,20 @@ 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-19 21:45-0500\n" +"PO-Revision-Date: 2024-11-24 19:12+0100\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\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.4.2\n" #: ../Doc/library/os.rst:2 -#, fuzzy msgid ":mod:`!os` --- Miscellaneous operating system interfaces" -msgstr ":mod:`os` --- Interfaces misceláneas del sistema operativo" +msgstr ":mod:`!os` --- Interfaces misceláneas del sistema operativo" #: ../Doc/library/os.rst:7 msgid "**Source code:** :source:`Lib/os.py`" @@ -93,7 +93,6 @@ msgstr "" "En VxWorks, os.popen, os.fork, os.execv y os.spawn*p* no son compatibles." #: ../Doc/library/os.rst:37 -#, fuzzy msgid "" "On WebAssembly platforms, Android and iOS, large parts of the :mod:`os` " "module are not available or behave differently. APIs related to processes (e." @@ -102,12 +101,13 @@ msgid "" "getpid` are emulated or stubs. WebAssembly platforms also lack support for " "signals (e.g. :func:`~os.kill`, :func:`~os.wait`)." msgstr "" -"En las plataformas WebAssembly ``wasm32-emscripten`` y ``wasm32-wasi``, gran " -"parte del módulo :mod:`os` no está disponible o se comporta de manera " -"diferente. La API relacionada con procesos (por ejemplo, :func:`~os.fork`, :" -"func:`~os.execve`), señales (por ejemplo, :func:`~os.kill`, :func:`~os." -"wait`) y recursos (por ejemplo, :func:`~os.nice`) no están disponibles. " -"Otros como :func:`~os.getuid` y :func:`~os.getpid` son emulados o stubs." +"En las plataformas WebAssembly, Android e iOS, gran parte del módulo :mod:" +"`os` no está disponible o se comporta de forma diferente. Las API " +"relacionadas con los procesos (p. ej., :func:`~os.fork`, :func:`~os.execve`) " +"y los recursos (p. ej., :func:`~os.nice`) no están disponibles. Otras, como :" +"func:`~os.getuid` y :func:`~os.getpid`, se emulan o son stubs. Las " +"plataformas WebAssembly también carecen de compatibilidad con señales (p. " +"ej., :func:`~os.kill`, :func:`~os.wait`)." #: ../Doc/library/os.rst:47 msgid "" @@ -132,13 +132,12 @@ msgstr "" "siguientes nombres están registrados: ``'posix'``, ``'nt'``, ``'java'``." #: ../Doc/library/os.rst:63 -#, fuzzy msgid "" ":data:`sys.platform` has a finer granularity. :func:`os.uname` gives system-" "dependent version information." msgstr "" -":attr:`sys.platform` tiene un mayor nivel de detalle. :func:`os.uname` " -"proporciona información de la versión dependiendo del sistema operativo." +":data:`sys.platform` tiene una granularidad más fina. :func:`os.uname` " +"proporciona información de versión dependiente del sistema." #: ../Doc/library/os.rst:66 msgid "" @@ -184,7 +183,6 @@ msgstr "" "de :c:type:`PyConfig`." #: ../Doc/library/os.rst:87 -#, fuzzy msgid "" "On some systems, conversion using the file system encoding may fail. In this " "case, Python uses the :ref:`surrogateescape encoding error handler " @@ -192,12 +190,12 @@ msgid "" "Unicode character U+DC\\ *xx* on decoding, and these are again translated to " "the original byte on encoding." msgstr "" -"En algunos sistemas, la conversión usando la codificación del sistema de " -"archivos puede fallar. En este caso, Python usa el :ref:`controlador de " -"error de codificación de *subrogateescape* `, lo que " -"significa que los *bytes* no codificables se reemplazan por un carácter " -"Unicode U + DCxx en la decodificación, y estos se traducen nuevamente al " -"byte original en la codificación." +"En algunos sistemas, la conversión mediante la codificación del sistema de " +"archivos puede fallar. En este caso, Python utiliza :ref:`surrogateescape " +"encoding error handler `, lo que significa que los bytes no " +"decodificables se reemplazan por un carácter Unicode U+DC\\ *xx* durante la " +"decodificación y estos se traducen nuevamente al byte original durante la " +"codificación." #: ../Doc/library/os.rst:95 msgid "" @@ -243,17 +241,15 @@ msgstr "" "de errores `." #: ../Doc/library/os.rst:116 -#, fuzzy msgid ":func:`sys.getfilesystemencoding` returns ``'utf-8'``." -msgstr ":func:`sys.getfilesystemencoding()` retorna ``'utf-8'``." +msgstr ":func:`sys.getfilesystemencoding` retorna ``'utf-8'``." #: ../Doc/library/os.rst:117 -#, fuzzy msgid "" ":func:`locale.getpreferredencoding` returns ``'utf-8'`` (the *do_setlocale* " "argument has no effect)." msgstr "" -":func:`locale.getpreferredencoding()` retorna ``'utf-8'`` (el argumento " +":func:`locale.getpreferredencoding` retorna ``'utf-8'`` (el argumento " "*do_setlocale* no tiene ningún efecto)." #: ../Doc/library/os.rst:119 @@ -305,24 +301,22 @@ msgstr "" "nombres de archivo se decodifican en texto utilizando la codificación UTF-8." #: ../Doc/library/os.rst:136 -#, fuzzy msgid ":func:`os.fsdecode` and :func:`os.fsencode` use the UTF-8 encoding." msgstr "" -":func:`os.fsdecode()` y :func:`os.fsencode()` utilizan la codificación UTF-8." +":func:`os.fsdecode` y :func:`os.fsencode` utilizan la codificación UTF-8." #: ../Doc/library/os.rst:137 -#, fuzzy msgid "" ":func:`open`, :func:`io.open`, and :func:`codecs.open` use the UTF-8 " "encoding by default. However, they still use the strict error handler by " "default so that attempting to open a binary file in text mode is likely to " "raise an exception rather than producing nonsense data." msgstr "" -":func:`open()`, :func:`io.open()` y :func:`codecs.open()` utilizan la " -"codificación UTF-8 de forma predeterminada. Sin embargo, todavía usan el " -"controlador de errores estricto de forma predeterminada, por lo que es " -"probable que intentar abrir un archivo binario en modo texto genere una " -"excepción en lugar de producir datos sin sentido." +":func:`open`, :func:`io.open` y :func:`codecs.open` utilizan la codificación " +"UTF-8 de forma predeterminada. Sin embargo, todavía usan el controlador de " +"errores estricto de forma predeterminada, por lo que es probable que " +"intentar abrir un archivo binario en modo texto genere una excepción en " +"lugar de producir datos sin sentido." #: ../Doc/library/os.rst:142 msgid "" @@ -430,7 +424,6 @@ msgstr "" #: ../Doc/library/os.rst:4411 ../Doc/library/os.rst:4419 #: ../Doc/library/os.rst:4427 ../Doc/library/os.rst:4434 #: ../Doc/library/os.rst:4441 ../Doc/library/os.rst:4564 -#, fuzzy msgid ":ref:`Availability `: Unix, not WASI." msgstr ":ref:`Disponibilidad `: Unix, no WASI." @@ -486,6 +479,9 @@ msgid "" "getting, setting, or deleting an item. For example, ``environ['monty'] = " "'python'`` maps the key ``'MONTY'`` to the value ``'python'``." msgstr "" +"En Windows, las claves se convierten a mayúsculas. Esto también se aplica al " +"obtener, configurar o eliminar un elemento. Por ejemplo, ``environ['monty'] " +"= 'python'`` asigna a la clave ``'MONTY'`` el valor ``'python'``." #: ../Doc/library/os.rst:211 msgid "" @@ -496,14 +492,13 @@ msgstr "" "que es mejor modificar :data:`os.environ`." #: ../Doc/library/os.rst:216 -#, fuzzy msgid "" "On some platforms, including FreeBSD and macOS, setting ``environ`` may " "cause memory leaks. Refer to the system documentation for :c:func:`!putenv`." msgstr "" "En algunas plataformas, incluidas FreeBSD y macOS, configurar ``environ`` " "puede provocar pérdidas de memoria. Consulte la documentación del sistema " -"para :c:func:`putenv`." +"para :c:func:`!putenv`." #: ../Doc/library/os.rst:220 msgid "" @@ -537,13 +532,12 @@ msgstr "" "(modificando :data:`environb` actualiza :data:`environ`, y viceversa)." #: ../Doc/library/os.rst:236 -#, fuzzy msgid "" ":data:`environb` is only available if :const:`supports_bytes_environ` is " "``True``." msgstr "" -":data:`environb` está disponible sólo si :data:`supports_bytes_environ` está " -"establecido en ``True``." +":data:`environb` está disponible sólo si :const:`supports_bytes_environ` " +"está establecido en ``True``." #: ../Doc/library/os.rst:250 msgid "These functions are described in :ref:`os-file-dir`." @@ -651,7 +645,6 @@ msgstr "" #: ../Doc/library/os.rst:3456 ../Doc/library/os.rst:3493 #: ../Doc/library/os.rst:4322 ../Doc/library/os.rst:4871 #: ../Doc/library/os.rst:4882 ../Doc/library/os.rst:4999 -#, fuzzy msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`Disponibilidad `: Unix, Windows." @@ -670,12 +663,11 @@ msgstr "" "función no refleje futuros cambios en el entorno." #: ../Doc/library/os.rst:334 -#, fuzzy msgid "" ":func:`getenvb` is only available if :const:`supports_bytes_environ` is " "``True``." msgstr "" -":func:`getenvb` está disponible sólo si :data:`supports_bytes_environ` está " +":func:`getenvb` está disponible sólo si :const:`supports_bytes_environ` está " "establecido en ``True``." #: ../Doc/library/os.rst:337 ../Doc/library/os.rst:376 @@ -694,7 +686,6 @@ msgstr "" #: ../Doc/library/os.rst:5496 ../Doc/library/os.rst:5505 #: ../Doc/library/os.rst:5529 ../Doc/library/os.rst:5556 #: ../Doc/library/os.rst:5565 -#, fuzzy msgid ":ref:`Availability `: Unix." msgstr ":ref:`Disponibilidad `: Unix." @@ -733,13 +724,12 @@ msgstr "" #: ../Doc/library/os.rst:378 ../Doc/library/os.rst:451 #: ../Doc/library/os.rst:535 ../Doc/library/os.rst:758 -#, fuzzy msgid "" "The function is a stub on WASI, see :ref:`wasm-availability` for more " "information." msgstr "" -"La función es un código auxiliar en Emscripten y WASI, consulte :ref:`wasm-" -"availability` para obtener más información." +"La función es un \"stub\" de WASI, consulte :ref:`wasm-availability` para " +"obtener más información." #: ../Doc/library/os.rst:384 msgid "" @@ -761,7 +751,6 @@ msgstr "" "actual." #: ../Doc/library/os.rst:402 -#, fuzzy msgid "" "On macOS, :func:`getgroups` behavior differs somewhat from other Unix " "platforms. If the Python interpreter was built with a deployment target of " @@ -777,20 +766,20 @@ msgid "" "`MACOSX_DEPLOYMENT_TARGET`, can be obtained with :func:`sysconfig." "get_config_var`." msgstr "" -"En macOS, el comportamiento de :func:`getgroups` difiere algo del de otras " -"plataformas Unix. Si el intérprete de Python se creó con un destino de " -"implementación de :const:`10.5` o anterior, :func:`getgroups` retorna la " -"lista de identificadores de grupo efectivos asociados con el proceso de " -"usuario actual; esta lista está limitada a un número de entradas definido " -"por el sistema, normalmente 16, y puede modificarse mediante llamadas a :" -"func:`setgroups` si tiene los privilegios adecuados. Si se construyó con un " -"objetivo de implementación mayor que :const:`10.5`, :func:`getgroups` " -"retorna la lista de acceso de grupo actual para el usuario asociado con el " -"ID de usuario efectivo del proceso; la lista de acceso de grupo puede " -"cambiar durante la vida útil del proceso, no se ve afectada por las llamadas " -"a :func:`setgroups` y su longitud no está limitada a 16. El valor de destino " -"de implementación, :const:`MACOSX_DEPLOYMENT_TARGET`, se puede obtener con :" -"func:`sysconfig.get_config_var`." +"En macOS, el comportamiento de :func:`getgroups` difiere un poco del de " +"otras plataformas Unix. Si el intérprete de Python se creó con un objetivo " +"de implementación ``10.5`` o anterior, :func:`getgroups` devuelve la lista " +"de identificadores de grupo efectivos asociados con el proceso de usuario " +"actual; esta lista está limitada a una cantidad de entradas definida por el " +"sistema, normalmente 16, y puede modificarse mediante llamadas a :func:" +"`setgroups` si se cuenta con los privilegios adecuados. Si se creó con un " +"objetivo de implementación mayor que ``10.5``, :func:`getgroups` devuelve la " +"lista de acceso de grupo actual para el usuario asociado con el " +"identificador de usuario efectivo del proceso; la lista de acceso de grupo " +"puede cambiar durante la vida útil del proceso, no se ve afectada por las " +"llamadas a :func:`setgroups` y su longitud no está limitada a 16. El valor " +"del objetivo de implementación, :const:`MACOSX_DEPLOYMENT_TARGET`, se puede " +"obtener con :func:`sysconfig.get_config_var`." #: ../Doc/library/os.rst:419 msgid "" @@ -808,10 +797,8 @@ msgstr "" "sesión del ID de usuario real actual." #: ../Doc/library/os.rst:426 ../Doc/library/os.rst:462 -#, fuzzy msgid ":ref:`Availability `: Unix, Windows, not WASI." -msgstr "" -":ref:`Disponibilidad `: Unix, Windows, no Emscripten, no WASI." +msgstr ":ref:`Disponibilidad `: Unix, Windows, no WASI." #: ../Doc/library/os.rst:431 msgid "" @@ -870,9 +857,8 @@ msgstr "" "Parámetros para las funciones :func:`getpriority` y :func:`setpriority`." #: ../Doc/library/os.rst:503 -#, fuzzy msgid ":ref:`Availability `: macOS" -msgstr ":ref:`Disponibilidad `: Windows." +msgstr ":ref:`Disponibilidad `: macOS" #: ../Doc/library/os.rst:509 msgid "" @@ -909,9 +895,8 @@ msgstr "" #: ../Doc/library/os.rst:687 ../Doc/library/os.rst:694 #: ../Doc/library/os.rst:703 ../Doc/library/os.rst:712 #: ../Doc/library/os.rst:735 ../Doc/library/os.rst:2181 -#, fuzzy msgid ":ref:`Availability `: Unix, not WASI, not Android." -msgstr ":ref:`Disponibilidad `: Unix, no WASI." +msgstr ":ref:`Disponibilidad `: Unix, no WASI, no Android." #: ../Doc/library/os.rst:554 msgid "" @@ -941,14 +926,13 @@ msgstr "" "implementaciones." #: ../Doc/library/os.rst:566 -#, fuzzy msgid "" "On some platforms, including FreeBSD and macOS, setting ``environ`` may " "cause memory leaks. Refer to the system documentation for :c:func:`!putenv`." msgstr "" -"En algunas plataformas, incluidas FreeBSD y macOS, configurar ``environ`` " -"puede provocar pérdidas de memoria. Consulte la documentación del sistema " -"para :c:func:`putenv`." +"En algunas plataformas, incluidas FreeBSD y macOS, la configuración de " +"``environ`` puede provocar pérdidas de memoria. Consulta la documentación " +"del sistema para obtener información sobre :c:func:`!putenv`." #: ../Doc/library/os.rst:569 msgid "" @@ -1003,6 +987,9 @@ msgid "" "Reassociate the current thread with a Linux namespace. See the :manpage:" "`setns(2)` and :manpage:`namespaces(7)` man pages for more details." msgstr "" +"Reasociar el hilo actual con un espacio de nombres de Linux. Consulta las " +"páginas del manual :manpage:`setns(2)` y :manpage:`namespaces(7)` para " +"obtener más detalles." #: ../Doc/library/os.rst:615 msgid "" @@ -1012,6 +999,11 @@ msgid "" "clone-flags>` to impose constraints on the operation (``0`` means no " "constraints)." msgstr "" +"Si *fd* hace referencia a un enlace :file:`/proc/{pid}/ns/`, ``setns()`` " +"reasocia el hilo que llama con el espacio de nombres asociado con ese " +"enlace, y *nstype* puede configurarse en uno de los :ref:`CLONE_NEW* " +"constants ` para imponer restricciones a la " +"operación (``0`` significa sin restricciones)." #: ../Doc/library/os.rst:622 msgid "" @@ -1023,18 +1015,31 @@ msgid "" "flags>`, e.g. ``setns(fd, os.CLONE_NEWUTS | os.CLONE_NEWPID)``. The caller's " "memberships in unspecified namespaces are left unchanged." msgstr "" +"Desde Linux 5.8, *fd* puede hacer referencia a un descriptor de archivo PID " +"obtenido de :func:`~os.pidfd_open`. En este caso, ``setns()`` reasocia el " +"subproceso que realiza la llamada en uno o más de los mismos espacios de " +"nombres que el subproceso al que hace referencia *fd*. Esto está sujeto a " +"las restricciones impuestas por *nstype*, que es una máscara de bits que " +"combina uno o más de los :ref:`CLONE_NEW* constants `, por ejemplo, ``setns(fd, os.CLONE_NEWUTS | os.CLONE_NEWPID)``. Las " +"pertenencias del autor de la llamada a espacios de nombres no especificados " +"no se modifican." #: ../Doc/library/os.rst:631 msgid "" "*fd* can be any object with a :meth:`~io.IOBase.fileno` method, or a raw " "file descriptor." msgstr "" +"*fd* puede ser cualquier objeto con un método :meth:`~io.IOBase.fileno` o un " +"descriptor de archivo sin formato." #: ../Doc/library/os.rst:633 msgid "" "This example reassociates the thread with the ``init`` process's network " "namespace::" msgstr "" +"Este ejemplo reasocia el hilo con el espacio de nombres de red del proceso " +"``init``:" #: ../Doc/library/os.rst:635 msgid "" @@ -1042,38 +1047,37 @@ msgid "" "os.setns(fd, os.CLONE_NEWNET)\n" "os.close(fd)" msgstr "" +"fd = os.open(\"/proc/1/ns/net\", os.O_RDONLY)\n" +"os.setns(fd, os.CLONE_NEWNET)\n" +"os.close(fd)" #: ../Doc/library/os.rst:639 -#, fuzzy msgid ":ref:`Availability `: Linux >= 3.0 with glibc >= 2.14." -msgstr ":ref:`Disponibilidad `: Linux >= 3.17 con glibc >= 2.27." +msgstr ":ref:`Disponibilidad `: Linux >= 3.0 con glibc >= 2.14." #: ../Doc/library/os.rst:645 -#, fuzzy msgid "The :func:`~os.unshare` function." -msgstr "La función :func:`.stat`." +msgstr "La función :func:`~os.unshare`." #: ../Doc/library/os.rst:649 -#, fuzzy msgid "" "Call the system call :c:func:`!setpgrp` or ``setpgrp(0, 0)`` depending on " "which version is implemented (if any). See the Unix manual for the " "semantics." msgstr "" -"Invoca a la llamada de sistema :c:func:`setpgrp` o ``setpgrp(0, 0)`` " -"dependiendo de la versión que se implemente (si la hay). Vea el manual de " -"Unix para la semántica." +"Llama a la llamada del sistema :c:func:`!setpgrp` o ``setpgrp(0, 0)`` según " +"la versión implementada (si hay alguna). Consulte el manual de Unix para " +"conocer la semántica." #: ../Doc/library/os.rst:657 -#, fuzzy msgid "" "Call the system call :c:func:`!setpgid` to set the process group id of the " "process with id *pid* to the process group with id *pgrp*. See the Unix " "manual for the semantics." msgstr "" -"Invoca a la llamada de sistema :c:func:`setpgid` para establecer la " -"identificación del grupo de procesos del *id* del proceso como *pid* al " -"grupo de procesos con id *pgrp*. Vea el manual de Unix para la semántica." +"Llama a la llamada del sistema :c:func:`!setpgid` para establecer el ID del " +"grupo de procesos del proceso con el ID *pid* en el grupo de procesos con el " +"ID *pgrp*. Consulte el manual de Unix para conocer la semántica." #: ../Doc/library/os.rst:668 msgid "" @@ -1118,37 +1122,34 @@ msgid "Set the current process's real and effective user ids." msgstr "Establece los *ids* de usuario reales y efectivos del proceso actual." #: ../Doc/library/os.rst:717 -#, fuzzy msgid "" "Call the system call :c:func:`!getsid`. See the Unix manual for the " "semantics." msgstr "" -"Invoca a la llamada de sistema :c:func:`getsid`. Vea el manual de Unix para " -"la semántica." +"Llamar a la llamada del sistema :c:func:`!getsid`. Consultar el manual de " +"Unix para conocer la semántica." #: ../Doc/library/os.rst:724 -#, fuzzy msgid "" "Call the system call :c:func:`!setsid`. See the Unix manual for the " "semantics." msgstr "" -"Invoca a la llamada de sistema :c:func:`setsid`. Vea el manual de Unix para " -"la semántica." +"Llamar a la llamada del sistema :c:func:`!setsid`. Consultar el manual de " +"Unix para conocer la semántica." #: ../Doc/library/os.rst:733 msgid "Set the current process's user id." msgstr "Establece *id* del usuario del proceso actual." #: ../Doc/library/os.rst:741 -#, fuzzy msgid "" "Return the error message corresponding to the error code in *code*. On " "platforms where :c:func:`!strerror` returns ``NULL`` when given an unknown " "error number, :exc:`ValueError` is raised." msgstr "" -"Retorna el mensaje de error correspondiente al código de error en *code*. En " -"plataformas donde :c:func:`strerror` retorna ``NULL`` cuando se le da un " -"número de error desconocido lanza un :exc:`ValueError`." +"Devuelve el mensaje de error correspondiente al código de error en *code*. " +"En las plataformas donde :c:func:`!strerror` devuelve ``NULL`` cuando se le " +"asigna un número de error desconocido, se genera :exc:`ValueError`." #: ../Doc/library/os.rst:748 msgid "" @@ -1220,6 +1221,10 @@ msgid "" "uname` can be used to get the user-facing operating system name and version " "on iOS and Android." msgstr "" +"En macOS, iOS y Android, esto devuelve el nombre y la versión de *kernel* " +"(es decir, ``'Darwin'`` en macOS e iOS; ``'Linux'`` en Android). :func:" +"`platform.uname` se puede utilizar para obtener el nombre y la versión del " +"sistema operativo que ven los usuarios en iOS y Android." #: ../Doc/library/os.rst:794 ../Doc/library/os.rst:5001 msgid "" @@ -1263,7 +1268,7 @@ msgstr "" msgid "The function is now always available and is also available on Windows." msgstr "" "Estas funciones se encuentra ahora siempre disponible y también esta " -"disponible en Windows" +"disponible en Windows." #: ../Doc/library/os.rst:820 msgid "" @@ -1275,16 +1280,22 @@ msgid "" "and moved to a new namespace. If the *flags* argument is ``0``, no changes " "are made to the calling process's execution context." msgstr "" +"Desasociar partes del contexto de ejecución del proceso y moverlas a un " +"nuevo espacio de nombres creado. Consulte la página del manual :manpage:" +"`unshare(2)` para obtener más detalles. El argumento *flags* es una máscara " +"de bits que combina cero o más de los :ref:`CLONE_* constants ` y que especifica qué partes del contexto de ejecución deben " +"dejar de compartirse de sus asociaciones existentes y moverse a un nuevo " +"espacio de nombres. Si el argumento *flags* es ``0``, no se realizan cambios " +"en el contexto de ejecución del proceso que realiza la llamada." #: ../Doc/library/os.rst:831 -#, fuzzy msgid ":ref:`Availability `: Linux >= 2.6.16." -msgstr ":ref:`Disponibilidad `: Linux >= 4.16." +msgstr ":ref:`Disponibilidad `: Linux >=2.6.16." #: ../Doc/library/os.rst:837 -#, fuzzy msgid "The :func:`~os.setns` function." -msgstr "La función :func:`.stat`." +msgstr "La función :func:`~os.setns`." #: ../Doc/library/os.rst:841 msgid "" @@ -1292,6 +1303,9 @@ msgid "" "See :manpage:`unshare(2)` in the Linux manual for their exact effect and " "availability." msgstr "" +"Indicadores de la función :func:`unshare`, si la implementación los admite. " +"Consulte :manpage:`unshare(2)` en el manual de Linux para conocer su efecto " +"exacto y su disponibilidad." #: ../Doc/library/os.rst:864 msgid "File Object Creation" @@ -1392,22 +1406,23 @@ msgid "" " except OSError:\n" " pass" msgstr "" +"for fd in range(fd_low, fd_high):\n" +" try:\n" +" os.close(fd)\n" +" except OSError:\n" +" pass" #: ../Doc/library/os.rst:924 -#, fuzzy msgid "" "Copy *count* bytes from file descriptor *src*, starting from offset " "*offset_src*, to file descriptor *dst*, starting from offset *offset_dst*. " "If *offset_src* is ``None``, then *src* is read from the current position; " "respectively for *offset_dst*." msgstr "" -"Copia *count* bytes del descriptor de archivo *src*, comenzando desde offset " -"*offset_src*, al descriptor de archivo *dst*, comenzando desde offset " -"*offset_dst*. Si *offset_src* es None, entonces *src* se lee desde la " -"posición actual; respectivamente para *offset_dst*. Los archivos señalados " -"por *src* y *dst* deben estar en el mismo sistema de archivos; de lo " -"contrario, se genera una :exc:`OSError` con :attr:`~OSError.errno` " -"establecido en :data:`errno.EXDEV`." +"Copiar bytes *count* desde el descriptor de archivo *src*, comenzando desde " +"el desplazamiento *offset_src*, al descriptor de archivo *dst*, comenzando " +"desde el desplazamiento *offset_dst*. Si *offset_src* es ``None``, entonces " +"*src* se lee desde la posición actual; respectivamente para *offset_dst*." #: ../Doc/library/os.rst:929 msgid "" @@ -1415,9 +1430,12 @@ msgid "" "reside in the same filesystem, otherwise an :exc:`OSError` is raised with :" "attr:`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" +"En un kernel de Linux anterior a 5.3, los archivos a los que apuntan *src* y " +"*dst* deben residir en el mismo sistema de archivos; de lo contrario, se " +"genera un :exc:`OSError` con :attr:`~OSError.errno` establecido en :const:" +"`errno.EXDEV`." #: ../Doc/library/os.rst:933 -#, fuzzy msgid "" "This copy is done without the additional cost of transferring data from the " "kernel to user space and then back into the kernel. Additionally, some " @@ -1427,15 +1445,20 @@ msgid "" "(in the case of NFS)." msgstr "" "Esta copia se realiza sin el costo adicional de transferir datos desde el " -"kernel al espacio del usuario y luego nuevamente al kernel. También, algunos " -"sistemas de archivos podrían implementar optimizaciones adicionales. La " -"copia se realiza como si ambos archivos se abrieran como binarios." +"núcleo al espacio de usuario y luego de vuelta al núcleo. Además, algunos " +"sistemas de archivos podrían implementar optimizaciones adicionales, como el " +"uso de enlaces de referencia (es decir, dos o más inodos que comparten " +"punteros a los mismos bloques de disco de copia en escritura; los sistemas " +"de archivos compatibles incluyen btrfs y XFS) y copia del lado del servidor " +"(en el caso de NFS)." #: ../Doc/library/os.rst:940 msgid "" "The function copies bytes between two file descriptors. Text options, like " "the encoding and the line ending, are ignored." msgstr "" +"La función copia bytes entre dos descriptores de archivo. Las opciones de " +"texto, como la codificación y el final de línea, se ignoran." #: ../Doc/library/os.rst:943 msgid "" @@ -1452,9 +1475,12 @@ msgid "" "always copy no bytes and return 0 as if the file was empty because of a " "known Linux kernel issue." msgstr "" +"En Linux, no se debe utilizar :func:`os.copy_file_range` para copiar un " +"rango de un pseudoarchivo desde un sistema de archivos especial como procfs " +"y sysfs. Siempre no copiará ningún byte y devolverá 0 como si el archivo " +"estuviera vacío debido a un problema conocido del kernel de Linux." #: ../Doc/library/os.rst:953 -#, fuzzy msgid ":ref:`Availability `: Linux >= 4.5 with glibc >= 2.27." msgstr ":ref:`Disponibilidad `: Linux >= 4.5 con glibc >= 2.27." @@ -1495,7 +1521,6 @@ msgstr "" "el nuevo descriptor de archivo es :ref:`heredable `." #: ../Doc/library/os.rst:979 ../Doc/library/os.rst:992 -#, fuzzy msgid ":ref:`Availability `: not WASI." msgstr ":ref:`Disponibilidad `: no WASI." @@ -1546,18 +1571,16 @@ msgstr "" #: ../Doc/library/os.rst:1120 ../Doc/library/os.rst:1705 #: ../Doc/library/os.rst:2133 ../Doc/library/os.rst:2166 #: ../Doc/library/os.rst:3458 -#, fuzzy msgid "" "The function is limited on WASI, see :ref:`wasm-availability` for more " "information." msgstr "" -"La función está limitada en Emscripten y WASI, consulte :ref:`wasm-" -"availability` para obtener más información." +"La función está limitada en WASI, consulte :ref:`wasm-availability` para " +"obtener más información." #: ../Doc/library/os.rst:1014 ../Doc/library/os.rst:2244 -#, fuzzy msgid "Added support on Windows." -msgstr "Se agregó soporte para Windows." +msgstr "Se agregó soporte en Windows." #: ../Doc/library/os.rst:1020 msgid "" @@ -1654,15 +1677,14 @@ msgstr "" "de Python 3.3, esto es equivalente a ``os.statvfs(fd)``." #: ../Doc/library/os.rst:1087 -#, fuzzy msgid "" "Force write of file with filedescriptor *fd* to disk. On Unix, this calls " "the native :c:func:`!fsync` function; on Windows, the MS :c:func:`!_commit` " "function." msgstr "" -"Fuerza la escritura del archivo con el descriptor de archivo *fd* en el " -"disco. En Unix, esto llama a la función nativa :c:func:`fsync`; en Windows, " -"la función MS :c:func:`_commit`." +"Fuerza la escritura de un archivo con el descriptor de archivo *fd* en el " +"disco. En Unix, esto llama a la función :c:func:`!fsync` nativa; en Windows, " +"a la función :c:func:`!_commit` de MS." #: ../Doc/library/os.rst:1090 msgid "" @@ -1712,12 +1734,11 @@ msgstr "" #: ../Doc/library/os.rst:1123 ../Doc/library/os.rst:1708 msgid "On Windows, this function is limited to pipes." -msgstr "" +msgstr "En Windows, esta función está limitada a las tuberías." #: ../Doc/library/os.rst:1127 ../Doc/library/os.rst:1712 -#, fuzzy msgid "Added support for pipes on Windows." -msgstr "Se agregó soporte para Windows." +msgstr "Se agregó soporte para pipes en Windows." #: ../Doc/library/os.rst:1133 msgid "" @@ -1725,10 +1746,13 @@ msgid "" "pseudo-terminal device to which the file descriptor *fd* refers. The file " "descriptor *fd* is not closed upon failure." msgstr "" +"Otorgar acceso al dispositivo pseudoterminal esclavo asociado con el " +"dispositivo pseudoterminal maestro al que hace referencia el descriptor de " +"archivo *fd*. El descriptor de archivo *fd* no se cierra en caso de falla." #: ../Doc/library/os.rst:1137 msgid "Calls the C standard library function :c:func:`grantpt`." -msgstr "" +msgstr "Llama a la función de la biblioteca estándar C :c:func:`grantpt`." #: ../Doc/library/os.rst:1146 msgid "" @@ -1779,34 +1803,47 @@ msgid "" "by *whence*, and return the new position in bytes relative to the start of " "the file. Valid values for *whence* are:" msgstr "" +"Establece la posición actual del descriptor de archivo *fd* en la posición " +"*pos*, modificada por *whence*, y devuelve la nueva posición en bytes con " +"respecto al inicio del archivo. Los valores válidos para *whence* son:" #: ../Doc/library/os.rst:1195 msgid "" ":const:`SEEK_SET` or ``0`` -- set *pos* relative to the beginning of the file" msgstr "" +":const:`SEEK_SET` o ``0``: establece *pos* en relación con el comienzo del " +"archivo" #: ../Doc/library/os.rst:1196 msgid "" ":const:`SEEK_CUR` or ``1`` -- set *pos* relative to the current file position" msgstr "" +":const:`SEEK_CUR` o ``1``: establece *pos* en relación con la posición " +"actual del archivo" #: ../Doc/library/os.rst:1197 msgid ":const:`SEEK_END` or ``2`` -- set *pos* relative to the end of the file" msgstr "" +":const:`SEEK_END` o ``2``: establece *pos* en relación con el final del " +"archivo" #: ../Doc/library/os.rst:1198 msgid "" ":const:`SEEK_HOLE` -- set *pos* to the next data location, relative to *pos*" msgstr "" +":const:`SEEK_HOLE`: establece *pos* en la siguiente ubicación de datos, " +"relativa a *pos*" #: ../Doc/library/os.rst:1199 msgid "" ":const:`SEEK_DATA` -- set *pos* to the next data hole, relative to *pos*" msgstr "" +":const:`SEEK_DATA`: establece *pos* en el siguiente agujero de datos, " +"relativo a *pos*" #: ../Doc/library/os.rst:1203 msgid "Add support for :const:`!SEEK_HOLE` and :const:`!SEEK_DATA`." -msgstr "" +msgstr "Añadir soporte para :const:`!SEEK_HOLE` y :const:`!SEEK_DATA`." #: ../Doc/library/os.rst:1210 msgid "" @@ -1814,37 +1851,40 @@ msgid "" "method on :term:`file-like objects `, for whence to adjust the " "file position indicator." msgstr "" +"Parámetros de la función :func:`lseek` y del método :meth:`~io.IOBase.seek` " +"en :term:`file-like objects `, para desde donde ajustar el " +"indicador de posición del archivo." #: ../Doc/library/os.rst:1214 msgid ":const:`SEEK_SET`" -msgstr "" +msgstr ":const:`SEEK_SET`" #: ../Doc/library/os.rst:1215 msgid "Adjust the file position relative to the beginning of the file." msgstr "" +"Ajuste la posición del archivo en relación con el comienzo del archivo." #: ../Doc/library/os.rst:1216 msgid ":const:`SEEK_CUR`" -msgstr "" +msgstr ":const:`SEEK_CUR`" #: ../Doc/library/os.rst:1217 msgid "Adjust the file position relative to the current file position." msgstr "" +"Ajuste la posición del archivo en relación con la posición del archivo " +"actual." #: ../Doc/library/os.rst:1219 msgid ":const:`SEEK_END`" -msgstr "" +msgstr ":const:`SEEK_END`" #: ../Doc/library/os.rst:1219 msgid "Adjust the file position relative to the end of the file." -msgstr "" +msgstr "Ajuste la posición del archivo en relación con el final del archivo." #: ../Doc/library/os.rst:1221 -#, fuzzy msgid "Their values are 0, 1, and 2, respectively." -msgstr "" -"Parámetros para la función :func:`lseek`. Sus valores son 0, 1 y 2, " -"respectivamente." +msgstr "Sus valores son 0, 1 y 2, respectivamente." #: ../Doc/library/os.rst:1227 msgid "" @@ -1852,37 +1892,44 @@ msgid "" "method on :term:`file-like objects `, for seeking file data and " "holes on sparsely allocated files." msgstr "" +"Parámetros de la función :func:`lseek` y del método :meth:`~io.IOBase.seek` " +"en :term:`file-like objects `, para buscar datos de archivos y " +"agujeros en archivos escasamente asignados." #: ../Doc/library/os.rst:1233 -#, fuzzy msgid ":data:`!SEEK_DATA`" -msgstr ":data:`RWF_NOWAIT`" +msgstr ":data:`!SEEK_DATA`" #: ../Doc/library/os.rst:1232 msgid "" "Adjust the file offset to the next location containing data, relative to the " "seek position." msgstr "" +"Ajuste el desplazamiento del archivo a la siguiente ubicación que contenga " +"datos, en relación con la posición de búsqueda." #: ../Doc/library/os.rst:1238 -#, fuzzy msgid ":data:`!SEEK_HOLE`" -msgstr ":data:`stat.UF_OPAQUE`" +msgstr ":data:`!SEEK_HOLE`" #: ../Doc/library/os.rst:1236 msgid "" "Adjust the file offset to the next location containing a hole, relative to " "the seek position. A hole is defined as a sequence of zeros." msgstr "" +"Ajuste el desplazamiento del archivo a la siguiente ubicación que contenga " +"un agujero, en relación con la posición de búsqueda. Un agujero se define " +"como una secuencia de ceros." #: ../Doc/library/os.rst:1242 msgid "These operations only make sense for filesystems that support them." msgstr "" +"Estas operaciones sólo tienen sentido para los sistemas de archivos que las " +"admiten." #: ../Doc/library/os.rst:1244 -#, fuzzy msgid ":ref:`Availability `: Linux >= 3.1, macOS, Unix" -msgstr ":ref:`Disponibilidad `: Linux >= 3.17." +msgstr ":ref:`Disponibilidad `: Linux >= 3.1, macOS, Unix" #: ../Doc/library/os.rst:1251 msgid "" @@ -2130,6 +2177,8 @@ msgstr "" #: ../Doc/library/os.rst:1453 msgid "Open and return a file descriptor for a master pseudo-terminal device." msgstr "" +"Abrir y devolver un descriptor de archivo para un dispositivo pseudo-" +"terminal maestro." #: ../Doc/library/os.rst:1455 msgid "" @@ -2137,6 +2186,10 @@ msgid "" "argument is used to set file status flags and file access modes as specified " "in the manual page of :c:func:`posix_openpt` of your system." msgstr "" +"Llama a la función de la biblioteca estándar de C :c:func:`posix_openpt`. El " +"argumento *oflag* se utiliza para establecer indicadores de estado de " +"archivo y modos de acceso a archivos, tal como se especifica en la página " +"del manual de :c:func:`posix_openpt` de su sistema." #: ../Doc/library/os.rst:1459 msgid "" @@ -2144,6 +2197,9 @@ msgid "" "the value :data:`O_CLOEXEC` is available on the system, it is added to " "*oflag*." msgstr "" +"El descriptor de archivo devuelto es :ref:`non-inheritable " +"`. Si el valor :data:`O_CLOEXEC` está disponible en el " +"sistema, se agrega a *oflag*." #: ../Doc/library/os.rst:1470 msgid "" @@ -2196,7 +2252,6 @@ msgid "Combine the functionality of :func:`os.readv` and :func:`os.pread`." msgstr "Combina la funcionalidad de :func:`os.readv` y :func:`os.pread`." #: ../Doc/library/os.rst:1489 ../Doc/library/os.rst:1574 -#, fuzzy msgid "" ":ref:`Availability `: Linux >= 2.6.30, FreeBSD >= 6.0, OpenBSD " ">= 2.7, AIX >= 7.1." @@ -2219,18 +2274,16 @@ msgstr "" "leer datos del almacenamiento de respaldo o esperar por un bloqueo." #: ../Doc/library/os.rst:1502 -#, fuzzy msgid "" "If some data was successfully read, it will return the number of bytes read. " "If no bytes were read, it will return ``-1`` and set errno to :const:`errno." "EAGAIN`." msgstr "" -"Si algunos datos se leyeron con éxito, retornará el número de bytes leídos. " -"Si no se leyeron bytes, retornará ``-1`` y establecerá errno en :data:`errno." -"EAGAIN`." +"Si se leyeron correctamente algunos datos, devolverá la cantidad de bytes " +"leídos. Si no se leyeron bytes, devolverá ``-1`` y establecerá errno en :" +"const:`errno.EAGAIN`." #: ../Doc/library/os.rst:1506 -#, fuzzy msgid ":ref:`Availability `: Linux >= 4.14." msgstr ":ref:`Disponibilidad `: Linux >= 4.14." @@ -2252,7 +2305,6 @@ msgstr "" "archivo abierto con el indicador :data:`O_DIRECT`." #: ../Doc/library/os.rst:1520 -#, fuzzy msgid ":ref:`Availability `: Linux >= 4.6." msgstr ":ref:`Disponibilidad `: Linux >= 4.6." @@ -2262,6 +2314,9 @@ msgid "" "master pseudo-terminal device to which the file descriptor *fd* refers. The " "file descriptor *fd* is not closed upon failure." msgstr "" +"Devuelve el nombre del dispositivo pseudoterminal esclavo asociado con el " +"dispositivo pseudoterminal maestro al que hace referencia el descriptor de " +"archivo *fd*. El descriptor de archivo *fd* no se cierra en caso de error." #: ../Doc/library/os.rst:1531 msgid "" @@ -2269,6 +2324,10 @@ msgid "" "available; otherwise, the C standard library function :c:func:`ptsname`, " "which is not guaranteed to be thread-safe, is called." msgstr "" +"Llama a la función de biblioteca estándar reentrante C :c:func:`ptsname_r` " +"si está disponible; de ​​lo contrario, se llama a la función de biblioteca " +"estándar C :c:func:`ptsname`, que no se garantiza que sea segura para " +"subprocesos." #: ../Doc/library/os.rst:1542 msgid "" @@ -2283,7 +2342,6 @@ msgid "Return the number of bytes actually written." msgstr "Retorna el número de bytes realmente escritos." #: ../Doc/library/os.rst:1554 -#, fuzzy msgid "" "Write the *buffers* contents to file descriptor *fd* at an offset *offset*, " "leaving the file offset unchanged. *buffers* must be a sequence of :term:" @@ -2291,12 +2349,11 @@ msgid "" "order. Entire contents of the first buffer is written before proceeding to " "the second, and so on." msgstr "" -"Escribe los contenidos de los *buffers* en el descriptor de archivo *fd* en " -"un desplazamiento *offset*, dejando el desplazamiento del archivo sin " -"cambios. *buffers* deben ser una secuencia de :term:`objetos tipo bytes " -"`. Los búferes se procesan en orden secuencial. Se " -"escribe todo el contenido del primer búfer antes de pasar al segundo, y así " -"sucesivamente." +"Escribe el contenido de *buffers* en el descriptor de archivo *fd* en un " +"desplazamiento *offset*, sin modificar el desplazamiento del archivo. " +"*buffers* debe ser una secuencia de :term:`bytes-like objects `. Los búferes se procesan en orden de matriz. Se escribe todo el " +"contenido del primer búfer antes de pasar al segundo, y así sucesivamente." #: ../Doc/library/os.rst:1563 msgid ":data:`RWF_DSYNC`" @@ -2328,9 +2385,8 @@ msgstr "" "por la llamada al sistema." #: ../Doc/library/os.rst:1586 ../Doc/library/os.rst:1596 -#, fuzzy msgid ":ref:`Availability `: Linux >= 4.7." -msgstr ":ref:`Disponibilidad `: Linux > 4.7." +msgstr ":ref:`Disponibilidad `: Linux >= 4.7." #: ../Doc/library/os.rst:1593 msgid "" @@ -2358,7 +2414,6 @@ msgstr "" "*offset* es ``-1``, se actualiza el *offset* actual del archivo." #: ../Doc/library/os.rst:1610 -#, fuzzy msgid ":ref:`Availability `: Linux >= 4.16." msgstr ":ref:`Disponibilidad `: Linux >= 4.16." @@ -2487,7 +2542,6 @@ msgstr "" "Consulte también :func:`get_blocking` y :meth:`socket.socket.setblocking`." #: ../Doc/library/os.rst:1718 -#, fuzzy msgid "" "Transfer *count* bytes from file descriptor *src*, starting from offset " "*offset_src*, to file descriptor *dst*, starting from offset *offset_dst*. " @@ -2498,16 +2552,16 @@ msgid "" "in the same filesystem, otherwise an :exc:`OSError` is raised with :attr:" "`~OSError.errno` set to :const:`errno.EXDEV`." msgstr "" -"Transfiera *count* bytes desde el descriptor de archivo *src*, comenzando " -"desde el desplazamiento *offset_src*, al descriptor de archivo *dst*, " -"comenzando desde el desplazamiento *offset_dst*. Al menos uno de los " +"Transfiere los bytes *count* desde el descriptor de archivo *src*, " +"comenzando desde el desplazamiento *offset_src*, al descriptor de archivo " +"*dst*, comenzando desde el desplazamiento *offset_dst*. Al menos uno de los " "descriptores de archivo debe hacer referencia a una tubería. Si *offset_src* " -"es None, entonces *src* se lee desde la posición actual; respectivamente " +"es ``None``, entonces *src* se lee desde la posición actual; respectivamente " "para *offset_dst*. El desplazamiento asociado al descriptor de archivo que " -"hace referencia a una tubería debe ser ``None``. Los archivos señalados por " -"*src* y *dst* deben residir en el mismo sistema de archivos; de lo " +"hace referencia a una tubería debe ser ``None``. Los archivos a los que " +"apuntan *src* y *dst* deben residir en el mismo sistema de archivos; de lo " "contrario, se genera un :exc:`OSError` con :attr:`~OSError.errno` " -"configurado en :data:`errno.EXDEV`." +"establecido en :const:`errno.EXDEV`." #: ../Doc/library/os.rst:1727 msgid "" @@ -2536,10 +2590,8 @@ msgstr "" "al extremo de escritura de la tubería." #: ../Doc/library/os.rst:1738 -#, fuzzy msgid ":ref:`Availability `: Linux >= 2.6.17 with glibc >= 2.5" -msgstr "" -":ref:`Disponibilidad `: Linux >= 2.6.17 con glibc >= 2.5." +msgstr ":ref:`Disponibilidad `: Linux >= 2.6.17 con glibc >= 2.5" #: ../Doc/library/os.rst:1751 msgid "" @@ -2585,10 +2637,13 @@ msgid "" "terminal device to which the file descriptor *fd* refers. The file " "descriptor *fd* is not closed upon failure." msgstr "" +"Desbloquee el dispositivo pseudoterminal esclavo asociado con el dispositivo " +"pseudoterminal maestro al que hace referencia el descriptor de archivo *fd*. " +"El descriptor de archivo *fd* no se cierra en caso de falla." #: ../Doc/library/os.rst:1798 msgid "Calls the C standard library function :c:func:`unlockpt`." -msgstr "" +msgstr "Llama a la función de la biblioteca estándar C :c:func:`unlockpt`." #: ../Doc/library/os.rst:1807 msgid "Write the bytestring in *str* to file descriptor *fd*." @@ -2720,11 +2775,10 @@ msgstr "" "heredables sólo se heredan si el parámetro *close_fds* es ``False``." #: ../Doc/library/os.rst:1901 -#, fuzzy msgid "On WebAssembly platforms, the file descriptor cannot be modified." msgstr "" -"En las plataformas WebAssembly ``wasm32-emscripten`` y ``wasm32-wasi``, el " -"descriptor de archivo no se puede modificar." +"En las plataformas WebAssembly, el descriptor de archivo no se puede " +"modificar." #: ../Doc/library/os.rst:1905 msgid "" @@ -2926,6 +2980,10 @@ msgid "" " return fp.read()\n" "return \"some default data\"" msgstr "" +"if os.access(\"myfile\", os.R_OK):\n" +" with open(\"myfile\") as fp:\n" +" return fp.read()\n" +"return \"some default data\"" #: ../Doc/library/os.rst:2010 msgid "is better written as::" @@ -2941,6 +2999,13 @@ msgid "" " with fp:\n" " return fp.read()" msgstr "" +"try:\n" +" fp = open(\"myfile\")\n" +"except PermissionError:\n" +" return \"some default data\"\n" +"else:\n" +" with fp:\n" +" return fp.read()" #: ../Doc/library/os.rst:2022 msgid "" @@ -3015,64 +3080,52 @@ msgstr "" "el módulo :mod:`stat`):" #: ../Doc/library/os.rst:2070 -#, fuzzy msgid ":const:`stat.UF_NODUMP`" -msgstr ":data:`stat.UF_NODUMP`" +msgstr ":const:`stat.UF_NODUMP`" #: ../Doc/library/os.rst:2071 -#, fuzzy msgid ":const:`stat.UF_IMMUTABLE`" -msgstr ":data:`stat.UF_IMMUTABLE`" +msgstr ":const:`stat.UF_IMMUTABLE`" #: ../Doc/library/os.rst:2072 -#, fuzzy msgid ":const:`stat.UF_APPEND`" -msgstr ":data:`stat.UF_APPEND`" +msgstr ":const:`stat.UF_APPEND`" #: ../Doc/library/os.rst:2073 -#, fuzzy msgid ":const:`stat.UF_OPAQUE`" -msgstr ":data:`stat.UF_OPAQUE`" +msgstr ":const:`stat.UF_OPAQUE`" #: ../Doc/library/os.rst:2074 -#, fuzzy msgid ":const:`stat.UF_NOUNLINK`" -msgstr ":data:`stat.UF_NOUNLINK`" +msgstr ":const:`stat.UF_NOUNLINK`" #: ../Doc/library/os.rst:2075 -#, fuzzy msgid ":const:`stat.UF_COMPRESSED`" -msgstr ":data:`stat.UF_COMPRESSED`" +msgstr ":const:`stat.UF_COMPRESSED`" #: ../Doc/library/os.rst:2076 -#, fuzzy msgid ":const:`stat.UF_HIDDEN`" -msgstr ":data:`stat.UF_HIDDEN`" +msgstr ":const:`stat.UF_HIDDEN`" #: ../Doc/library/os.rst:2077 -#, fuzzy msgid ":const:`stat.SF_ARCHIVED`" -msgstr ":data:`stat.SF_ARCHIVED`" +msgstr ":const:`stat.SF_ARCHIVED`" #: ../Doc/library/os.rst:2078 -#, fuzzy msgid ":const:`stat.SF_IMMUTABLE`" -msgstr ":data:`stat.SF_IMMUTABLE`" +msgstr ":const:`stat.SF_IMMUTABLE`" #: ../Doc/library/os.rst:2079 -#, fuzzy msgid ":const:`stat.SF_APPEND`" -msgstr ":data:`stat.SF_APPEND`" +msgstr ":const:`stat.SF_APPEND`" #: ../Doc/library/os.rst:2080 -#, fuzzy msgid ":const:`stat.SF_NOUNLINK`" -msgstr ":data:`stat.SF_NOUNLINK`" +msgstr ":const:`stat.SF_NOUNLINK`" #: ../Doc/library/os.rst:2081 -#, fuzzy msgid ":const:`stat.SF_SNAPSHOT`" -msgstr ":data:`stat.SF_SNAPSHOT`" +msgstr ":const:`stat.SF_SNAPSHOT`" #: ../Doc/library/os.rst:2083 msgid "" @@ -3090,9 +3143,8 @@ msgstr "" "``path``, ``flags``." #: ../Doc/library/os.rst:2089 -#, fuzzy msgid "Added the *follow_symlinks* parameter." -msgstr "El argumento *follow_symlinks*." +msgstr "Se agregó el argumento *follow_symlinks*." #: ../Doc/library/os.rst:2098 msgid "" @@ -3105,99 +3157,80 @@ msgstr "" "combinaciones OR de bit a bit de ellos:" #: ../Doc/library/os.rst:2102 -#, fuzzy msgid ":const:`stat.S_ISUID`" -msgstr ":data:`stat.S_ISUID`" +msgstr ":const:`stat.S_ISUID`" #: ../Doc/library/os.rst:2103 -#, fuzzy msgid ":const:`stat.S_ISGID`" -msgstr ":data:`stat.S_ISGID`" +msgstr ":const:`stat.S_ISGID`" #: ../Doc/library/os.rst:2104 -#, fuzzy msgid ":const:`stat.S_ENFMT`" -msgstr ":data:`stat.S_ENFMT`" +msgstr ":const:`stat.S_ENFMT`" #: ../Doc/library/os.rst:2105 -#, fuzzy msgid ":const:`stat.S_ISVTX`" -msgstr ":data:`stat.S_ISVTX`" +msgstr ":const:`stat.S_ISVTX`" #: ../Doc/library/os.rst:2106 -#, fuzzy msgid ":const:`stat.S_IREAD`" -msgstr ":data:`stat.S_IREAD`" +msgstr ":const:`stat.S_IREAD`" #: ../Doc/library/os.rst:2107 -#, fuzzy msgid ":const:`stat.S_IWRITE`" -msgstr ":data:`stat.S_IWRITE`" +msgstr ":const:`stat.S_IWRITE`" #: ../Doc/library/os.rst:2108 -#, fuzzy msgid ":const:`stat.S_IEXEC`" -msgstr ":data:`stat.S_IEXEC`" +msgstr ":const:`stat.S_IEXEC`" #: ../Doc/library/os.rst:2109 -#, fuzzy msgid ":const:`stat.S_IRWXU`" -msgstr ":data:`stat.S_IRWXU`" +msgstr ":const:`stat.S_IRWXU`" #: ../Doc/library/os.rst:2110 -#, fuzzy msgid ":const:`stat.S_IRUSR`" -msgstr ":data:`stat.S_IRUSR`" +msgstr ":const:`stat.S_IRUSR`" #: ../Doc/library/os.rst:2111 -#, fuzzy msgid ":const:`stat.S_IWUSR`" -msgstr ":data:`stat.S_IWUSR`" +msgstr ":const:`stat.S_IWUSR`" #: ../Doc/library/os.rst:2112 -#, fuzzy msgid ":const:`stat.S_IXUSR`" -msgstr ":data:`stat.S_IXUSR`" +msgstr ":const:`stat.S_IXUSR`" #: ../Doc/library/os.rst:2113 -#, fuzzy msgid ":const:`stat.S_IRWXG`" -msgstr ":data:`stat.S_IRWXG`" +msgstr ":const:`stat.S_IRWXG`" #: ../Doc/library/os.rst:2114 -#, fuzzy msgid ":const:`stat.S_IRGRP`" -msgstr ":data:`stat.S_IRGRP`" +msgstr ":const:`stat.S_IRGRP`" #: ../Doc/library/os.rst:2115 -#, fuzzy msgid ":const:`stat.S_IWGRP`" -msgstr ":data:`stat.S_IWGRP`" +msgstr ":const:`stat.S_IWGRP`" #: ../Doc/library/os.rst:2116 -#, fuzzy msgid ":const:`stat.S_IXGRP`" -msgstr ":data:`stat.S_IXGRP`" +msgstr ":const:`stat.S_IXGRP`" #: ../Doc/library/os.rst:2117 -#, fuzzy msgid ":const:`stat.S_IRWXO`" -msgstr ":data:`stat.S_IRWXO`" +msgstr ":const:`stat.S_IRWXO`" #: ../Doc/library/os.rst:2118 -#, fuzzy msgid ":const:`stat.S_IROTH`" -msgstr ":data:`stat.S_IROTH`" +msgstr ":const:`stat.S_IROTH`" #: ../Doc/library/os.rst:2119 -#, fuzzy msgid ":const:`stat.S_IWOTH`" -msgstr ":data:`stat.S_IWOTH`" +msgstr ":const:`stat.S_IWOTH`" #: ../Doc/library/os.rst:2120 -#, fuzzy msgid ":const:`stat.S_IXOTH`" -msgstr ":data:`stat.S_IXOTH`" +msgstr ":const:`stat.S_IXOTH`" #: ../Doc/library/os.rst:2122 ../Doc/library/os.rst:2155 #: ../Doc/library/os.rst:3546 @@ -3211,17 +3244,17 @@ msgstr "" "y :ref:`no seguir enlaces simbólicos `." #: ../Doc/library/os.rst:2128 -#, fuzzy msgid "" "Although Windows supports :func:`chmod`, you can only set the file's read-" "only flag with it (via the ``stat.S_IWRITE`` and ``stat.S_IREAD`` constants " "or a corresponding integer value). All other bits are ignored. The default " "value of *follow_symlinks* is ``False`` on Windows." msgstr "" -"Aunque Windows admite :func:`chmod`, sólo puede establecer el indicador de " -"sólo lectura del archivo (a través de las constantes ``stat.S_IWRITE`` y " -"``stat.S_IREAD`` o un valor entero correspondiente). Todos los demás bits " -"son ignorados." +"Aunque Windows admite :func:`chmod`, solo se puede configurar el indicador " +"de solo lectura del archivo con él (a través de las constantes ``stat." +"S_IWRITE`` y ``stat.S_IREAD`` o un valor entero correspondiente). Se ignoran " +"todos los demás bits. El valor predeterminado de *follow_symlinks* es " +"``False`` en Windows." #: ../Doc/library/os.rst:2138 ../Doc/library/os.rst:2169 msgid "" @@ -3232,13 +3265,12 @@ msgstr "" "abierto, y los argumentos *dir_fd* y *follow_symlinks*." #: ../Doc/library/os.rst:2145 -#, fuzzy msgid "" "Added support for a file descriptor and the *follow_symlinks* argument on " "Windows." msgstr "" -"Se agregó soporte para especificar *path* como un descriptor de archivo " -"abierto, y los argumentos *dir_fd* y *follow_symlinks*." +"Se agregó soporte para un descriptor de archivo y el argumento " +"*follow_symlinks* en Windows." #: ../Doc/library/os.rst:2152 msgid "" @@ -3322,14 +3354,16 @@ msgid "" "``lchmod()`` is not part of POSIX, but Unix implementations may have it if " "changing the mode of symbolic links is supported." msgstr "" +"``lchmod()`` no es parte de POSIX, pero las implementaciones de Unix pueden " +"tenerlo si se admite el cambio del modo de enlaces simbólicos." #: ../Doc/library/os.rst:2239 -#, fuzzy msgid "" ":ref:`Availability `: Unix, Windows, not Linux, FreeBSD >= " "1.3, NetBSD >= 1.3, not OpenBSD" msgstr "" -":ref:`Disponibilidad `: Unix, Windows, no Emscripten, no WASI." +":ref:`Disponibilidad `: Unix, Windows, no Linux, FreeBSD >= " +"1.3, NetBSD >= 1.3, no OpenBSD" #: ../Doc/library/os.rst:2249 msgid "" @@ -3369,10 +3403,9 @@ msgid "Added Windows support." msgstr "Se agregó soporte para Windows." #: ../Doc/library/os.rst:2276 -#, fuzzy msgid "Added the *src_dir_fd*, *dst_dir_fd*, and *follow_symlinks* parameters." msgstr "" -"Se agregaron los argumentos *src_dir_fd*, *dst_dir_fd* y *follow_symlinks*." +"Se agregaron los parámetros *src_dir_fd*, *dst_dir_fd* y *follow_symlinks*." #: ../Doc/library/os.rst:2279 ../Doc/library/os.rst:2703 #: ../Doc/library/os.rst:2740 ../Doc/library/os.rst:3468 @@ -3451,6 +3484,8 @@ msgstr "" #: ../Doc/library/os.rst:2322 msgid "Return a list containing the names of drives on a Windows system." msgstr "" +"Devuelve una lista que contiene los nombres de las unidades en un sistema " +"Windows." #: ../Doc/library/os.rst:2324 msgid "" @@ -3459,29 +3494,35 @@ msgid "" "reasons, including permissions, network connectivity or missing media. This " "function does not test for access." msgstr "" +"El nombre de una unidad suele ser ``'C:\\\\'``. No todos los nombres de " +"unidades se asociarán a un volumen y es posible que algunas sean " +"inaccesibles por diversos motivos, incluidos permisos, conectividad de red o " +"medios faltantes. Esta función no prueba el acceso." #: ../Doc/library/os.rst:2329 msgid "May raise :exc:`OSError` if an error occurs collecting the drive names." msgstr "" +"Puede generar :exc:`OSError` si ocurre un error al recopilar los nombres de " +"las unidades." #: ../Doc/library/os.rst:2332 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``os.listdrives`` with no " "arguments." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``os.fork`` sin argumentos." +"Genera un :ref:`auditing event ` ``os.listdrives`` sin argumentos." #: ../Doc/library/os.rst:2334 ../Doc/library/os.rst:2358 #: ../Doc/library/os.rst:2378 -#, fuzzy msgid ":ref:`Availability `: Windows" -msgstr ":ref:`Disponibilidad `: Windows." +msgstr ":ref:`Disponibilidad `: Windows" #: ../Doc/library/os.rst:2341 msgid "" "Return a list containing the mount points for a volume on a Windows system." msgstr "" +"Devuelve una lista que contiene los puntos de montaje de un volumen en un " +"sistema Windows." #: ../Doc/library/os.rst:2344 msgid "" @@ -3490,31 +3531,39 @@ msgid "" "all. In the latter case, the list will be empty. Mount points that are not " "associated with a volume will not be returned by this function." msgstr "" +"*volume* debe representarse como una ruta GUID, como las que devuelve :func:" +"`os.listvolumes`. Los volúmenes pueden montarse en varias ubicaciones o no " +"montarse en ninguna. En este último caso, la lista estará vacía. Esta " +"función no devolverá los puntos de montaje que no estén asociados a un " +"volumen." #: ../Doc/library/os.rst:2350 msgid "" "The mount points return by this function will be absolute paths, and may be " "longer than the drive name." msgstr "" +"Los puntos de montaje devueltos por esta función serán rutas absolutas y " +"pueden ser más largos que el nombre de la unidad." #: ../Doc/library/os.rst:2353 msgid "" "Raises :exc:`OSError` if the volume is not recognized or if an error occurs " "collecting the paths." msgstr "" +"Genera :exc:`OSError` si no se reconoce el volumen o si se produce un error " +"al recopilar las rutas." #: ../Doc/library/os.rst:2356 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``os.listmounts`` with argument " "``volume``." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``os.system`` con argumento " -"``command``." +"Genera un :ref:`auditing event ` ``os.listmounts`` con el " +"argumento ``volume``." #: ../Doc/library/os.rst:2365 msgid "Return a list containing the volumes in the system." -msgstr "" +msgstr "Devuelve una lista que contiene los volúmenes del sistema." #: ../Doc/library/os.rst:2367 msgid "" @@ -3524,29 +3573,34 @@ msgid "" "generally not familiar with them, and so the recommended use of this " "function is to retrieve mount points using :func:`os.listmounts`." msgstr "" +"Los volúmenes se representan normalmente como una ruta GUID similar a ``\\\\?" +"\\Volume{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}\\``. Normalmente, se puede " +"acceder a los archivos a través de una ruta GUID, si los permisos lo " +"permiten. Sin embargo, los usuarios no suelen estar familiarizados con " +"ellos, por lo que el uso recomendado de esta función es recuperar los puntos " +"de montaje mediante :func:`os.listmounts`." #: ../Doc/library/os.rst:2374 msgid "May raise :exc:`OSError` if an error occurs collecting the volumes." msgstr "" +"Puede generar :exc:`OSError` si ocurre un error al recopilar los volúmenes." #: ../Doc/library/os.rst:2376 -#, fuzzy msgid "" "Raises an :ref:`auditing event ` ``os.listvolumes`` with no " "arguments." msgstr "" -"Lanza un :ref:`evento de auditoría ` ``os.fork`` sin argumentos." +"Genera un :ref:`auditing event ` ``os.listvolumes`` sin argumentos." #: ../Doc/library/os.rst:2385 -#, fuzzy msgid "" "Perform the equivalent of an :c:func:`!lstat` system call on the given path. " "Similar to :func:`~os.stat`, but does not follow symbolic links. Return a :" "class:`stat_result` object." msgstr "" -"Realice el equivalente de una llamada al sistema :c:func:`lstat` en la ruta " -"dada. Similar a :func:`~os.stat`, pero no sigue enlaces simbólicos. Retorna " -"un objeto :class:`stat_result`." +"Realiza el equivalente de una llamada al sistema :c:func:`!lstat` en la ruta " +"indicada. Similar a :func:`~os.stat`, pero no sigue enlaces simbólicos. " +"Devuelve un objeto :class:`stat_result`." #: ../Doc/library/os.rst:2389 msgid "" @@ -3624,6 +3678,9 @@ msgid "" "control to the new directory such that only the current user and " "administrators have access. Other values of *mode* are ignored." msgstr "" +"En Windows, se maneja específicamente un *mode* o ``0o700`` para aplicar el " +"control de acceso al nuevo directorio de modo que solo el usuario actual y " +"los administradores tengan acceso. Se ignoran otros valores de *mode*." #: ../Doc/library/os.rst:2440 msgid "" @@ -3643,7 +3700,7 @@ msgstr "" #: ../Doc/library/os.rst:2451 msgid "Windows now handles a *mode* of ``0o700``." -msgstr "" +msgstr "Windows ahora maneja un *mode* o ``0o700``." #: ../Doc/library/os.rst:2461 msgid "" @@ -3690,9 +3747,8 @@ msgid "This function handles UNC paths correctly." msgstr "Esta función maneja las rutas UNC correctamente." #: ../Doc/library/os.rst:2482 -#, fuzzy msgid "Added the *exist_ok* parameter." -msgstr "El parámetro *exist_ok*." +msgstr "Se agregó el parámetro *exist_ok*." #: ../Doc/library/os.rst:2487 msgid "" @@ -3758,24 +3814,22 @@ msgstr "" "`os.makedev`), de lo contrario se ignora." #: ../Doc/library/os.rst:2547 -#, fuzzy msgid "" "Extract the device major number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" "Extrae el número principal del dispositivo de un número de dispositivo sin " -"formato (generalmente el campo :attr:`st_dev` o :attr:`st_rdev` de :c:type:" -"`stat`)." +"procesar (generalmente el campo :attr:`st_dev` o :attr:`st_rdev` de :c:" +"struct:`stat`)." #: ../Doc/library/os.rst:2553 -#, fuzzy msgid "" "Extract the device minor number from a raw device number (usually the :attr:" "`st_dev` or :attr:`st_rdev` field from :c:struct:`stat`)." msgstr "" "Extrae el número menor del dispositivo de un número de dispositivo sin " -"formato (generalmente el campo :attr:`st_dev` o :attr:`st_rdev` de :c:type:" -"`stat`)." +"procesar (generalmente el campo :attr:`st_dev` o :attr:`st_rdev` de :c:" +"struct:`stat`)." #: ../Doc/library/os.rst:2559 msgid "Compose a raw device number from the major and minor device numbers." @@ -3875,15 +3929,14 @@ msgstr "" "anteriormente." #: ../Doc/library/os.rst:2634 -#, fuzzy msgid "" "Remove (delete) the file *path*. If *path* is a directory, an :exc:" "`OSError` is raised. Use :func:`rmdir` to remove directories. If the file " "does not exist, a :exc:`FileNotFoundError` is raised." msgstr "" -"Quite (elimine) el archivo *path*. Si *path* es un directorio, se genera un :" -"exc:`IsADirectoryError`. Utilice :func:`rmdir` para eliminar directorios. Si " -"el archivo no existe, se lanza un :exc:`FileNotFoundError`." +"Eliminar (borrar) el archivo *path*. Si *path* es un directorio, se genera " +"un error :exc:`OSError`. Utilice :func:`rmdir` para eliminar directorios. Si " +"el archivo no existe, se genera un error :exc:`FileNotFoundError`." #: ../Doc/library/os.rst:2638 ../Doc/library/os.rst:2751 #: ../Doc/library/os.rst:3440 @@ -3953,6 +4006,10 @@ msgid "" "operation may fail if *src* and *dst* are on different filesystems. Use :" "func:`shutil.move` to support moves to a different filesystem." msgstr "" +"En Windows, si existe *dst*, siempre se genera un :exc:`FileExistsError`. La " +"operación puede fallar si *src* y *dst* están en sistemas de archivos " +"diferentes. Utilice :func:`shutil.move` para admitir movimientos a un " +"sistema de archivos diferente." #: ../Doc/library/os.rst:2684 msgid "" @@ -4001,9 +4058,8 @@ msgstr "" "``src``, ``dst``, ``src_dir_fd``, ``dst_dir_fd``." #: ../Doc/library/os.rst:2700 -#, fuzzy msgid "Added the *src_dir_fd* and *dst_dir_fd* parameters." -msgstr "Los argumentos *src_dir_fd* y *dst_dir_fd*." +msgstr "Se agregaron los parámetros *src_dir_fd* y *dst_dir_fd*." #: ../Doc/library/os.rst:2709 msgid "" @@ -4169,6 +4225,10 @@ msgid "" " if not entry.name.startswith('.') and entry.is_file():\n" " print(entry.name)" msgstr "" +"with os.scandir(path) as it:\n" +" for entry in it:\n" +" if not entry.name.startswith('.') and entry.is_file():\n" +" print(entry.name)" #: ../Doc/library/os.rst:2819 msgid "" @@ -4190,16 +4250,16 @@ msgstr "" "aspx>`_." #: ../Doc/library/os.rst:2831 -#, fuzzy msgid "" "Added support for the :term:`context manager` protocol and the :func:" "`~scandir.close` method. If a :func:`scandir` iterator is neither exhausted " "nor explicitly closed a :exc:`ResourceWarning` will be emitted in its " "destructor." msgstr "" -"Se agregó soporte para el protocolo :term:`context manager` y el método :" -"func:`~scandir.close()`. Si un iterador :func:`scandir` no está agotado ni " -"cerrado explícitamente, se emitirá a :exc:`ResourceWarning` en su destructor." +"Se agregó compatibilidad con el protocolo :term:`context manager` y el " +"método :func:`~scandir.close`. Si un iterador :func:`scandir` no se agota ni " +"se cierra explícitamente, se emitirá un :exc:`ResourceWarning` en su " +"destructor." #: ../Doc/library/os.rst:2837 msgid "The function accepts a :term:`path-like object`." @@ -4449,24 +4509,22 @@ msgstr "" "DT_UNKNOWN``." #: ../Doc/library/os.rst:2956 -#, fuzzy msgid "" "Return ``True`` if this entry is a junction (even if broken); return " "``False`` if the entry points to a regular directory, any kind of file, a " "symlink, or if it doesn't exist anymore." msgstr "" -"Retorna ``True`` si esta entrada es un enlace simbólico (incluso si está " -"roto); retorna ``False`` si la entrada apunta a un directorio o cualquier " -"tipo de archivo, o si ya no existe." +"Devuelve ``True`` si esta entrada es una unión (incluso si está rota); " +"devuelve ``False`` si la entrada apunta a un directorio normal, cualquier " +"tipo de archivo, un enlace simbólico o si ya no existe." #: ../Doc/library/os.rst:2960 -#, fuzzy msgid "" "The result is cached on the ``os.DirEntry`` object. Call :func:`os.path." "isjunction` to fetch up-to-date information." msgstr "" "El resultado se almacena en caché en el objeto ``os.DirEntry``. Llame a :" -"func:`os.path.islink` para obtener información actualizada." +"func:`os.path.isjunction` para obtener información actualizada." #: ../Doc/library/os.rst:2967 msgid "" @@ -4510,7 +4568,6 @@ msgstr "" "stat` para obtener información actualizada." #: ../Doc/library/os.rst:2984 -#, fuzzy msgid "" "Note that there is a nice correspondence between several attributes and " "methods of ``os.DirEntry`` and of :class:`pathlib.Path`. In particular, the " @@ -4518,9 +4575,10 @@ msgid "" "``is_file()``, ``is_symlink()``, ``is_junction()``, and ``stat()`` methods." msgstr "" "Tenga en cuenta que existe una buena correspondencia entre varios atributos " -"y métodos de ``os.DirEntry`` y de :class:`pathlib.Path`. En particular, el " +"y métodos de ``os.DirEntry`` y :class:`pathlib.Path`. En particular, el " "atributo ``name`` tiene el mismo significado, al igual que los métodos " -"``is_dir()``, ``is_file()``, ``is_symlink()`` y ``stat()``." +"``is_dir()``, ``is_file()``, ``is_symlink()``, ``is_junction()`` y " +"``stat()``." #: ../Doc/library/os.rst:2992 msgid "" @@ -4537,6 +4595,10 @@ msgid "" "future ``st_ctime`` may be changed to return zero or the metadata change " "time, if available." msgstr "" +"El atributo ``st_ctime`` de un resultado estadístico está obsoleto en " +"Windows. La hora de creación del archivo está disponible correctamente como " +"``st_birthtime`` y, en el futuro, ``st_ctime`` puede cambiarse para que " +"devuelva cero o la hora de cambio de metadatos, si está disponible." #: ../Doc/library/os.rst:3005 msgid "" @@ -4598,12 +4660,7 @@ msgstr "" #: ../Doc/library/os.rst:3030 ../Doc/library/os.rst:3799 msgid "Example::" -msgstr "" -"El diseño de todos los módulos incorporados de Python dependientes del " -"sistema operativo es tal que, mientras funcionalidad esté disponible, usará " -"la misma interfaz; por ejemplo, la función ``os.stat(path)`` retorna " -"estadísticas sobre la ruta (*path*) en el mismo formato (lo que sucede " -"originalmente con la interfaz POSIX)." +msgstr "Ejemplo::" #: ../Doc/library/os.rst:3032 msgid "" @@ -4616,18 +4673,25 @@ msgid "" ">>> statinfo.st_size\n" "264" msgstr "" +">>> import os\n" +">>> statinfo = os.stat('somefile.txt')\n" +">>> statinfo\n" +"os.stat_result(st_mode=33188, st_ino=7876932, st_dev=234881026,\n" +"st_nlink=1, st_uid=501, st_gid=501, st_size=264, st_atime=1297230295,\n" +"st_mtime=1297230027, st_ctime=1297230027)\n" +">>> statinfo.st_size\n" +"264" #: ../Doc/library/os.rst:3043 msgid ":func:`fstat` and :func:`lstat` functions." msgstr ":func:`fstat` y funciones :func:`lstat`." #: ../Doc/library/os.rst:3045 -#, fuzzy msgid "" "Added the *dir_fd* and *follow_symlinks* parameters, specifying a file " "descriptor instead of a path." msgstr "" -"Se agregaron los argumentos *dir_fd* y *follow_symlinks*, especificando un " +"Se agregaron los parámetros *dir_fd* y *follow_symlinks*, especificando un " "descriptor de archivo en lugar de una ruta." #: ../Doc/library/os.rst:3052 @@ -4647,15 +4711,14 @@ msgstr "" "``follow_symlinks=False`` en lugar de generar un error." #: ../Doc/library/os.rst:3063 -#, fuzzy msgid "" "Object whose attributes correspond roughly to the members of the :c:struct:" "`stat` structure. It is used for the result of :func:`os.stat`, :func:`os." "fstat` and :func:`os.lstat`." msgstr "" "Objeto cuyos atributos corresponden aproximadamente a los miembros de la " -"estructura :c:type:`stat`. Se utiliza para el resultado de :func:`os.stat`, :" -"func:`os.fstat` y :func:`os.lstat`." +"estructura :c:struct:`stat`. Se utiliza para el resultado de :func:`os." +"stat`, :func:`os.fstat` y :func:`os.lstat`." #: ../Doc/library/os.rst:3067 msgid "Attributes:" @@ -4725,9 +4788,8 @@ msgstr "" "Tiempo de modificación de contenido más reciente expresado en segundos." #: ../Doc/library/os.rst:3117 -#, fuzzy msgid "Time of most recent metadata change expressed in seconds." -msgstr "Tiempo de acceso más reciente expresado en segundos." +msgstr "Hora del cambio de metadatos más reciente expresado en segundos." #: ../Doc/library/os.rst:3119 msgid "" @@ -4735,6 +4797,9 @@ msgid "" "creation time. In the future, ``st_ctime`` will contain the time of the most " "recent metadata change, as for other platforms." msgstr "" +"``st_ctime`` está obsoleto en Windows. Utilice ``st_birthtime`` para indicar " +"la hora de creación del archivo. En el futuro, ``st_ctime`` contendrá la " +"hora del cambio de metadatos más reciente, como en otras plataformas." #: ../Doc/library/os.rst:3126 msgid "Time of most recent access expressed in nanoseconds as an integer." @@ -4750,11 +4815,11 @@ msgstr "" "como un entero." #: ../Doc/library/os.rst:3139 -#, fuzzy msgid "" "Time of most recent metadata change expressed in nanoseconds as an integer." msgstr "" -"Tiempo de acceso más reciente expresado en nanosegundos como un entero." +"Hora del cambio de metadatos más reciente expresado en nanosegundos como un " +"número entero." #: ../Doc/library/os.rst:3144 msgid "" @@ -4762,26 +4827,33 @@ msgid "" "file creation time. In the future, ``st_ctime`` will contain the time of the " "most recent metadata change, as for other platforms." msgstr "" +"``st_ctime_ns`` está obsoleto en Windows. Utilice ``st_birthtime_ns`` para " +"indicar la hora de creación del archivo. En el futuro, ``st_ctime`` " +"contendrá la hora del cambio de metadatos más reciente, como en otras " +"plataformas." #: ../Doc/library/os.rst:3151 msgid "" "Time of file creation expressed in seconds. This attribute is not always " "available, and may raise :exc:`AttributeError`." msgstr "" +"Hora de creación del archivo expresada en segundos. Este atributo no siempre " +"está disponible y puede generar el error :exc:`AttributeError`." #: ../Doc/library/os.rst:3154 -#, fuzzy msgid "``st_birthtime`` is now available on Windows." -msgstr "Esta función no está disponible en MacOS." +msgstr "``st_birthtime`` ahora está disponible en Windows." #: ../Doc/library/os.rst:3159 msgid "" "Time of file creation expressed in nanoseconds as an integer. This attribute " "is not always available, and may raise :exc:`AttributeError`." msgstr "" +"Hora de creación del archivo expresada en nanosegundos como un número " +"entero. Este atributo no siempre está disponible y puede generar el error :" +"exc:`AttributeError`." #: ../Doc/library/os.rst:3167 -#, fuzzy msgid "" "The exact meaning and resolution of the :attr:`st_atime`, :attr:`st_mtime`, :" "attr:`st_ctime` and :attr:`st_birthtime` attributes depend on the operating " @@ -4790,15 +4862,15 @@ msgid "" "has only 1-day resolution. See your operating system documentation for " "details." msgstr "" -"El significado exacto y la resolución de los atributos :attr:`st_atime`, :" -"attr:`st_mtime` y :attr:`st_ctime` dependen del sistema operativo y del " -"sistema de archivos. Por ejemplo, en sistemas Windows que utilizan los " -"sistemas de archivos FAT o FAT32, :attr:`st_mtime` tiene una resolución de 2 " -"segundos y :attr:`st_atime` tiene una resolución de solo 1 día. Consulte la " -"documentación de su sistema operativo para más detalles." +"El significado y la resolución exactos de los atributos :attr:`st_atime`, :" +"attr:`st_mtime`, :attr:`st_ctime` y :attr:`st_birthtime` dependen del " +"sistema operativo y del sistema de archivos. Por ejemplo, en los sistemas " +"Windows que utilizan sistemas de archivos FAT32, :attr:`st_mtime` tiene una " +"resolución de 2 segundos y :attr:`st_atime` tiene una resolución de solo 1 " +"día. Consulte la documentación de su sistema operativo para obtener más " +"detalles." #: ../Doc/library/os.rst:3174 -#, fuzzy msgid "" "Similarly, although :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:" "`st_ctime_ns` and :attr:`st_birthtime_ns` are always expressed in " @@ -4810,14 +4882,15 @@ msgid "" "`st_atime_ns`, :attr:`st_mtime_ns`, :attr:`st_ctime_ns` and :attr:" "`st_birthtime_ns`." msgstr "" -"De manera similar, aunque :attr:`st_atime_ns`, :attr:`st_mtime_ns` y :attr:" -"`st_ctime_ns` siempre se expresan en nanosegundos, muchos sistemas no " -"proporcionan precisión en nanosegundos. En los sistemas que proporcionan " -"precisión en nanosegundos, el objeto de punto flotante utilizado para " -"almacenar :attr:`st_atime`, :attr:`st_mtime`, y :attr:`st_ctime` no puede " -"preservarlo todo, y como tal será ligeramente inexacto . Si necesita las " -"marcas de tiempo exactas, siempre debe usar :attr:`st_atime_ns`, :attr:" -"`st_mtime_ns` y :attr:`st_ctime_ns`." +"De manera similar, aunque :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:" +"`st_ctime_ns` y :attr:`st_birthtime_ns` siempre se expresan en nanosegundos, " +"muchos sistemas no proporcionan precisión en nanosegundos. En los sistemas " +"que sí proporcionan precisión en nanosegundos, el objeto de punto flotante " +"utilizado para almacenar :attr:`st_atime`, :attr:`st_mtime`, :attr:" +"`st_ctime` y :attr:`st_birthtime` no puede conservarlo todo y, por lo tanto, " +"será ligeramente inexacto. Si necesita las marcas de tiempo exactas, siempre " +"debe utilizar :attr:`st_atime_ns`, :attr:`st_mtime_ns`, :attr:`st_ctime_ns` " +"y :attr:`st_birthtime_ns`." #: ../Doc/library/os.rst:3184 msgid "" @@ -4903,44 +4976,40 @@ msgstr "" "En los sistemas Windows, los siguientes atributos también están disponibles:" #: ../Doc/library/os.rst:3238 -#, fuzzy msgid "" "Windows file attributes: ``dwFileAttributes`` member of the " "``BY_HANDLE_FILE_INFORMATION`` structure returned by :c:func:`!" "GetFileInformationByHandle`. See the :const:`!FILE_ATTRIBUTE_* ` constants in the :mod:`stat` module." msgstr "" -"Atributos del archivo de Windows: miembro ``dwFileAttributes`` de la " -"estructura ``BY_HANDLE_FILE_INFORMATION`` retornado por :c:func:" -"`GetFileInformationByHandle`. Vea las constantes ``FILE_ATTRIBUTE_*`` en el " -"módulo :mod:`stat`." +"Atributos de archivo de Windows: ``dwFileAttributes`` miembro de la " +"estructura ``BY_HANDLE_FILE_INFORMATION`` devuelta por :c:func:`!" +"GetFileInformationByHandle`. Consulte las constantes :const:`!" +"FILE_ATTRIBUTE_* ` en el módulo :mod:`stat`." #: ../Doc/library/os.rst:3248 -#, fuzzy msgid "" "When :attr:`st_file_attributes` has the :const:`~stat." "FILE_ATTRIBUTE_REPARSE_POINT` set, this field contains the tag identifying " "the type of reparse point. See the :const:`IO_REPARSE_TAG_* ` constants in the :mod:`stat` module." msgstr "" -"Cuando :attr:`st_file_attributes` tiene el conjunto " -"``FILE_ATTRIBUTE_REPARSE_POINT``, este campo contiene la etiqueta que " -"identifica el tipo de punto de análisis. Vea las constantes " -"``IO_REPARSE_TAG_*`` en el módulo :mod:`stat`." +"Cuando :attr:`st_file_attributes` tiene :const:`~stat." +"FILE_ATTRIBUTE_REPARSE_POINT` configurado, este campo contiene la etiqueta " +"que identifica el tipo de punto de análisis. Consulte las constantes :const:" +"`IO_REPARSE_TAG_* ` en el módulo :mod:`stat`." #: ../Doc/library/os.rst:3253 -#, fuzzy msgid "" "The standard module :mod:`stat` defines functions and constants that are " "useful for extracting information from a :c:struct:`stat` structure. (On " "Windows, some items are filled with dummy values.)" msgstr "" "El módulo estándar :mod:`stat` define funciones y constantes que son útiles " -"para extraer información de la estructura a :c:type:`stat`. (En Windows, " -"algunos elementos están llenos de valores ficticios)." +"para extraer información de una estructura :c:struct:`stat`. (En Windows, " +"algunos elementos se rellenan con valores ficticios)." #: ../Doc/library/os.rst:3257 -#, fuzzy msgid "" "For backward compatibility, a :class:`stat_result` instance is also " "accessible as a tuple of at least 10 integers giving the most important (and " @@ -4951,15 +5020,15 @@ msgid "" "implementations. For compatibility with older Python versions, accessing :" "class:`stat_result` as a tuple always returns integers." msgstr "" -"Para compatibilidad con versiones anteriores, una instancia de :class:" -"`stat_result` también es accesible como una tupla de al menos 10 enteros que " -"dan los miembros más importantes (y portátiles) de la estructura :c:type:" -"`stat`, en el orden :attr:`st_mode`, :attr:`st_ino`, :attr:`st_dev`, :attr:" -"`st_nlink`, :attr:`st_uid`, :attr:`st_gid`, :attr:`st_size`, :attr:" +"Para compatibilidad con versiones anteriores, también se puede acceder a una " +"instancia :class:`stat_result` como una tupla de al menos 10 números enteros " +"que den los miembros más importantes (y portables) de la estructura :c:" +"struct:`stat`, en el orden :attr:`st_mode`, :attr:`st_ino`, :attr:`st_dev`, :" +"attr:`st_nlink`, :attr:`st_uid`, :attr:`st_gid`, :attr:`st_size`, :attr:" "`st_atime`, :attr:`st_mtime`, :attr:`st_ctime`. Algunas implementaciones " "pueden agregar más elementos al final. Para compatibilidad con versiones " "anteriores de Python, acceder a :class:`stat_result` como una tupla siempre " -"retorna enteros." +"devuelve números enteros." #: ../Doc/library/os.rst:3266 msgid "Windows now returns the file index as :attr:`st_ino` when available." @@ -4989,6 +5058,10 @@ msgid "" "last metadata change time, for consistency with other platforms, but for now " "still contains creation time. Use :attr:`st_birthtime` for the creation time." msgstr "" +"En Windows, :attr:`st_ctime` está obsoleto. Con el tiempo, contendrá la " +"última hora de cambio de metadatos, para mantener la coherencia con otras " +"plataformas, pero por ahora aún contiene la hora de creación. Utilice :attr:" +"`st_birthtime` para la hora de creación." #: ../Doc/library/os.rst:3287 msgid "" @@ -4996,20 +5069,23 @@ msgid "" "system. Previously it would not be above 64 bits, and larger file " "identifiers would be arbitrarily packed." msgstr "" +"En Windows, :attr:`st_ino` puede tener hasta 128 bits, según el sistema de " +"archivos. Antes no superaba los 64 bits y los identificadores de archivos " +"más grandes se empaquetaban de forma arbitraria." #: ../Doc/library/os.rst:3291 msgid "" "On Windows, :attr:`st_rdev` no longer returns a value. Previously it would " "contain the same as :attr:`st_dev`, which was incorrect." msgstr "" +"En Windows, :attr:`st_rdev` ya no devuelve un valor. Antes contenía el mismo " +"valor que :attr:`st_dev`, lo cual era incorrecto." #: ../Doc/library/os.rst:3294 -#, fuzzy msgid "Added the :attr:`st_birthtime` member on Windows." -msgstr "Se agregó el miembro :attr:`st_reparse_tag` en Windows." +msgstr "Se agregó el miembro :attr:`st_birthtime` en Windows." #: ../Doc/library/os.rst:3299 -#, fuzzy msgid "" "Perform a :c:func:`!statvfs` system call on the given path. The return " "value is an object whose attributes describe the filesystem on the given " @@ -5018,12 +5094,13 @@ msgid "" "`f_bfree`, :attr:`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:" "`f_favail`, :attr:`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." msgstr "" -"Realice una llamada al sistema a :c:func:`statvfs` en la ruta dada. El valor " -"de retorno es un objeto cuyos atributos describen el sistema de archivos en " -"la ruta dada y corresponden a los miembros de la estructura :c:type:" -"`statvfs`, a saber: :attr:`f_bsize`, :attr:`f_frsize`, :attr:`f_blocks`, :" -"attr:`f_bfree`, :attr:`f_bavail`, :attr:`f_files`, :attr:`f_ffree`, :attr:" -"`f_favail`, :attr:`f_flag`, :attr:`f_namemax`, :attr:`f_fsid`." +"Realizar una llamada al sistema :c:func:`!statvfs` en la ruta indicada. El " +"valor de retorno es un objeto cuyos atributos describen el sistema de " +"archivos en la ruta indicada y corresponden a los miembros de la estructura :" +"c:struct:`statvfs`, a saber: :attr:`f_bsize`, :attr:`f_frsize`, :attr:" +"`f_blocks`, :attr:`f_bfree`, :attr:`f_bavail`, :attr:`f_files`, :attr:" +"`f_ffree`, :attr:`f_favail`, :attr:`f_flag`, :attr:`f_namemax`, :attr:" +"`f_fsid`." #: ../Doc/library/os.rst:3306 msgid "" @@ -5079,9 +5156,8 @@ msgstr "" "`ST_RELATIME` se agregaron constantes." #: ../Doc/library/os.rst:3339 -#, fuzzy msgid "Added the :attr:`f_fsid` attribute." -msgstr "Agregado :attr:`f_fsid`." +msgstr "Se agrega el atributo :attr:`f_fsid`." #: ../Doc/library/os.rst:3345 msgid "" @@ -5119,7 +5195,7 @@ msgstr "" #: ../Doc/library/os.rst:3360 msgid "os.stat in os.supports_dir_fd" -msgstr "" +msgstr "os.stat en os.supports_dir_fd" #: ../Doc/library/os.rst:3362 msgid "" @@ -5153,7 +5229,7 @@ msgstr "" #: ../Doc/library/os.rst:3379 msgid "os.access in os.supports_effective_ids" -msgstr "" +msgstr "os.access en os.supports_effective_ids" #: ../Doc/library/os.rst:3381 msgid "" @@ -5194,7 +5270,7 @@ msgstr "" #: ../Doc/library/os.rst:3402 msgid "os.chdir in os.supports_fd" -msgstr "" +msgstr "os.chdir en os.supports_fd" #: ../Doc/library/os.rst:3409 msgid "" @@ -5235,7 +5311,7 @@ msgstr "" #: ../Doc/library/os.rst:3425 msgid "os.stat in os.supports_follow_symlinks" -msgstr "" +msgstr "os.stat en os.supports_follow_symlinks" #: ../Doc/library/os.rst:3432 msgid "Create a symbolic link pointing to *src* named *dst*." @@ -5286,13 +5362,12 @@ msgstr "" "``src``, ``dst``, ``dir_fd``." #: ../Doc/library/os.rst:3464 -#, fuzzy msgid "" "Added the *dir_fd* parameter, and now allow *target_is_directory* on non-" "Windows platforms." msgstr "" -"Se agregó el argumento *dir_fd* y ahora permite *target_is_directory* en " -"plataformas que no son de Windows." +"Se agregó el parámetro *dir_fd* y ahora se permite *target_is_directory* en " +"plataformas que no sean Windows." #: ../Doc/library/os.rst:3471 msgid "Added support for unelevated symlinks on Windows with Developer Mode." @@ -5553,6 +5628,14 @@ msgid "" " if 'CVS' in dirs:\n" " dirs.remove('CVS') # don't visit CVS directories" msgstr "" +"import os\n" +"from os.path import join, getsize\n" +"for root, dirs, files in os.walk('python/Lib/email'):\n" +"print(root, \"consumes\", end=\" \")\n" +"print(sum(getsize(join(root, name)) for name in files), end=\" \")\n" +"print(\"bytes in\", len(files), \"non-directory files\")\n" +"if 'CVS' in dirs:\n" +"dirs.remove('CVS') # no visitar directorios CVS" #: ../Doc/library/os.rst:3634 msgid "" @@ -5577,6 +5660,17 @@ msgid "" " for name in dirs:\n" " os.rmdir(os.path.join(root, name))" msgstr "" +"# Borra todo lo que se pueda alcanzar desde el directorio nombrado en " +"\"top\",\n" +"# asumiendo que no hay enlaces simbólicos.\n" +"# PRECAUCIÓN: ¡Esto es peligroso! Por ejemplo, si top == '/',\n" +"# podría borrar todos los archivos de tu disco.\n" +"import os\n" +"for root, dirs, files in os.walk(top, topdown=False):\n" +"for name in files:\n" +"os.remove(os.path.join(root, name))\n" +"for name in dirs:\n" +"os.rmdir(os.path.join(root, name))" #: ../Doc/library/os.rst:3649 msgid "" @@ -5644,6 +5738,14 @@ msgid "" " if 'CVS' in dirs:\n" " dirs.remove('CVS') # don't visit CVS directories" msgstr "" +"import os\n" +"for root, dirs, files, rootfd in os.fwalk('python/Lib/email'):\n" +" print(root, \"consumes\", end=\"\")\n" +" print(sum([os.stat(name, dir_fd=rootfd).st_size for name in files]),\n" +" end=\"\")\n" +" print(\"bytes in\", len(files), \"non-directory files\")\n" +" if 'CVS' in dirs:\n" +" dirs.remove('CVS') # don't visit CVS directories" #: ../Doc/library/os.rst:3695 msgid "" @@ -5667,6 +5769,16 @@ msgid "" " for name in dirs:\n" " os.rmdir(name, dir_fd=rootfd)" msgstr "" +"# Borre todo lo que sea accesible desde el directorio nombrado en \"top\",\n" +"# asumiendo que no hay enlaces simbólicos.\n" +"# PRECAUCIÓN: ¡Esto es peligroso! Por ejemplo, si top == '/',\n" +"# podría borrar todos los archivos de su disco.\n" +"import os\n" +"for root, dirs, files, rootfd in os.fwalk(top, topdown=False):\n" +"for name in files:\n" +"os.unlink(name, dir_fd=rootfd)\n" +"for name in dirs:\n" +"os.rmdir(name, dir_fd=rootfd)" #: ../Doc/library/os.rst:3710 msgid "" @@ -5709,7 +5821,6 @@ msgstr "" "archivos pueden tener el mismo nombre sin efectos secundarios." #: ../Doc/library/os.rst:3737 -#, fuzzy msgid ":ref:`Availability `: Linux >= 3.17 with glibc >= 2.27." msgstr ":ref:`Disponibilidad `: Linux >= 3.17 con glibc >= 2.27." @@ -5718,9 +5829,8 @@ msgid "These flags can be passed to :func:`memfd_create`." msgstr "Estas flags se pueden pasar a :func:`memfd_create`." #: ../Doc/library/os.rst:3762 -#, fuzzy msgid ":ref:`Availability `: Linux >= 3.17 with glibc >= 2.27" -msgstr ":ref:`Disponibilidad `: Linux >= 3.17 con glibc >= 2.27." +msgstr ":ref:`Disponibilidad `: Linux >= 3.17 con glibc >= 2.27" #: ../Doc/library/os.rst:3764 msgid "The ``MFD_HUGE*`` flags are only available since Linux 4.14." @@ -5742,7 +5852,6 @@ msgstr "" "`no es heredable `." #: ../Doc/library/os.rst:3777 -#, fuzzy msgid "" "*initval* is the initial value of the event counter. The initial value must " "be a 32 bit unsigned integer. Please note that the initial value is limited " @@ -5752,7 +5861,7 @@ msgstr "" "*initval* es el valor inicial del contador de eventos. El valor inicial debe " "ser un entero sin signo de 32 bits. Tenga en cuenta que el valor inicial " "está limitado a un entero sin signo de 32 bits, aunque el contador de " -"eventos es un entero de 64 bits sin signo con un valor máximo de 2 \\ :sup:" +"eventos es un entero sin signo de 64 bits con un valor máximo de 2\\ :sup:" "`64`\\ -\\ 2." #: ../Doc/library/os.rst:3782 @@ -5816,16 +5925,28 @@ msgid "" "finally:\n" " os.close(fd)" msgstr "" +"import os\n" +"\n" +"# semáforo con valor inicial '1'\n" +"fd = os.eventfd(1, os.EFD_SEMAPHORE | os.EFC_CLOEXEC)\n" +"try:\n" +"# adquirir semáforo\n" +"v = os.eventfd_read(fd)\n" +"try:\n" +"do_work()\n" +"finally:\n" +"# liberar semáforo\n" +"os.eventfd_write(fd, v)\n" +"finally:\n" +"os.close(fd)" #: ../Doc/library/os.rst:3816 ../Doc/library/os.rst:3932 #: ../Doc/library/os.rst:3995 ../Doc/library/os.rst:4005 #: ../Doc/library/os.rst:4023 ../Doc/library/os.rst:4032 #: ../Doc/library/os.rst:4042 ../Doc/library/os.rst:4052 #: ../Doc/library/os.rst:4062 ../Doc/library/os.rst:4073 -#, fuzzy msgid ":ref:`Availability `: Linux >= 2.6.27 with glibc >= 2.8" -msgstr "" -":ref:`Disponibilidad `: Linux >= 2.6.27 con glibc >= 2.8." +msgstr ":ref:`Disponibilidad `: Linux >= 2.6.27 con glibc >= 2.8" #: ../Doc/library/os.rst:3822 msgid "" @@ -5837,7 +5958,6 @@ msgstr "" #: ../Doc/library/os.rst:3825 ../Doc/library/os.rst:3834 #: ../Doc/library/os.rst:3842 ../Doc/library/os.rst:3851 -#, fuzzy msgid ":ref:`Availability `: Linux >= 2.6.27" msgstr ":ref:`Disponibilidad `: Linux >= 2.6.27" @@ -5864,51 +5984,49 @@ msgstr "" "descriptor de archivo :func:`eventfd`." #: ../Doc/library/os.rst:3857 -#, fuzzy msgid "" "Provide semaphore-like semantics for reads from an :func:`eventfd` file " "descriptor. On read the internal counter is decremented by one." msgstr "" -"Proporcione semántica similar a un semáforo para las lecturas de un " -"descriptor de archivo :func:`eventfd`. Al leer, el contador interno se " +"Proporcionar semántica similar a la de un semáforo para las lecturas desde " +"un descriptor de archivo :func:`eventfd`. Al leer, el contador interno se " "reduce en uno." #: ../Doc/library/os.rst:3860 -#, fuzzy msgid ":ref:`Availability `: Linux >= 2.6.30" msgstr ":ref:`Disponibilidad `: Linux >= 2.6.30" #: ../Doc/library/os.rst:3868 -#, fuzzy msgid "Timer File Descriptors" -msgstr "Herencia de los descriptores de archivos" +msgstr "Descriptores de archivos del temporizador" #: ../Doc/library/os.rst:3872 msgid "" "These functions provide support for Linux's *timer file descriptor* API. " "Naturally, they are all only available on Linux." msgstr "" +"Estas funciones brindan soporte para la API *timer file descriptor* de " +"Linux. Naturalmente, todas ellas solo están disponibles en Linux." #: ../Doc/library/os.rst:3877 -#, fuzzy msgid "Create and return a timer file descriptor (*timerfd*)." -msgstr "Lee como máximo *n* bytes del descriptor de archivo *fd*." +msgstr "Crea y devuelve un descriptor de archivo de temporizador (*timerfd*)." #: ../Doc/library/os.rst:3879 msgid "The file descriptor returned by :func:`timerfd_create` supports:" -msgstr "" +msgstr "El descriptor de archivo devuelto por :func:`timerfd_create` admite:" #: ../Doc/library/os.rst:3881 msgid ":func:`read`" -msgstr "" +msgstr ":func:`read`" #: ../Doc/library/os.rst:3882 msgid ":func:`~select.select`" -msgstr "" +msgstr ":func:`~select.select`" #: ../Doc/library/os.rst:3883 msgid ":func:`~select.poll`" -msgstr "" +msgstr ":func:`~select.poll`" #: ../Doc/library/os.rst:3885 msgid "" @@ -5918,31 +6036,39 @@ msgid "" "converted to an :class:`int` by ``int.from_bytes(x, byteorder=sys." "byteorder)``." msgstr "" +"El método :func:`read` del descriptor de archivo se puede llamar con un " +"tamaño de búfer de 8. Si el temporizador ya ha expirado una o más veces, :" +"func:`read` devuelve la cantidad de expiraciones con el orden de bytes del " +"host, que se puede convertir a :class:`int` mediante ``int.from_bytes(x, " +"byteorder=sys.byteorder)``." #: ../Doc/library/os.rst:3890 msgid "" ":func:`~select.select` and :func:`~select.poll` can be used to wait until " "timer expires and the file descriptor is readable." msgstr "" +"Se pueden usar :func:`~select.select` y :func:`~select.poll` para esperar " +"hasta que el temporizador expire y el descriptor de archivo sea legible." #: ../Doc/library/os.rst:3893 msgid "" "*clockid* must be a valid :ref:`clock ID `, as " "defined in the :py:mod:`time` module:" msgstr "" +"*clockid* debe ser un :ref:`clock ID ` válido, como " +"se define en el módulo :py:mod:`time`:" #: ../Doc/library/os.rst:3896 -#, fuzzy msgid ":const:`time.CLOCK_REALTIME`" -msgstr ":data:`stat.S_IREAD`" +msgstr ":const:`time.CLOCK_REALTIME`" #: ../Doc/library/os.rst:3897 msgid ":const:`time.CLOCK_MONOTONIC`" -msgstr "" +msgstr ":const:`time.CLOCK_MONOTONIC`" #: ../Doc/library/os.rst:3898 msgid ":const:`time.CLOCK_BOOTTIME` (Since Linux 3.15 for timerfd_create)" -msgstr "" +msgstr ":const:`time.CLOCK_BOOTTIME` (desde Linux 3.15 para timerfd_create)" #: ../Doc/library/os.rst:3900 msgid "" @@ -5951,6 +6077,11 @@ msgid "" "updated. To cancel timer when system clock is changed, see :const:" "`TFD_TIMER_CANCEL_ON_SET`." msgstr "" +"Si *clockid* es :const:`time.CLOCK_REALTIME`, se utiliza un reloj de tiempo " +"real configurable para todo el sistema. Si se modifica el reloj del sistema, " +"es necesario actualizar la configuración del temporizador. Para cancelar el " +"temporizador cuando se modifica el reloj del sistema, consulte :const:" +"`TFD_TIMER_CANCEL_ON_SET`." #: ../Doc/library/os.rst:3905 msgid "" @@ -5958,12 +6089,18 @@ msgid "" "increasing clock is used. Even if the system clock is changed, the timer " "setting will not be affected." msgstr "" +"Si *clockid* es :const:`time.CLOCK_MONOTONIC`, se utiliza un reloj que " +"aumenta de forma monótona y no se puede configurar. Incluso si se cambia el " +"reloj del sistema, la configuración del temporizador no se verá afectada." #: ../Doc/library/os.rst:3909 msgid "" "If *clockid* is :const:`time.CLOCK_BOOTTIME`, same as :const:`time." "CLOCK_MONOTONIC` except it includes any time that the system is suspended." msgstr "" +"Si *clockid* es :const:`time.CLOCK_BOOTTIME`, igual que :const:`time." +"CLOCK_MONOTONIC` excepto que incluye cualquier momento en que el sistema " +"esté suspendido." #: ../Doc/library/os.rst:3912 msgid "" @@ -5971,16 +6108,17 @@ msgid "" "value. Any of the following variables may used, combined using bitwise OR " "(the ``|`` operator):" msgstr "" +"El comportamiento del descriptor de archivo se puede modificar especificando " +"un valor *flags*. Se puede utilizar cualquiera de las siguientes variables, " +"combinadas mediante OR bit a bit (el operador ``|``):" #: ../Doc/library/os.rst:3916 -#, fuzzy msgid ":const:`TFD_NONBLOCK`" -msgstr ":data:`stat.UF_NOUNLINK`" +msgstr ":const:`TFD_NONBLOCK`" #: ../Doc/library/os.rst:3917 -#, fuzzy msgid ":const:`TFD_CLOEXEC`" -msgstr ":data:`stat.S_IEXEC`" +msgstr ":const:`TFD_CLOEXEC`" #: ../Doc/library/os.rst:3919 msgid "" @@ -5989,31 +6127,40 @@ msgid "" "there hasn't been an expiration since the last call to read, :func:`read` " "raises :class:`OSError` with ``errno`` is set to :const:`errno.EAGAIN`." msgstr "" +"Si :const:`TFD_NONBLOCK` no está configurado como indicador, :func:`read` se " +"bloquea hasta que el temporizador expire. Si está configurado como " +"indicador, :func:`read` no se bloquea, pero si no ha habido una expiración " +"desde la última llamada para leer, :func:`read` genera :class:`OSError` y " +"``errno`` se configura como :const:`errno.EAGAIN`." #: ../Doc/library/os.rst:3925 msgid ":const:`TFD_CLOEXEC` is always set by Python automatically." -msgstr "" +msgstr "Python siempre establece :const:`TFD_CLOEXEC` automáticamente." #: ../Doc/library/os.rst:3927 msgid "" "The file descriptor must be closed with :func:`os.close` when it is no " "longer needed, or else the file descriptor will be leaked." msgstr "" +"El descriptor de archivo debe cerrarse con :func:`os.close` cuando ya no sea " +"necesario, de lo contrario se filtrará." #: ../Doc/library/os.rst:3930 -#, fuzzy msgid "The :manpage:`timerfd_create(2)` man page." -msgstr "Ver la página manual de :manpage:`pidfd_open(2)` para mas detalles." +msgstr "La página del manual :manpage:`timerfd_create(2)`." #: ../Doc/library/os.rst:3939 msgid "" "Alter a timer file descriptor's internal timer. This function operates the " "same interval timer as :func:`timerfd_settime_ns`." msgstr "" +"Modificar el temporizador interno de un descriptor de archivo de " +"temporizador. Esta función opera con el mismo temporizador de intervalos " +"que :func:`timerfd_settime_ns`." #: ../Doc/library/os.rst:3942 msgid "*fd* must be a valid timer file descriptor." -msgstr "" +msgstr "*fd* debe ser un descriptor de archivo de temporizador válido." #: ../Doc/library/os.rst:3944 msgid "" @@ -6021,14 +6168,17 @@ msgid "" "the following variables may used, combined using bitwise OR (the ``|`` " "operator):" msgstr "" +"El comportamiento del temporizador se puede modificar especificando un valor " +"*flags*. Se puede utilizar cualquiera de las siguientes variables, " +"combinadas mediante OR bit a bit (el operador ``|``):" #: ../Doc/library/os.rst:3948 msgid ":const:`TFD_TIMER_ABSTIME`" -msgstr "" +msgstr ":const:`TFD_TIMER_ABSTIME`" #: ../Doc/library/os.rst:3949 msgid ":const:`TFD_TIMER_CANCEL_ON_SET`" -msgstr "" +msgstr ":const:`TFD_TIMER_CANCEL_ON_SET`" #: ../Doc/library/os.rst:3951 msgid "" @@ -6037,12 +6187,19 @@ msgid "" "than zero, it raises an :class:`OSError` exception with ``errno`` set to :" "const:`errno.EINVAL`" msgstr "" +"El temporizador se desactiva al configurar *initial* en cero (``0``). Si " +"*initial* es igual o mayor que cero, el temporizador se activa. Si *initial* " +"es menor que cero, genera una excepción :class:`OSError` con ``errno`` " +"configurado en :const:`errno.EINVAL`" #: ../Doc/library/os.rst:3956 msgid "" "By default the timer will fire when *initial* seconds have elapsed. (If " "*initial* is zero, timer will fire immediately.)" msgstr "" +"De forma predeterminada, el temporizador se activará cuando transcurran " +"*initial* segundos. (Si *initial* es cero, el temporizador se activará " +"inmediatamente)." #: ../Doc/library/os.rst:3959 msgid "" @@ -6050,6 +6207,9 @@ msgid "" "when the timer's clock (set by *clockid* in :func:`timerfd_create`) reaches " "*initial* seconds." msgstr "" +"Sin embargo, si se establece el indicador :const:`TFD_TIMER_ABSTIME`, el " +"temporizador se activará cuando el reloj del temporizador (establecido por " +"*clockid* en :func:`timerfd_create`) alcance los *initial* segundos." #: ../Doc/library/os.rst:3963 msgid "" @@ -6060,6 +6220,12 @@ msgid "" "than zero, it raises :class:`OSError` with ``errno`` set to :const:`errno." "EINVAL`" msgstr "" +"El intervalo del temporizador se establece mediante *interval* :py:class:" +"`float`. Si *interval* es cero, el temporizador solo se activa una vez, en " +"la expiración inicial. Si *interval* es mayor que cero, el temporizador se " +"activa cada vez que transcurren *interval* segundos desde la expiración " +"anterior. Si *interval* es menor que cero, genera :class:`OSError` con " +"``errno`` establecido en :const:`errno.EINVAL`" #: ../Doc/library/os.rst:3970 msgid "" @@ -6069,6 +6235,11 @@ msgid "" "changed discontinuously. Reading the descriptor is aborted with the error " "ECANCELED." msgstr "" +"Si el indicador :const:`TFD_TIMER_CANCEL_ON_SET` se configura junto con :" +"const:`TFD_TIMER_ABSTIME` y el reloj de este temporizador es :const:`time." +"CLOCK_REALTIME`, el temporizador se marca como cancelable si el reloj de " +"tiempo real se modifica de manera discontinua. La lectura del descriptor se " +"cancela con el error ECANCELED." #: ../Doc/library/os.rst:3976 msgid "" @@ -6076,65 +6247,86 @@ msgid "" "done by changing time offset only and doesn't cause discontinuous system " "clock change." msgstr "" +"Linux administra el reloj del sistema como UTC. La transición al horario de " +"verano se realiza modificando únicamente la diferencia horaria y no provoca " +"cambios discontinuos en el reloj del sistema." #: ../Doc/library/os.rst:3980 msgid "" "Discontinuous system clock change will be caused by the following events:" msgstr "" +"El cambio discontinuo del reloj del sistema será causado por los siguientes " +"eventos:" #: ../Doc/library/os.rst:3982 msgid "``settimeofday``" -msgstr "" +msgstr "``settimeofday``" #: ../Doc/library/os.rst:3983 msgid "``clock_settime``" -msgstr "" +msgstr "``clock_settime``" #: ../Doc/library/os.rst:3984 msgid "set the system date and time by ``date`` command" -msgstr "" +msgstr "Establezca la fecha y la hora del sistema mediante el comando ``date``" #: ../Doc/library/os.rst:3986 msgid "" "Return a two-item tuple of (``next_expiration``, ``interval``) from the " "previous timer state, before this function executed." msgstr "" +"Devuelve una tupla de dos elementos de (``next_expiration``, ``interval``) " +"del estado del temporizador anterior, antes de que se ejecutara esta función." #: ../Doc/library/os.rst:3991 msgid "" ":manpage:`timerfd_create(2)`, :manpage:`timerfd_settime(2)`, :manpage:" "`settimeofday(2)`, :manpage:`clock_settime(2)`, and :manpage:`date(1)`." msgstr "" +":manpage:`timerfd_create(2)`, :manpage:`timerfd_settime(2)`, :manpage:" +"`settimeofday(2)`, :manpage:`clock_settime(2)`, y :manpage:`date(1)`." #: ../Doc/library/os.rst:4002 msgid "" "Similar to :func:`timerfd_settime`, but use time as nanoseconds. This " "function operates the same interval timer as :func:`timerfd_settime`." msgstr "" +"Similar a :func:`timerfd_settime`, pero utiliza el tiempo en nanosegundos. " +"Esta función opera con el mismo temporizador de intervalos que :func:" +"`timerfd_settime`." #: ../Doc/library/os.rst:4012 msgid "Return a two-item tuple of floats (``next_expiration``, ``interval``)." msgstr "" +"Devuelve una tupla de dos elementos de flotantes (``next_expiration``, " +"``interval``)." #: ../Doc/library/os.rst:4014 msgid "" "``next_expiration`` denotes the relative time until next the timer next " "fires, regardless of if the :const:`TFD_TIMER_ABSTIME` flag is set." msgstr "" +"``next_expiration`` indica el tiempo relativo hasta que el temporizador se " +"vuelva a activar, independientemente de si el indicador :const:" +"`TFD_TIMER_ABSTIME` está configurado." #: ../Doc/library/os.rst:4017 msgid "" "``interval`` denotes the timer's interval. If zero, the timer will only fire " "once, after ``next_expiration`` seconds have elapsed." msgstr "" +"``interval`` indica el intervalo del temporizador. Si es cero, el " +"temporizador se activará solo una vez, después de que transcurran " +"``next_expiration`` segundos." #: ../Doc/library/os.rst:4021 msgid ":manpage:`timerfd_gettime(2)`" -msgstr "" +msgstr ":manpage:`timerfd_gettime(2)`" #: ../Doc/library/os.rst:4030 msgid "Similar to :func:`timerfd_gettime`, but return time as nanoseconds." msgstr "" +"Similar a :func:`timerfd_gettime`, pero devuelve el tiempo en nanosegundos." #: ../Doc/library/os.rst:4038 msgid "" @@ -6142,12 +6334,19 @@ msgid "" "`O_NONBLOCK` status flag for the new timer file descriptor. If :const:" "`TFD_NONBLOCK` is not set as a flag, :func:`read` blocks." msgstr "" +"Un indicador para la función :func:`timerfd_create`, que establece el " +"indicador de estado :const:`O_NONBLOCK` para el nuevo descriptor de archivo " +"del temporizador. Si :const:`TFD_NONBLOCK` no está establecido como " +"indicador, :func:`read` se bloquea." #: ../Doc/library/os.rst:4048 msgid "" "A flag for the :func:`timerfd_create` function, If :const:`TFD_CLOEXEC` is " "set as a flag, set close-on-exec flag for new file descriptor." msgstr "" +"Una bandera para la función :func:`timerfd_create`. Si :const:`TFD_CLOEXEC` " +"está configurado como bandera, establece la bandera de cierre al ejecutar " +"para el nuevo descriptor de archivo." #: ../Doc/library/os.rst:4058 msgid "" @@ -6156,6 +6355,10 @@ msgid "" "value on the timer's clock (in UTC seconds or nanoseconds since the Unix " "Epoch)." msgstr "" +"Indicador para las funciones :func:`timerfd_settime` y :func:" +"`timerfd_settime_ns`. Si se establece este indicador, *initial* se " +"interpreta como un valor absoluto en el reloj del temporizador (en segundos " +"UTC o nanosegundos desde la época Unix)." #: ../Doc/library/os.rst:4068 msgid "" @@ -6163,6 +6366,9 @@ msgid "" "functions along with :const:`TFD_TIMER_ABSTIME`. The timer is cancelled when " "the time of the underlying clock changes discontinuously." msgstr "" +"Una bandera para las funciones :func:`timerfd_settime` y :func:" +"`timerfd_settime_ns` junto con :const:`TFD_TIMER_ABSTIME`. El temporizador " +"se cancela cuando la hora del reloj subyacente cambia de manera discontinua." #: ../Doc/library/os.rst:4079 msgid "Linux extended attributes" @@ -6427,7 +6633,6 @@ msgstr "" "función." #: ../Doc/library/os.rst:4253 -#, fuzzy msgid "" "The \"l\" and \"v\" variants of the :func:`exec\\* ` functions differ " "in how command-line arguments are passed. The \"l\" variants are perhaps " @@ -6440,17 +6645,17 @@ msgid "" "is not enforced." msgstr "" "Las variantes \"l\" y \"v\" de las funciones :func:`exec\\* ` " -"difieren en cómo se pasan los argumentos de la línea de comandos. Las " -"variantes \"l\" son quizás las más fáciles de trabajar si el número de " -"parámetros se fija cuando se escribe el código; los parámetros individuales " -"simplemente se convierten en parámetros adicionales a las funciones :func:" -"`execl\\*`. Las variantes \"v\" son buenas cuando el número de parámetros es " -"variable, y los argumentos se pasan en una lista o tupla como parámetro " -"*args*. En cualquier caso, los argumentos del proceso secundario deben " -"comenzar con el nombre del comando que se ejecuta, pero esto no se aplica." +"difieren en la forma en que se pasan los argumentos de la línea de comandos. " +"Las variantes \"l\" son quizás las más fáciles de usar si el número de " +"parámetros es fijo cuando se escribe el código; los parámetros individuales " +"simplemente se convierten en parámetros adicionales para las funciones :func:" +"`!execl\\*`. Las variantes \"v\" son buenas cuando el número de parámetros " +"es variable, y los argumentos se pasan en una lista o tupla como el " +"parámetro *args*. En cualquier caso, los argumentos del proceso secundario " +"deben comenzar con el nombre del comando que se está ejecutando, pero esto " +"no se aplica." #: ../Doc/library/os.rst:4262 -#, fuzzy msgid "" "The variants which include a \"p\" near the end (:func:`execlp`, :func:" "`execlpe`, :func:`execvp`, and :func:`execvpe`) will use the :envvar:`PATH` " @@ -6464,14 +6669,16 @@ msgid "" "even on Windows, as plain names will not be resolved." msgstr "" "Las variantes que incluyen una \"p\" cerca del final (:func:`execlp`, :func:" -"`execlpe`, :func:`execvp`, y :func:`execvpe`) usarán :envvar:`PATH` variable " -"de entorno para ubicar el programa *file*. Cuando se reemplaza el entorno " -"(utilizando uno de los siguientes variantes :func:`exec\\*e ` " -"variantes, discutidas en el siguiente párrafo), el nuevo entorno se utiliza " -"como fuente de la variable :envvar:`PATH`. Las otras variantes, :func:" -"`execl`, :func:`execle`, :func:`execv`, y :func:`execve`, no utilizarán la " -"variable :envvar:`PATH` para localizar el ejecutable; *path* debe contener " -"una ruta absoluta o relativa apropiada." +"`execlpe`, :func:`execvp` y :func:`execvpe`) utilizarán la variable de " +"entorno :envvar:`PATH` para localizar el programa *file*. Cuando se " +"reemplaza el entorno (utilizando una de las variantes :func:`exec\\*e " +"`, que se analizan en el párrafo siguiente), el nuevo entorno se " +"utiliza como fuente de la variable :envvar:`PATH`. Las otras variantes, :" +"func:`execl`, :func:`execle`, :func:`execv` y :func:`execve`, no utilizarán " +"la variable :envvar:`PATH` para localizar el ejecutable; *path* debe " +"contener una ruta absoluta o relativa adecuada. Las rutas relativas deben " +"incluir al menos una barra, incluso en Windows, ya que los nombres simples " +"no se resolverán." #: ../Doc/library/os.rst:4273 msgid "" @@ -6514,12 +6721,12 @@ msgstr "" #: ../Doc/library/os.rst:4287 ../Doc/library/os.rst:4852 #: ../Doc/library/os.rst:4976 ../Doc/library/os.rst:5095 #: ../Doc/library/os.rst:5264 -#, fuzzy msgid "" ":ref:`Availability `: Unix, Windows, not WASI, not Android, " "not iOS." msgstr "" -":ref:`Disponibilidad `: Unix, Windows, no Emscripten, no WASI." +":ref:`Disponibilidad `: Unix, Windows, no WASI, no Android, no " +"iOS." #: ../Doc/library/os.rst:4289 msgid "" @@ -6538,13 +6745,13 @@ msgstr "" "limpieza, vaciar los buffers stdio, etc." #: ../Doc/library/os.rst:4303 -#, fuzzy msgid "" "The standard way to exit is :func:`sys.exit(n) `. :func:`!_exit` " "should normally only be used in the child process after a :func:`fork`." msgstr "" -"La forma estándar de salir es ``sys.exit(n)``. :func:`_exit` normalmente " -"solo debe usarse en el proceso secundario después de :func:`fork`." +"La forma estándar de salir es :func:`sys.exit(n) `. Normalmente, :" +"func:`!_exit` solo se debe utilizar en el proceso secundario después de :" +"func:`fork`." #: ../Doc/library/os.rst:4306 msgid "" @@ -6708,12 +6915,17 @@ msgid "" "If you use TLS sockets in an application calling ``fork()``, see the warning " "in the :mod:`ssl` documentation." msgstr "" +"Si utiliza sockets TLS en una aplicación que llama a ``fork()``, consulte la " +"advertencia en la documentación de :mod:`ssl`." #: ../Doc/library/os.rst:4461 ../Doc/library/os.rst:4505 msgid "" "On macOS the use of this function is unsafe when mixed with using higher-" "level system APIs, and that includes using :mod:`urllib.request`." msgstr "" +"En macOS, el uso de esta función no es seguro cuando se combina con el uso " +"de API de sistema de nivel superior, incluido el uso de :mod:`urllib." +"request`." #: ../Doc/library/os.rst:4464 msgid "" @@ -6728,6 +6940,8 @@ msgid "" "If Python is able to detect that your process has multiple threads, :func:" "`os.fork` now raises a :exc:`DeprecationWarning`." msgstr "" +"Si Python puede detectar que su proceso tiene varios subprocesos, :func:`os." +"fork` ahora genera un :exc:`DeprecationWarning`." #: ../Doc/library/os.rst:4472 msgid "" @@ -6739,6 +6953,14 @@ msgid "" "child process when threads existed in the parent (such as ``malloc`` and " "``free``)." msgstr "" +"Elegimos mostrar esto como una advertencia, cuando sea detectable, para " +"informar mejor a los desarrolladores sobre un problema de diseño que la " +"plataforma POSIX señala específicamente como no compatible. Incluso en el " +"código en el que *appears* funciona, nunca ha sido seguro mezclar " +"subprocesos con :func:`os.fork` en plataformas POSIX. El entorno de " +"ejecución de CPython en sí siempre ha realizado llamadas a la API que no son " +"seguras para su uso en el proceso secundario cuando existían subprocesos en " +"el primario (como ``malloc`` y ``free``)." #: ../Doc/library/os.rst:4481 msgid "" @@ -6746,6 +6968,10 @@ msgid "" "typically found in glibc to date are among those already more likely to " "experience deadlocks running such code." msgstr "" +"Los usuarios de macOS o los usuarios de implementaciones de libc o malloc " +"distintas de las que se encuentran habitualmente en glibc hasta la fecha se " +"encuentran entre los que tienen más probabilidades de experimentar bloqueos " +"al ejecutar dicho código." #: ../Doc/library/os.rst:4485 msgid "" @@ -6753,12 +6979,16 @@ msgid "" "discuss.python.org/t/33555>`_ for technical details of why we're surfacing " "this longstanding platform compatibility problem to developers." msgstr "" +"Consulte `this discussion on fork being incompatible with threads `_ para obtener detalles técnicos sobre el motivo " +"por el cual estamos informando a los desarrolladores de este problema de " +"compatibilidad de plataformas de larga data." #: ../Doc/library/os.rst:4490 ../Doc/library/os.rst:4750 -#, fuzzy msgid "" ":ref:`Availability `: POSIX, not WASI, not Android, not iOS." -msgstr ":ref:`Disponibilidad `: POSIX, no Emscripten, no WASI." +msgstr "" +":ref:`Disponibilidad `: POSIX, no WASI, no Android, no iOS." #: ../Doc/library/os.rst:4495 msgid "" @@ -6795,6 +7025,9 @@ msgid "" "raises a :exc:`DeprecationWarning`. See the longer explanation on :func:`os." "fork`." msgstr "" +"Si Python puede detectar que su proceso tiene varios subprocesos, esto ahora " +"genera un error :exc:`DeprecationWarning`. Consulte la explicación más " +"extensa sobre :func:`os.fork`." #: ../Doc/library/os.rst:4517 ../Doc/library/os.rst:4734 #: ../Doc/library/os.rst:4783 ../Doc/library/os.rst:5020 @@ -6808,10 +7041,10 @@ msgstr "" #: ../Doc/library/os.rst:5310 ../Doc/library/os.rst:5319 #: ../Doc/library/os.rst:5328 ../Doc/library/os.rst:5337 #: ../Doc/library/os.rst:5346 -#, fuzzy msgid "" ":ref:`Availability `: Unix, not WASI, not Android, not iOS." -msgstr ":ref:`Disponibilidad `: Unix, no WASI." +msgstr "" +":ref:`Disponibilidad `: Unix, no WASI, no Android, no iOS." #: ../Doc/library/os.rst:4526 msgid "" @@ -6823,7 +7056,6 @@ msgstr "" "`signal`." #: ../Doc/library/os.rst:4529 -#, fuzzy msgid "" "Windows: The :const:`signal.CTRL_C_EVENT` and :const:`signal." "CTRL_BREAK_EVENT` signals are special signals which can only be sent to " @@ -6833,13 +7065,13 @@ msgid "" "be set to *sig*. The Windows version of :func:`kill` additionally takes " "process handles to be killed." msgstr "" -"Windows: Las señales :data:`signal.CTRL_C_EVENT` y :data:`signal." -"CTRL_BREAK_EVENT` son señales especiales que solo pueden enviarse a procesos " -"de consola que comparten una ventana de consola común, por ejemplo, algunos " -"subprocesos. Cualquier otro valor para *sig* hará que la API " -"TerminateProcess elimine el proceso incondicionalmente, y el código de " +"Windows: Las señales :const:`signal.CTRL_C_EVENT` y :const:`signal." +"CTRL_BREAK_EVENT` son señales especiales que solo se pueden enviar a " +"procesos de consola que comparten una ventana de consola común, por ejemplo, " +"algunos subprocesos. Cualquier otro valor para *sig* hará que la API " +"TerminateProcess finalice el proceso de forma incondicional y el código de " "salida se establecerá en *sig*. La versión de Windows de :func:`kill` " -"también requiere que los identificadores de proceso sean eliminados." +"también toma los identificadores de procesos que se van a finalizar." #: ../Doc/library/os.rst:4537 msgid "See also :func:`signal.pthread_kill`." @@ -6854,10 +7086,8 @@ msgstr "" "``pid``, ``sig``." #: ../Doc/library/os.rst:4541 -#, fuzzy msgid ":ref:`Availability `: Unix, Windows, not WASI, not iOS." -msgstr "" -":ref:`Disponibilidad `: Unix, Windows, no Emscripten, no WASI." +msgstr ":ref:`Disponibilidad `: Unix, Windows, no WASI, no iOS." #: ../Doc/library/os.rst:4553 msgid "Send the signal *sig* to the process group *pgid*." @@ -6872,9 +7102,8 @@ msgstr "" "``pgid``, ``sig``." #: ../Doc/library/os.rst:4557 ../Doc/library/os.rst:4594 -#, fuzzy msgid ":ref:`Availability `: Unix, not WASI, not iOS." -msgstr ":ref:`Disponibilidad `: Unix, no WASI." +msgstr ":ref:`Disponibilidad `:Unix, no WASI, no iOS." #: ../Doc/library/os.rst:4562 msgid "" @@ -6884,30 +7113,26 @@ msgstr "" "amabilidad." #: ../Doc/library/os.rst:4569 -#, fuzzy msgid "" "Return a file descriptor referring to the process *pid* with *flags* set. " "This descriptor can be used to perform process management without races and " "signals." msgstr "" -"Retorna un descriptor de archivo referente al *pid* del proceso. Este " -"descriptor puede ser usado para realizar gestión de procesos sin necesidad " -"de señales y carreras. El argumento *flags* es proporcionado para " -"extensiones futuras; ningún valor se encuentra definido en las banderas " -"actualmente." +"Devuelve un descriptor de archivo que hace referencia al proceso *pid* con " +"*flags* configurado. Este descriptor se puede utilizar para realizar la " +"gestión de procesos sin carreras ni señales." #: ../Doc/library/os.rst:4573 msgid "See the :manpage:`pidfd_open(2)` man page for more details." msgstr "Ver la página manual de :manpage:`pidfd_open(2)` para mas detalles." #: ../Doc/library/os.rst:4575 -#, fuzzy msgid "" ":ref:`Availability `: Linux >= 5.3, Android >= :func:`build-" "time ` API level 31" msgstr "" -":ref:`Disponibilidad `: Linux >= 2.6.30, FreeBSD >= 6.0, " -"OpenBSD >= 2.7, AIX >= 7.1." +":ref:`Disponibilidad `: Linux >= 5.3, Android >= :func:`build-" +"time ` API level 31" #: ../Doc/library/os.rst:4580 msgid "" @@ -6916,11 +7141,15 @@ msgid "" "attempt to wait on the file descriptor using :manpage:`waitid(2)` will " "immediately return the error :const:`~errno.EAGAIN` rather than blocking." msgstr "" +"Esta bandera indica que el descriptor de archivo no será bloqueante. Si el " +"proceso al que hace referencia el descriptor de archivo aún no ha " +"finalizado, entonces un intento de esperar en el descriptor de archivo " +"utilizando :manpage:`waitid(2)` devolverá inmediatamente el error :const:" +"`~errno.EAGAIN` en lugar de bloquearse." #: ../Doc/library/os.rst:4585 -#, fuzzy msgid ":ref:`Availability `: Linux >= 5.10" -msgstr ":ref:`Disponibilidad `: Linux >= 5.4" +msgstr ":ref:`Disponibilidad `: Linux >= 5.10" #: ../Doc/library/os.rst:4591 msgid "" @@ -6989,9 +7218,8 @@ msgstr "" "comunicarse con subprocesos." #: ../Doc/library/os.rst:4626 -#, fuzzy msgid ":ref:`Availability `: not WASI, not Android, not iOS." -msgstr ":ref:`Disponibilidad `: no WASI." +msgstr ":ref:`Disponibilidad `: no WASI, no Android, no iOS." #: ../Doc/library/os.rst:4629 msgid "" @@ -7012,10 +7240,9 @@ msgstr "" "controlar opciones como codificaciones." #: ../Doc/library/os.rst:4641 -#, fuzzy msgid "Wraps the :c:func:`!posix_spawn` C library API for use from Python." msgstr "" -"Envuelve la API de la biblioteca C :c:func:`posix_spawn` para usar desde " +"Envuelve la API de la biblioteca C :c:func:`!posix_spawn` para su uso desde " "Python." #: ../Doc/library/os.rst:4643 @@ -7026,14 +7253,14 @@ msgstr "" "func:`posix_spawn`." #: ../Doc/library/os.rst:4645 -#, fuzzy msgid "" "The positional-only arguments *path*, *args*, and *env* are similar to :func:" "`execve`. *env* is allowed to be ``None``, in which case current process' " "environment is used." msgstr "" -"Los argumentos de solo posición *path*, *args* y *env* son similares a :func:" -"`execve`." +"Los argumentos posicionales *path*, *args* y *env* son similares a :func:" +"`execve`. Se permite que *env* sea ``None``, en cuyo caso se utiliza el " +"entorno del proceso actual." #: ../Doc/library/os.rst:4649 msgid "" @@ -7085,17 +7312,14 @@ msgid "Performs ``os.dup2(fd, new_fd)``." msgstr "Realiza ``os.dup2(fd, new_fd)``." #: ../Doc/library/os.rst:4679 -#, fuzzy msgid "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" -msgstr "(``os.POSIX_SPAWN_CLOSE``, *fd*)" +msgstr "(``os.POSIX_SPAWN_CLOSEFROM``, *fd*)" #: ../Doc/library/os.rst:4681 -#, fuzzy msgid "Performs ``os.closerange(fd, INF)``." -msgstr "Realiza ``os.close(fd)``." +msgstr "Ejecuta ``os.closerange(fd, INF)``." #: ../Doc/library/os.rst:4683 -#, fuzzy msgid "" "These tuples correspond to the C library :c:func:`!" "posix_spawn_file_actions_addopen`, :c:func:`!" @@ -7104,14 +7328,14 @@ msgid "" "posix_spawn_file_actions_addclosefrom_np` API calls used to prepare for the :" "c:func:`!posix_spawn` call itself." msgstr "" -"Estas tuplas corresponden a la biblioteca C :c:func:" -"`posix_spawn_file_actions_addopen`, :c:func:" -"`posix_spawn_file_actions_addclose`, y :c:func:" -"`posix_spawn_file_actions_adddup2` Llamadas API utilizadas para prepararse " -"para :c:func:`posix_spawn` se llame a sí mismo." +"Estas tuplas corresponden a las llamadas API de la biblioteca C :c:func:`!" +"posix_spawn_file_actions_addopen`, :c:func:`!" +"posix_spawn_file_actions_addclose`, :c:func:`!" +"posix_spawn_file_actions_adddup2` y :c:func:`!" +"posix_spawn_file_actions_addclosefrom_np` utilizadas para preparar la propia " +"llamada :c:func:`!posix_spawn`." #: ../Doc/library/os.rst:4690 -#, fuzzy msgid "" "The *setpgroup* argument will set the process group of the child to the " "value specified. If the value specified is 0, the child's process group ID " @@ -7119,15 +7343,14 @@ msgid "" "set, the child will inherit the parent's process group ID. This argument " "corresponds to the C library :c:macro:`!POSIX_SPAWN_SETPGROUP` flag." msgstr "" -"El argumento *setpgroup* establecerá el grupo de proceso del elemento " -"secundario en el valor especificado. Si el valor especificado es 0, la ID " -"del grupo de procesos del niño se hará igual que su ID de proceso. Si el " -"valor de *setpgroup* no está establecido, el elemento secundario heredará la " -"ID del grupo de proceso del elemento primario. Este argumento corresponde al " -"flag :c:data:`POSIX_SPAWN_SETPGROUP` de la biblioteca de C." +"El argumento *setpgroup* establecerá el grupo de procesos del hijo en el " +"valor especificado. Si el valor especificado es 0, el ID del grupo de " +"procesos del hijo será el mismo que el ID de su proceso. Si el valor de " +"*setpgroup* no está establecido, el hijo heredará el ID del grupo de " +"procesos del padre. Este argumento corresponde al indicador :c:macro:`!" +"POSIX_SPAWN_SETPGROUP` de la biblioteca C." #: ../Doc/library/os.rst:4696 -#, fuzzy msgid "" "If the *resetids* argument is ``True`` it will reset the effective UID and " "GID of the child to the real UID and GID of the parent process. If the " @@ -7137,29 +7360,27 @@ msgid "" "setting of the effective UID and GID. This argument corresponds to the C " "library :c:macro:`!POSIX_SPAWN_RESETIDS` flag." msgstr "" -"Si el argumento *resetids* es ``True``, restablecerá el UID y el GID " -"efectivos del niño al UID y GID reales del proceso padre. Si el argumento es " -"``False``, el niño conserva el UID y el GID efectivos del padre. En " -"cualquier caso, si los bits de permiso set-user-ID y set-group-ID están " -"habilitados en el archivo ejecutable, su efecto anulará la configuración del " -"UID y GID efectivos. Este argumento corresponde a la flag de la biblioteca " -"C :c:data:`POSIX_SPAWN_RESETIDS`." +"Si el argumento *resetids* es ``True``, restablecerá el UID y GID efectivos " +"del hijo al UID y GID reales del proceso padre. Si el argumento es " +"``False``, el hijo conserva el UID y GID efectivos del padre. En cualquier " +"caso, si los bits de permiso set-user-ID y set-group-ID están habilitados en " +"el archivo ejecutable, su efecto anulará la configuración del UID y GID " +"efectivos. Este argumento corresponde al indicador :c:macro:`!" +"POSIX_SPAWN_RESETIDS` de la biblioteca C." #: ../Doc/library/os.rst:4704 -#, fuzzy msgid "" "If the *setsid* argument is ``True``, it will create a new session ID for " "``posix_spawn``. *setsid* requires :c:macro:`!POSIX_SPAWN_SETSID` or :c:" "macro:`!POSIX_SPAWN_SETSID_NP` flag. Otherwise, :exc:`NotImplementedError` " "is raised." msgstr "" -"Si el argumento *setsid* es ``True``, creará una nueva ID de sesión para " -"``posix_spawn``. *setsid* requiere el indicador :c:data:`POSIX_SPAWN_SETSID` " -"o :c:data:`POSIX_SPAWN_SETSID_NP`. De lo contrario, se genera :exc:" -"`NotImplementedError`." +"Si el argumento *setsid* es ``True``, se creará un nuevo ID de sesión para " +"``posix_spawn``. *setsid* requiere el indicador :c:macro:`!" +"POSIX_SPAWN_SETSID` o :c:macro:`!POSIX_SPAWN_SETSID_NP`. De lo contrario, se " +"activa :exc:`NotImplementedError`." #: ../Doc/library/os.rst:4709 -#, fuzzy msgid "" "The *setsigmask* argument will set the signal mask to the signal set " "specified. If the parameter is not used, then the child inherits the " @@ -7167,23 +7388,22 @@ msgid "" "POSIX_SPAWN_SETSIGMASK` flag." msgstr "" "El argumento *setsigmask* establecerá la máscara de señal en el conjunto de " -"señal especificado. Si no se usa el parámetro, el niño hereda la máscara de " -"señal del padre. Este argumento corresponde al flag :c:data:" -"`POSIX_SPAWN_SETSIGMASK` de la biblioteca en C." +"señales especificado. Si no se utiliza el parámetro, el elemento secundario " +"hereda la máscara de señal del elemento principal. Este argumento " +"corresponde al indicador :c:macro:`!POSIX_SPAWN_SETSIGMASK` de la biblioteca " +"C." #: ../Doc/library/os.rst:4714 -#, fuzzy msgid "" "The *sigdef* argument will reset the disposition of all signals in the set " "specified. This argument corresponds to the C library :c:macro:`!" "POSIX_SPAWN_SETSIGDEF` flag." msgstr "" "El argumento *sigdef* restablecerá la disposición de todas las señales en el " -"conjunto especificado. Este argumento corresponde al flag :c:data:" -"`POSIX_SPAWN_SETSIGDEF` de la biblioteca de C." +"conjunto especificado. Este argumento corresponde al indicador :c:macro:`!" +"POSIX_SPAWN_SETSIGDEF` de la biblioteca C." #: ../Doc/library/os.rst:4718 -#, fuzzy msgid "" "The *scheduler* argument must be a tuple containing the (optional) scheduler " "policy and an instance of :class:`sched_param` with the scheduler " @@ -7193,11 +7413,11 @@ msgid "" "POSIX_SPAWN_SETSCHEDULER` flags." msgstr "" "El argumento *scheduler* debe ser una tupla que contenga la política del " -"planificador (opcional) y una instancia de :class:`sched_param` con los " -"parámetros del planificador. Un valor de ``None`` en el lugar de la política " -"del planificador indica que no se proporciona. Este argumento es una " -"combinación de la biblioteca C :c:data:`POSIX_SPAWN_SETSCHEDPARAM` y flags :" -"c:data:`POSIX_SPAWN_SETSCHEDULER`." +"programador (opcional) y una instancia de :class:`sched_param` con los " +"parámetros del programador. Un valor de ``None`` en lugar de la política del " +"programador indica que no se proporciona. Este argumento es una combinación " +"de los indicadores :c:macro:`!POSIX_SPAWN_SETSCHEDPARAM` y :c:macro:`!" +"POSIX_SPAWN_SETSCHEDULER` de la biblioteca C." #: ../Doc/library/os.rst:4725 ../Doc/library/os.rst:4746 msgid "" @@ -7213,12 +7433,14 @@ msgid "" "on platforms where :c:func:`!posix_spawn_file_actions_addclosefrom_np` " "exists." msgstr "" +"El parámetro *env* acepta ``None``. ``os.POSIX_SPAWN_CLOSEFROM`` está " +"disponible en plataformas donde existe :c:func:`!" +"posix_spawn_file_actions_addclosefrom_np`." #: ../Doc/library/os.rst:4740 -#, fuzzy msgid "Wraps the :c:func:`!posix_spawnp` C library API for use from Python." msgstr "" -"Envuelve la API de la biblioteca :c:func:`posix_spawnp` C para usar desde " +"Envuelve la API de la biblioteca C :c:func:`!posix_spawnp` para su uso desde " "Python." #: ../Doc/library/os.rst:4742 @@ -7338,7 +7560,6 @@ msgstr "" "nuevo proceso. En su lugar, genera una excepción OSError." #: ../Doc/library/os.rst:4813 -#, fuzzy msgid "" "The \"l\" and \"v\" variants of the :func:`spawn\\* ` functions " "differ in how command-line arguments are passed. The \"l\" variants are " @@ -7350,13 +7571,13 @@ msgid "" "to the child process must start with the name of the command being run." msgstr "" "Las variantes \"l\" y \"v\" de las funciones :func:`spawn\\* ` " -"difieren en cómo se pasan los argumentos de la línea de comandos. Las " -"variantes \"l\" son quizás las más fáciles de trabajar si el número de " -"parámetros se fija cuando se escribe el código; los parámetros individuales " -"simplemente se convierten en parámetros adicionales a las funciones :func:" -"`spawnl\\*`. Las variantes \"v\" son buenas cuando el número de parámetros " -"es variable, y los argumentos se pasan en una lista o tupla como parámetro " -"*args*. En cualquier caso, los argumentos del proceso secundario deben " +"difieren en la forma en que se pasan los argumentos de la línea de comandos. " +"Las variantes \"l\" son quizás las más fáciles de usar si el número de " +"parámetros es fijo cuando se escribe el código; los parámetros individuales " +"simplemente se convierten en parámetros adicionales para las funciones :func:" +"`!spawnl\\*`. Las variantes \"v\" son buenas cuando el número de parámetros " +"es variable, y los argumentos se pasan en una lista o tupla como el " +"parámetro *args*. En cualquier caso, los argumentos del proceso hijo deben " "comenzar con el nombre del comando que se está ejecutando." #: ../Doc/library/os.rst:4822 @@ -7418,6 +7639,11 @@ msgid "" "L = ['cp', 'index.html', '/dev/null']\n" "os.spawnvpe(os.P_WAIT, 'cp', L, os.environ)" msgstr "" +"import os\n" +"os.spawnlp(os.P_WAIT, 'cp', 'cp', 'index.html', '/dev/null')\n" +"\n" +"L = ['cp', 'index.html', '/dev/null']\n" +"os.spawnvpe(os.P_WAIT, 'cp', L, os.environ)" #: ../Doc/library/os.rst:4850 msgid "" @@ -7440,20 +7666,19 @@ msgstr "" "mod:`subprocess` en su lugar." #: ../Doc/library/os.rst:4866 -#, fuzzy msgid "" "Possible values for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If either of these values is given, the :func:" "`spawn\\* ` functions will return as soon as the new process has " "been created, with the process id as the return value." msgstr "" -"Valores posibles para el parámetro *mode* para :func:`spawn\\* ` " -"familia de funciones. Si se da alguno de estos valores, las funciones :func:" -"`spawn\\*` volverán tan pronto como se haya creado el nuevo proceso, con la " -"identificación del proceso como valor de retorno." +"Valores posibles para el parámetro *mode* de la familia de funciones :func:" +"`spawn\\* `. Si se proporciona cualquiera de estos valores, las " +"funciones :func:`spawn\\* ` retornarán tan pronto como se haya " +"creado el nuevo proceso, con el identificador del proceso como valor de " +"retorno." #: ../Doc/library/os.rst:4876 -#, fuzzy msgid "" "Possible value for the *mode* parameter to the :func:`spawn\\* ` " "family of functions. If this is given as *mode*, the :func:`spawn\\* " @@ -7461,11 +7686,12 @@ msgid "" "completion and will return the exit code of the process the run is " "successful, or ``-signal`` if a signal kills the process." msgstr "" -"Posible valor para el parámetro *mode* para :func:`spawn\\* ` " -"familia de funciones. Si esto se da como *mode*, las funciones :func:" -"`spawn\\*` no volverán hasta que el nuevo proceso se haya completado y " -"retornará el código de salida del proceso, la ejecución es exitosa, o ``-" -"signal`` si una señal mata el proceso." +"Valor posible para el parámetro *mode* de la familia de funciones :func:" +"`spawn\\* `. Si se proporciona como *mode*, las funciones :func:" +"`spawn\\* ` no regresarán hasta que el nuevo proceso se haya " +"ejecutado por completo y devolverán el código de salida del proceso cuya " +"ejecución se realizó correctamente, o ``-signal`` si una señal finaliza el " +"proceso." #: ../Doc/library/os.rst:4888 msgid "" @@ -7488,31 +7714,30 @@ msgid "Start a file with its associated application." msgstr "Inicie un archivo con su aplicación asociada." #: ../Doc/library/os.rst:4901 -#, fuzzy msgid "" "When *operation* is not specified, this acts like double-clicking the file " "in Windows Explorer, or giving the file name as an argument to the :program:" "`start` command from the interactive command shell: the file is opened with " "whatever application (if any) its extension is associated." msgstr "" -"Cuando *operation* no se especifica o ``'abre'``, esto actúa como hacer " -"doble clic en el archivo en el Explorador de Windows, o dar el nombre del " -"archivo como argumento para el comando :program:`start` desde el shell de " -"comandos interactivo: el archivo se abre con cualquier aplicación (si la " -"hay) a la que está asociada su extensión." +"Cuando no se especifica *operation*, esto actúa como hacer doble clic en el " +"archivo en el Explorador de Windows o dar el nombre del archivo como " +"argumento al comando :program:`start` desde el shell de comandos " +"interactivo: el archivo se abre con cualquier aplicación (si hay alguna) con " +"la que esté asociada su extensión." #: ../Doc/library/os.rst:4906 -#, fuzzy msgid "" "When another *operation* is given, it must be a \"command verb\" that " "specifies what should be done with the file. Common verbs documented by " "Microsoft are ``'open'``, ``'print'`` and ``'edit'`` (to be used on files) " "as well as ``'explore'`` and ``'find'`` (to be used on directories)." msgstr "" -"Cuando se da otra *operation*, debe ser un \"verbo de comando\" que " -"especifica qué se debe hacer con el archivo. Los verbos comunes documentados " -"por Microsoft son ``'print'`` y ``'edit'`` (para usar en archivos), así como " -"``'explore'`` y ``'find'`` (para usar en directorios)." +"Cuando se proporciona otro *operation*, debe ser un \"verbo de comando\" que " +"especifique qué se debe hacer con el archivo. Los verbos comunes " +"documentados por Microsoft son ``'open'``, ``'print'`` y ``'edit'`` (para " +"usar en archivos), así como ``'explore'`` y ``'find'`` (para usar en " +"directorios)." #: ../Doc/library/os.rst:4911 msgid "" @@ -7535,16 +7760,15 @@ msgstr "" "resolverá contra este argumento." #: ../Doc/library/os.rst:4919 -#, fuzzy msgid "" "Use *show_cmd* to override the default window style. Whether this has any " "effect will depend on the application being launched. Values are integers as " "supported by the Win32 :c:func:`!ShellExecute` function." msgstr "" -"Utilice *show_cmd* para anular el estilo de ventana predeterminado. Si esto " -"tiene algún efecto dependerá de la aplicación que se esté iniciando. Los " -"valores son números enteros admitidos por la función Win32 :c:func:" -"`ShellExecute`." +"Utilice *show_cmd* para anular el estilo de ventana predeterminado. El " +"efecto que esto tenga dependerá de la aplicación que se esté ejecutando. Los " +"valores son números enteros, tal como lo admite la función :c:func:`!" +"ShellExecute` de Win32." #: ../Doc/library/os.rst:4923 msgid "" @@ -7565,16 +7789,14 @@ msgstr "" "rutas estén codificadas correctamente para Win32." #: ../Doc/library/os.rst:4931 -#, fuzzy msgid "" "To reduce interpreter startup overhead, the Win32 :c:func:`!ShellExecute` " "function is not resolved until this function is first called. If the " "function cannot be resolved, :exc:`NotImplementedError` will be raised." msgstr "" "Para reducir la sobrecarga de inicio del intérprete, la función Win32 :c:" -"func:`ShellExecute` no se resuelve hasta que esta función se llama por " -"primera vez. Si la función no se puede resolver, se lanzará :exc:" -"`NotImplementedError`." +"func:`!ShellExecute` no se resuelve hasta que se la llama por primera vez. " +"Si no se puede resolver la función, se generará :exc:`NotImplementedError`." #: ../Doc/library/os.rst:4935 msgid "" @@ -7713,7 +7935,6 @@ msgstr "" "children_user`, :attr:`!children_system` y :attr:`!elapsed` en ese orden." #: ../Doc/library/os.rst:4994 -#, fuzzy msgid "" "See the Unix manual page :manpage:`times(2)` and `times(3) `_ manual page on Unix or `the " @@ -7722,11 +7943,11 @@ msgid "" "Windows, only :attr:`!user` and :attr:`!system` are known; the other " "attributes are zero." msgstr "" -"Consulte la página del manual de Unix :manpage:`times(2)` y la página del " -"manual de `times(3) `_ en Unix " -"o `the GetProcessTimes MSDN `_ en Unix o `the " +"GetProcessTimes MSDN `_ en Windows. En " -"Windows, solo se conocen :attr:`!user` y :attr:`!system`; los otros " +"Windows, solo se conocen :attr:`!user` y :attr:`!system`; los demás " "atributos son cero." #: ../Doc/library/os.rst:5008 @@ -7747,7 +7968,7 @@ msgstr "" msgid "" "If there are no children that could be waited for, :exc:`ChildProcessError` " "is raised." -msgstr "" +msgstr "Si no hay niños a los que esperar, se genera :exc:`ChildProcessError`." #: ../Doc/library/os.rst:5017 ../Doc/library/os.rst:5092 msgid "" @@ -7758,18 +7979,19 @@ msgstr "" "salida en el código de salida." #: ../Doc/library/os.rst:5024 -#, fuzzy msgid "" "The other :func:`!wait*` functions documented below can be used to wait for " "the completion of a specific child process and have more options. :func:" "`waitpid` is the only one also available on Windows." msgstr "" -":func:`waitpid` puede ser usado para esperar a la terminación de algún " -"proceso hijo en específico y tiene más opciones." +"Las demás funciones :func:`!wait*` documentadas a continuación se pueden " +"utilizar para esperar a que se complete un proceso secundario específico y " +"tener más opciones. :func:`waitpid` es la única que también está disponible " +"en Windows." #: ../Doc/library/os.rst:5031 msgid "Wait for the completion of a child process." -msgstr "" +msgstr "Esperar a que se complete un proceso secundario." #: ../Doc/library/os.rst:5033 msgid "" @@ -7777,6 +7999,9 @@ msgid "" "data:`P_PIDFD`. The interpretation of *id* depends on it; see their " "individual descriptions." msgstr "" +"*idtype* puede ser :data:`P_PID`, :data:`P_PGID`, :data:`P_ALL` o (en " +"Linux) :data:`P_PIDFD`. La interpretación de *id* depende de ello; consulte " +"sus descripciones individuales." #: ../Doc/library/os.rst:5036 msgid "" @@ -7784,34 +8009,43 @@ msgid "" "data:`WSTOPPED` or :data:`WCONTINUED` is required; :data:`WNOHANG` and :data:" "`WNOWAIT` are additional optional flags." msgstr "" +"*options* es una combinación OR de indicadores. Se requiere al menos uno de :" +"data:`WEXITED`, :data:`WSTOPPED` o :data:`WCONTINUED`; :data:`WNOHANG` y :" +"data:`WNOWAIT` son indicadores opcionales adicionales." #: ../Doc/library/os.rst:5040 msgid "" "The return value is an object representing the data contained in the :c:type:" "`siginfo_t` structure with the following attributes:" msgstr "" +"El valor de retorno es un objeto que representa los datos contenidos en la " +"estructura :c:type:`siginfo_t` con los siguientes atributos:" #: ../Doc/library/os.rst:5043 msgid ":attr:`!si_pid` (process ID)" -msgstr "" +msgstr ":attr:`!si_pid` (identificación del proceso)" #: ../Doc/library/os.rst:5044 msgid ":attr:`!si_uid` (real user ID of the child)" -msgstr "" +msgstr ":attr:`!si_uid` (ID de usuario real del niño)" #: ../Doc/library/os.rst:5045 msgid ":attr:`!si_signo` (always :const:`~signal.SIGCHLD`)" -msgstr "" +msgstr ":attr:`!si_signo` (siempre :const:`~signal.SIGCHLD`)" #: ../Doc/library/os.rst:5046 msgid "" ":attr:`!si_status` (the exit status or signal number, depending on :attr:`!" "si_code`)" msgstr "" +":attr:`!si_status` (el estado de salida o el número de señal, según :attr:`!" +"si_code`)" #: ../Doc/library/os.rst:5047 msgid ":attr:`!si_code` (see :data:`CLD_EXITED` for possible values)" msgstr "" +":attr:`!si_code` (consulte :data:`CLD_EXITED` para conocer los posibles " +"valores)" #: ../Doc/library/os.rst:5049 msgid "" @@ -7819,11 +8053,14 @@ msgid "" "requested state, ``None`` is returned. Otherwise, if there are no matching " "children that could be waited for, :exc:`ChildProcessError` is raised." msgstr "" +"Si se especifica :data:`WNOHANG` y no hay elementos secundarios coincidentes " +"en el estado solicitado, se devuelve ``None``. De lo contrario, si no hay " +"elementos secundarios coincidentes que se puedan esperar, se genera :exc:" +"`ChildProcessError`." #: ../Doc/library/os.rst:5058 -#, fuzzy msgid "This function is now available on macOS as well." -msgstr "Esta función no está disponible en MacOS." +msgstr "Esta función ahora también está disponible en macOS." #: ../Doc/library/os.rst:5064 msgid "The details of this function differ on Unix and Windows." @@ -7869,6 +8106,11 @@ msgid "" "for, :exc:`ChildProcessError` is raised. Other options that can be used " "are :data:`WUNTRACED` and :data:`WCONTINUED`." msgstr "" +"*options* es una combinación OR de indicadores. Si contiene :data:`WNOHANG` " +"y no hay hijos coincidentes en el estado solicitado, se devuelve ``(0, 0)``. " +"De lo contrario, si no hay hijos coincidentes que se puedan esperar, se " +"genera :exc:`ChildProcessError`. Otras opciones que se pueden utilizar son :" +"data:`WUNTRACED` y :data:`WCONTINUED`." #: ../Doc/library/os.rst:5084 msgid "" @@ -7892,7 +8134,6 @@ msgstr "" "manejadores de proceso adecuados." #: ../Doc/library/os.rst:5105 -#, fuzzy msgid "" "Similar to :func:`waitpid`, except no process id argument is given and a 3-" "element tuple containing the child's process id, exit status indication, and " @@ -7901,12 +8142,12 @@ msgid "" "same as that provided to :func:`waitpid` and :func:`wait4`." msgstr "" "Similar a :func:`waitpid`, excepto que no se proporciona ningún argumento de " -"identificación de proceso y se retorna una tupla de 3 elementos que contiene " -"la identificación de proceso del niño, la indicación del estado de salida y " -"la información de uso de recursos. Consulte :mod:`resource`. \\ :func:" -"`~resource.getrusage` para obtener detalles sobre la información de uso de " -"recursos. El argumento de la opción es el mismo que se proporciona a :func:" -"`waitpid` y :func:`wait4`." +"identificación de proceso y se devuelve una tupla de 3 elementos que " +"contiene la identificación del proceso del hijo, la indicación del estado de " +"salida y la información de uso de recursos. Consulte :func:`resource." +"getrusage` para obtener detalles sobre la información de uso de recursos. El " +"argumento *options* es el mismo que se proporciona a :func:`waitpid` y :func:" +"`wait4`." #: ../Doc/library/os.rst:5112 ../Doc/library/os.rst:5126 msgid "" @@ -7917,7 +8158,6 @@ msgstr "" "salida al código de salida." #: ../Doc/library/os.rst:5120 -#, fuzzy msgid "" "Similar to :func:`waitpid`, except a 3-element tuple, containing the child's " "process id, exit status indication, and resource usage information is " @@ -7925,97 +8165,104 @@ msgid "" "information. The arguments to :func:`wait4` are the same as those provided " "to :func:`waitpid`." msgstr "" -"Similar a :func:`waitpid`, excepto una tupla de 3 elementos, que contiene la " -"identificación del proceso del niño, la indicación del estado de salida y la " -"información de uso de recursos. Consulte :mod:`resource`.\\ :func:`~resource." -"getrusage` para obtener detalles sobre la información de uso de recursos. " -"Los argumentos para :func:`wait4` son los mismos que los proporcionados " -"para :func:`waitpid`." +"Similar a :func:`waitpid`, excepto que se devuelve una tupla de 3 elementos " +"que contiene el identificador del proceso secundario, la indicación del " +"estado de salida y la información de uso de recursos. Consulte :func:" +"`resource.getrusage` para obtener detalles sobre la información de uso de " +"recursos. Los argumentos de :func:`wait4` son los mismos que los " +"proporcionados a :func:`waitpid`." #: ../Doc/library/os.rst:5137 -#, fuzzy msgid "" "These are the possible values for *idtype* in :func:`waitid`. They affect " "how *id* is interpreted:" msgstr "" -"Estos son los valores posibles para *idtype* en :func:`waitid`. Afectan cómo " -"se interpreta *id*." +"Estos son los valores posibles para *idtype* en :func:`waitid`. Afectan a la " +"interpretación de *id*:" #: ../Doc/library/os.rst:5140 msgid ":data:`!P_PID` - wait for the child whose PID is *id*." -msgstr "" +msgstr ":data:`!P_PID`: espera al niño cuyo PID es *id*." #: ../Doc/library/os.rst:5141 msgid ":data:`!P_PGID` - wait for any child whose progress group ID is *id*." msgstr "" +":data:`!P_PGID`: espera a cualquier niño cuyo ID de grupo de progreso sea " +"*id*." #: ../Doc/library/os.rst:5142 msgid ":data:`!P_ALL` - wait for any child; *id* is ignored." -msgstr "" +msgstr ":data:`!P_ALL` - espera a cualquier hijo; *id* se ignora." #: ../Doc/library/os.rst:5143 msgid "" ":data:`!P_PIDFD` - wait for the child identified by the file descriptor *id* " "(a process file descriptor created with :func:`pidfd_open`)." msgstr "" +":data:`!P_PIDFD`: espera al niño identificado por el descriptor de archivo " +"*id* (un descriptor de archivo de proceso creado con :func:`pidfd_open`)." #: ../Doc/library/os.rst:5148 msgid ":data:`!P_PIDFD` is only available on Linux >= 5.4." -msgstr "" +msgstr ":data:`!P_PIDFD` solo está disponible en Linux >= 5.4." #: ../Doc/library/os.rst:5151 -#, fuzzy msgid "The :data:`!P_PIDFD` constant." -msgstr "Se agregó la constante :data:`O_CLOEXEC`." +msgstr "La constante :data:`!P_PIDFD`." #: ../Doc/library/os.rst:5157 -#, fuzzy msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, :func:`wait4`, and :" "func:`waitid` causes child processes to be reported if they have been " "continued from a job control stop since they were last reported." msgstr "" -"Esta opción hace que se informen los procesos secundarios si se han " -"continuado desde una parada de control de trabajo desde la última vez que se " -"informó su estado." +"Esta bandera *options* para :func:`waitpid`, :func:`wait3`, :func:`wait4` y :" +"func:`waitid` hace que se informe sobre los procesos secundarios si han " +"continuado desde una detención del control de trabajo desde que se " +"informaron por última vez." #: ../Doc/library/os.rst:5166 msgid "" "This *options* flag for :func:`waitid` causes child processes that have " "terminated to be reported." msgstr "" +"Esta bandera *options* para :func:`waitid` hace que se informen los procesos " +"secundarios que han finalizado." #: ../Doc/library/os.rst:5169 msgid "" "The other ``wait*`` functions always report children that have terminated, " "so this option is not available for them." msgstr "" +"Las demás funciones ``wait*`` siempre informan sobre los hijos que han " +"finalizado, por lo que esta opción no está disponible para ellos." #: ../Doc/library/os.rst:5179 msgid "" "This *options* flag for :func:`waitid` causes child processes that have been " "stopped by the delivery of a signal to be reported." msgstr "" +"Esta bandera *options* para :func:`waitid` hace que se informen los procesos " +"secundarios que se han detenido por la entrega de una señal." #: ../Doc/library/os.rst:5182 ../Doc/library/os.rst:5214 -#, fuzzy msgid "This option is not available for the other ``wait*`` functions." -msgstr "Esta función no está disponible en MacOS." +msgstr "Esta opción no está disponible para las demás funciones ``wait*``." #: ../Doc/library/os.rst:5191 -#, fuzzy msgid "" "This *options* flag for :func:`waitpid`, :func:`wait3`, and :func:`wait4` " "causes child processes to also be reported if they have been stopped but " "their current state has not been reported since they were stopped." msgstr "" -"Esta opción hace que se informen los procesos secundarios si se han detenido " -"pero su estado actual no se ha informado desde que se detuvieron." +"Esta bandera *options* para :func:`waitpid`, :func:`wait3` y :func:`wait4` " +"hace que también se informe sobre los procesos secundarios si se han " +"detenido pero no se ha informado sobre su estado actual desde que se " +"detuvieron." #: ../Doc/library/os.rst:5195 -#, fuzzy msgid "This option is not available for :func:`waitid`." -msgstr "Esta función no está disponible en MacOS." +msgstr "Esta opción no está disponible para :func:`waitid`." #: ../Doc/library/os.rst:5202 msgid "" @@ -8023,6 +8270,9 @@ msgid "" "and :func:`waitid` to return right away if no child process status is " "available immediately." msgstr "" +"Esta bandera *options* hace que :func:`waitpid`, :func:`wait3`, :func:" +"`wait4` y :func:`waitid` regresen inmediatamente si no hay ningún estado de " +"proceso secundario disponible inmediatamente." #: ../Doc/library/os.rst:5211 msgid "" @@ -8030,15 +8280,17 @@ msgid "" "state, so that a later :func:`!wait*` call can be used to retrieve the child " "status information again." msgstr "" +"Esta bandera *options* hace que :func:`waitid` deje al niño en un estado de " +"espera, de modo que se pueda usar una llamada :func:`!wait*` posterior para " +"recuperar nuevamente la información del estado del niño." #: ../Doc/library/os.rst:5226 -#, fuzzy msgid "" "These are the possible values for :attr:`!si_code` in the result returned " "by :func:`waitid`." msgstr "" -"Estos son los valores posibles para :attr:`si_code` en el resultado " -"retornado por :func:`waitid`." +"Estos son los valores posibles para :attr:`!si_code` en el resultado " +"devuelto por :func:`waitid`." #: ../Doc/library/os.rst:5233 msgid "Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values." @@ -8124,15 +8376,14 @@ msgid "This function should be employed only if :func:`WIFSIGNALED` is true." msgstr "Esta función debe emplearse solo si :func:`WIFSIGNALED` es verdadero." #: ../Doc/library/os.rst:5285 -#, fuzzy msgid "" "Return ``True`` if a stopped child has been resumed by delivery of :const:" "`~signal.SIGCONT` (if the process has been continued from a job control " "stop), otherwise return ``False``." msgstr "" -"Retorna ``True`` si un niño detenido se ha reanudado mediante la entrega de :" -"data:`~signal.SIGCONT` (si el proceso se ha continuado desde una parada de " -"control de trabajo), de lo contrario, retorna ``False``." +"Devuelve ``True`` si un hijo detenido se ha reanudado mediante la entrega " +"de :const:`~signal.SIGCONT` (si el proceso ha continuado desde una detención " +"del control de trabajo); de lo contrario, devuelve ``False``." #: ../Doc/library/os.rst:5289 msgid "See :data:`WCONTINUED` option." @@ -8353,25 +8604,22 @@ msgstr "" "CPU a las que se debe restringir el proceso." #: ../Doc/library/os.rst:5464 -#, fuzzy msgid "Return the set of CPUs the process with PID *pid* is restricted to." msgstr "" -"Retorna el conjunto de CPU al proceso con PID *pid* (o el proceso actual si " -"es cero) está restringido." +"Devuelve el conjunto de CPU a las que está restringido el proceso con PID " +"*pid*." #: ../Doc/library/os.rst:5466 -#, fuzzy msgid "" "If *pid* is zero, return the set of CPUs the calling thread of the current " "process is restricted to." msgstr "" -"Retorna el conjunto de CPU al proceso con PID *pid* (o el proceso actual si " -"es cero) está restringido." +"Si *pid* es cero, devuelve el conjunto de CPU a las que está restringido el " +"hilo de llamada del proceso actual." #: ../Doc/library/os.rst:5469 -#, fuzzy msgid "See also the :func:`process_cpu_count` function." -msgstr "La función :func:`.stat`." +msgstr "Véase también la función :func:`process_cpu_count`." #: ../Doc/library/os.rst:5475 msgid "Miscellaneous System Information" @@ -8427,25 +8675,29 @@ msgstr "" "puede usar para determinar el conjunto de nombres conocidos por el sistema." #: ../Doc/library/os.rst:5510 -#, fuzzy msgid "" "Return the number of logical CPUs in the **system**. Returns ``None`` if " "undetermined." msgstr "" -"Retorna el número de CPU en el sistema. Retorna ``None`` si no está " -"determinado." +"Devuelve la cantidad de CPU lógicas en **system**. Devuelve ``None`` si no " +"se determina." #: ../Doc/library/os.rst:5513 msgid "" "The :func:`process_cpu_count` function can be used to get the number of " "logical CPUs usable by the calling thread of the **current process**." msgstr "" +"La función :func:`process_cpu_count` se puede utilizar para obtener la " +"cantidad de CPU lógicas que puede utilizar el hilo que llama a **current " +"process**." #: ../Doc/library/os.rst:5518 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " "set, :func:`cpu_count` returns the overridden value *n*." msgstr "" +"Si se proporciona :option:`-X cpu_count <-X>` o se establece :envvar:" +"`PYTHON_CPU_COUNT`, :func:`cpu_count` devuelve el valor anulado *n*." #: ../Doc/library/os.rst:5525 msgid "" @@ -8463,23 +8715,29 @@ msgid "" "process**. Returns ``None`` if undetermined. It can be less than :func:" "`cpu_count` depending on the CPU affinity." msgstr "" +"Obtiene la cantidad de CPU lógicas que puede utilizar el subproceso que " +"realiza la llamada a **current process**. Devuelve ``None`` si no se " +"determina. Puede ser menor que :func:`cpu_count` según la afinidad de la CPU." #: ../Doc/library/os.rst:5538 msgid "" "The :func:`cpu_count` function can be used to get the number of logical CPUs " "in the **system**." msgstr "" +"La función :func:`cpu_count` se puede utilizar para obtener la cantidad de " +"CPU lógicas en **system**." #: ../Doc/library/os.rst:5541 msgid "" "If :option:`-X cpu_count <-X>` is given or :envvar:`PYTHON_CPU_COUNT` is " "set, :func:`process_cpu_count` returns the overridden value *n*." msgstr "" +"Si se proporciona :option:`-X cpu_count <-X>` o se establece :envvar:" +"`PYTHON_CPU_COUNT`, :func:`process_cpu_count` devuelve el valor anulado *n*." #: ../Doc/library/os.rst:5544 -#, fuzzy msgid "See also the :func:`sched_getaffinity` functions." -msgstr "La función :func:`.stat`." +msgstr "Vea también las funciones :func:`sched_getaffinity`." #: ../Doc/library/os.rst:5551 msgid "" @@ -8670,15 +8928,14 @@ msgstr "" "los dispositivos ``/dev/random`` y ``/dev/urandom``." #: ../Doc/library/os.rst:5681 -#, fuzzy msgid "" "The flags argument is a bit mask that can contain zero or more of the " "following values ORed together: :py:const:`os.GRND_RANDOM` and :py:data:" "`GRND_NONBLOCK`." msgstr "" -"El argumento de las flags es una máscara de bits que puede contener cero o " -"más de los siguientes valores OR juntos:: py :data:`os.GRND_RANDOM` y :py:" -"data:`GRND_NONBLOCK`." +"El argumento de banderas es una máscara de bits que puede contener cero o " +"más de los siguientes valores unidos mediante OR: :py:const:`os.GRND_RANDOM` " +"y :py:data:`GRND_NONBLOCK`." #: ../Doc/library/os.rst:5685 msgid "" @@ -8689,7 +8946,6 @@ msgstr "" "pages/man2/getrandom.2.html>`_." #: ../Doc/library/os.rst:5688 -#, fuzzy msgid ":ref:`Availability `: Linux >= 3.17." msgstr ":ref:`Disponibilidad `: Linux >= 3.17." @@ -8817,144 +9073,143 @@ msgstr "" #: ../Doc/library/os.rst:363 ../Doc/library/os.rst:529 #: ../Doc/library/os.rst:731 msgid "user" -msgstr "" +msgstr "usuario" #: ../Doc/library/os.rst:363 msgid "effective id" -msgstr "" +msgstr "identificación efectiva" #: ../Doc/library/os.rst:372 ../Doc/library/os.rst:438 #: ../Doc/library/os.rst:447 ../Doc/library/os.rst:456 #: ../Doc/library/os.rst:470 ../Doc/library/os.rst:666 #: ../Doc/library/os.rst:4522 ../Doc/library/os.rst:4549 msgid "process" -msgstr "" +msgstr "proceso" #: ../Doc/library/os.rst:372 ../Doc/library/os.rst:438 msgid "group" -msgstr "" +msgstr "grupo" #: ../Doc/library/os.rst:447 ../Doc/library/os.rst:529 msgid "id" -msgstr "" +msgstr "id" #: ../Doc/library/os.rst:456 msgid "id of parent" -msgstr "" +msgstr "identificación del padre" #: ../Doc/library/os.rst:470 ../Doc/library/os.rst:666 -#, fuzzy msgid "scheduling priority" -msgstr "La política de programación predeterminada." +msgstr "prioridad de programación" #: ../Doc/library/os.rst:552 ../Doc/library/os.rst:801 msgid "environment variables" -msgstr "" +msgstr "variables de entorno" #: ../Doc/library/os.rst:552 msgid "setting" -msgstr "" +msgstr "configuración" #: ../Doc/library/os.rst:731 msgid "id, setting" -msgstr "" +msgstr "identificación, configuración" #: ../Doc/library/os.rst:764 msgid "gethostname() (in module socket)" -msgstr "" +msgstr "gethostname() (en el socket del módulo)" #: ../Doc/library/os.rst:764 msgid "gethostbyaddr() (in module socket)" -msgstr "" +msgstr "gethostbyaddr() (en el socket del módulo)" #: ../Doc/library/os.rst:801 ../Doc/library/os.rst:2658 msgid "deleting" -msgstr "" +msgstr "borrando" #: ../Doc/library/os.rst:1360 ../Doc/library/os.rst:3028 msgid "module" -msgstr "" +msgstr "módulo" #: ../Doc/library/os.rst:1360 msgid "pty" -msgstr "" +msgstr "pty" #: ../Doc/library/os.rst:2045 ../Doc/library/os.rst:2457 #: ../Doc/library/os.rst:2658 ../Doc/library/os.rst:3562 #: ../Doc/library/os.rst:3661 msgid "directory" -msgstr "" +msgstr "directorio" #: ../Doc/library/os.rst:2045 msgid "changing" -msgstr "" +msgstr "cambio" #: ../Doc/library/os.rst:2457 msgid "creating" -msgstr "" +msgstr "creando" #: ../Doc/library/os.rst:2457 msgid "UNC paths" -msgstr "" +msgstr "rutas UNC" #: ../Doc/library/os.rst:2457 msgid "and os.makedirs()" -msgstr "" +msgstr "y os.makedirs()" #: ../Doc/library/os.rst:3028 msgid "stat" -msgstr "" +msgstr "estadística" #: ../Doc/library/os.rst:3562 ../Doc/library/os.rst:3661 msgid "walking" -msgstr "" +msgstr "caminando" #: ../Doc/library/os.rst:3562 ../Doc/library/os.rst:3661 msgid "traversal" -msgstr "" +msgstr "Travesía" #: ../Doc/library/os.rst:4522 ../Doc/library/os.rst:4549 msgid "killing" -msgstr "" +msgstr "asesinato" #: ../Doc/library/os.rst:4522 ../Doc/library/os.rst:4549 msgid "signalling" -msgstr "" +msgstr "señalización" #: ../Doc/library/os.rst:5576 ../Doc/library/os.rst:5612 msgid ". (dot)" -msgstr "" +msgstr ". (punto)" #: ../Doc/library/os.rst:5576 ../Doc/library/os.rst:5584 #: ../Doc/library/os.rst:5592 ../Doc/library/os.rst:5603 #: ../Doc/library/os.rst:5612 msgid "in pathnames" -msgstr "" +msgstr "en nombres de ruta" #: ../Doc/library/os.rst:5584 msgid ".." -msgstr "" +msgstr ".." #: ../Doc/library/os.rst:5592 ../Doc/library/os.rst:5603 msgid "/ (slash)" -msgstr "" +msgstr "/ (barra)" #: ../Doc/library/os.rst:5593 msgid "\\ (backslash)" -msgstr "" +msgstr "\\ (barra inversa)" #: ../Doc/library/os.rst:5593 msgid "in pathnames (Windows)" -msgstr "" +msgstr "en nombres de ruta (Windows)" #: ../Doc/library/os.rst:5619 msgid ": (colon)" -msgstr "" +msgstr ": (dos puntos)" #: ../Doc/library/os.rst:5619 msgid "path separator (POSIX)" -msgstr "" +msgstr "separador de ruta (POSIX)" #: ../Doc/library/os.rst:5619 msgid "; (semicolon)" -msgstr "" +msgstr "; (punto y coma)" From 45d3b05f3c3eb0524552590830d26341d543747d Mon Sep 17 00:00:00 2001 From: kbiggers Date: Tue, 14 Oct 2025 10:21:24 +0000 Subject: [PATCH 25/40] Traducido deprecations/pending-removal-in-3.15.po (#3365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #3293 --------- Co-authored-by: Cristián Maureira-Fredes Co-authored-by: rtobar --- deprecations/pending-removal-in-3.15.po | 62 +++++++++++++++++++------ 1 file changed, 49 insertions(+), 13 deletions(-) diff --git a/deprecations/pending-removal-in-3.15.po b/deprecations/pending-removal-in-3.15.po index bc243d2a66..bd13b4dd98 100644 --- a/deprecations/pending-removal-in-3.15.po +++ b/deprecations/pending-removal-in-3.15.po @@ -10,33 +10,36 @@ msgstr "" "Project-Id-Version: Python en Español 3.13\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language: es\n" +"PO-Revision-Date: 2025-01-31 23:04-0500\n" +"Last-Translator: \n" "Language-Team: 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.5\n" #: ../Doc/deprecations/pending-removal-in-3.15.rst:2 msgid "Pending Removal in Python 3.15" -msgstr "" +msgstr "Eliminación pendiente en Python 3.15" #: ../Doc/deprecations/pending-removal-in-3.15.rst:4 msgid ":mod:`ctypes`:" -msgstr "" +msgstr ":mod:`ctypes`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:6 msgid "" "The undocumented :func:`!ctypes.SetPointerType` function has been deprecated " "since Python 3.13." msgstr "" +"La función indocumentada :func:`!ctypes.SetPointerType` ha quedado obsoleta " +"desde Python 3.13." #: ../Doc/deprecations/pending-removal-in-3.15.rst:9 msgid ":mod:`http.server`:" -msgstr "" +msgstr ":mod:`http.server`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:11 msgid "" @@ -44,22 +47,30 @@ msgid "" "been deprecated since Python 3.13. No direct replacement exists. *Anything* " "is better than CGI to interface a web server with a request handler." msgstr "" +"La clase obsoleta y raramente usada :class:`~http.server." +"CGIHTTPRequestHandler` ha quedado obsoleta desde Python 3.13. No existe un " +"reemplazo directo. *Cualquier cosa* es mejor que CGI para interconectar un " +"servidor web con un controlador de solicitudes." #: ../Doc/deprecations/pending-removal-in-3.15.rst:17 msgid "" "The :option:`!--cgi` flag to the :program:`python -m http.server` command-" "line interface has been deprecated since Python 3.13." msgstr "" +"El indicador :option:`!--cgi` a la interfaz de línea de comandos :program:" +"`python -m http.server` ha quedado obsoleto desde Python 3.13." #: ../Doc/deprecations/pending-removal-in-3.15.rst:20 msgid "" ":mod:`importlib`: ``__package__`` and ``__cached__`` will cease to be set or " "taken into consideration by the import system (:gh:`97879`)." msgstr "" +":mod:`importlib`: ``__package__`` y ``__cached__`` dejarán de configurarse o " +"tomarse en consideración por el sistema de importación (:gh:`97879`)." #: ../Doc/deprecations/pending-removal-in-3.15.rst:23 msgid ":class:`locale`:" -msgstr "" +msgstr ":class:`locale`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:25 msgid "" @@ -69,20 +80,27 @@ msgid "" "getlocale`, :func:`~locale.setlocale`, and :func:`~locale.getencoding` " "instead. (Contributed by Hugo van Kemenade in :gh:`111187`.)" msgstr "" +"La función :func:`~locale.getdefaultlocale` ha quedado obsoleta desde Python " +"3.11. La eliminación se programó originalmente para Python 3.13 (:gh:" +"`90817`), pero ha sido pospuesto hasta Python 3.15. En su lugar, utilice :" +"func:`~locale.getlocale`, :func:`~locale.setlocale`, y :func:`~locale." +"getencoding`. (Contribuido por Hugo van Kemenade in :gh:`111187`.)" #: ../Doc/deprecations/pending-removal-in-3.15.rst:33 msgid ":mod:`pathlib`:" -msgstr "" +msgstr ":mod:`pathlib`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:35 msgid "" ":meth:`.PurePath.is_reserved` has been deprecated since Python 3.13. Use :" "func:`os.path.isreserved` to detect reserved paths on Windows." msgstr "" +":meth:`.PurePath.is_reserved` ha quedado obsoleto desde Python 3.13. Utilice :" +"func:`os.path.isreserved` para detectar rutas reservadas en Windows." #: ../Doc/deprecations/pending-removal-in-3.15.rst:39 msgid ":mod:`platform`:" -msgstr "" +msgstr ":mod:`platform`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:41 msgid "" @@ -90,10 +108,13 @@ msgid "" "function is only useful for Jython support, has a confusing API, and is " "largely untested." msgstr "" +":func:`~platform.java_ver` ha quedado obsoleta desde Python 3.13. Esta " +"función es útil solo para la compatibilidad con Jython, tiene una API " +"confusa y, en gran parte, falta pruebas." #: ../Doc/deprecations/pending-removal-in-3.15.rst:45 msgid ":mod:`threading`:" -msgstr "" +msgstr ":mod:`threading`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:47 msgid "" @@ -102,10 +123,15 @@ msgid "" "not permit any arguments, but the C version allows any number of positional " "or keyword arguments, ignoring every argument." msgstr "" +":func:`~threading.RLock` no aceptará argumentos en Python 3.15. Pasar " +"cualquier argumento ha quedado obsoleto desde Python 3.14, ya que la versión " +"de Python no permite ningún argumento, pero la versión de C permite " +"cualquier cantidad de argumentos posicionales o de palabras clave por " +"palabra llave o posicional, ignorando todos los argumentos." #: ../Doc/deprecations/pending-removal-in-3.15.rst:53 msgid ":mod:`typing`:" -msgstr "" +msgstr ":mod:`typing`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:55 msgid "" @@ -114,6 +140,10 @@ msgid "" "has been deprecated since Python 3.13. Use the class-based syntax or the " "functional syntax instead." msgstr "" +"La sintaxis de argumentos de palabras clave indocumentada para crear clases " +"de :class:`~typing.NamedTuple` (p. ej. ``Point = NamedTuple(\"Point\", " +"x=int, y=int)``) ha quedado obsoleta desde Python 3.13. Use la sintaxis " +"basada en clases o la sintaxis funcional en su lugar." #: ../Doc/deprecations/pending-removal-in-3.15.rst:61 msgid "" @@ -121,10 +151,13 @@ msgid "" "deprecated since Python 3.13. After eight years in the :mod:`typing` module, " "it has yet to be supported by any major type checker." msgstr "" +"La función decoradora :func:`typing.no_type_check_decorator` ha quedado " +"obsoleta desde Python 3.13. Después de ocho años en el módulo :mod:`typing`, " +"todavía no es compatible con ningún verificador de tipos importante." #: ../Doc/deprecations/pending-removal-in-3.15.rst:66 msgid ":mod:`wave`:" -msgstr "" +msgstr ":mod:`wave`:" #: ../Doc/deprecations/pending-removal-in-3.15.rst:68 msgid "" @@ -132,3 +165,6 @@ msgid "" "Wave_read.getmarkers` methods of the :class:`~wave.Wave_read` and :class:" "`~wave.Wave_write` classes have been deprecated since Python 3.13." msgstr "" +"Los métodos :meth:`~wave.Wave_read.getmark`, :meth:`!setmark`, y :meth:" +"`~wave.Wave_read.getmarkers` de las clases :class:`~wave.Wave_read` y :class:" +"`~wave.Wave_write` han quedado obsoletos desde Python 3.13." From 3754a90b254c0fc1bc6cbff00d726b228a7ed720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 12:22:45 +0200 Subject: [PATCH 26/40] Translate library/sqlite3 (#3333) Closes #2998 --- dictionaries/library_sqlite3.txt | 39 +- library/sqlite3.po | 1102 +++++++++++++++++++++++------- 2 files changed, 895 insertions(+), 246 deletions(-) diff --git a/dictionaries/library_sqlite3.txt b/dictionaries/library_sqlite3.txt index 8705a87a1f..53e0083c94 100644 --- a/dictionaries/library_sqlite3.txt +++ b/dictionaries/library_sqlite3.txt @@ -1,25 +1,28 @@ -prototipar +André Configurarla +Establézcalo +Expiration +Lemburg +aggregate +arraysize +asígnelo autorizador -desconexión -commit -collation backend -sobrecoste -arraysize -rowid +bytestrings +collation +commit datetime -André -Lemburg -mytype -Expiration depurarlas -bytestrings -temp -qmark -timestamps -rollback -loadable +desconexión fetchone +loadable +mytype nativamente -aggregate +proporcionándolos +prototipar +qmark +rollback +rowid +sobrecoste +temp +timestamps diff --git a/library/sqlite3.po b/library/sqlite3.po index 858cc9512b..1316275677 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -11,20 +11,20 @@ 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: 2023-01-04 10:09-0300\n" -"Last-Translator: Alfonso Areiza Guerra \n" -"Language: es\n" +"PO-Revision-Date: 2024-11-24 23:09+0100\n" +"Last-Translator: Cristián Maureira-Fredes \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.4.2\n" #: ../Doc/library/sqlite3.rst:2 -#, fuzzy msgid ":mod:`!sqlite3` --- DB-API 2.0 interface for SQLite databases" -msgstr ":mod:`sqlite3` --- DB-API 2.0 interfaz para bases de datos SQLite" +msgstr ":mod:`!sqlite3` --- DB-API 2.0 interfaz para bases de datos SQLite" #: ../Doc/library/sqlite3.rst:9 msgid "**Source code:** :source:`Lib/sqlite3/`" @@ -47,7 +47,6 @@ msgstr "" "código a una base de datos más grande como PostgreSQL u Oracle." #: ../Doc/library/sqlite3.rst:32 -#, fuzzy msgid "" "The :mod:`!sqlite3` module was written by Gerhard Häring. It provides an " "SQL interface compliant with the DB-API 2.0 specification described by :pep:" @@ -55,7 +54,7 @@ msgid "" msgstr "" "El módulo :mod:`!sqlite3` fue escrito por Gerhard Häring. Proporciona una " "interfaz SQL compatible con la especificación DB-API 2.0 descrita por :pep:" -"`249` y requiere SQLite 3.7.15 o posterior." +"`249` y requiere SQLite 3.15.2 o una versión más reciente." #: ../Doc/library/sqlite3.rst:36 msgid "This document includes four main sections:" @@ -130,23 +129,25 @@ msgstr "" "`transactions`_." #: ../Doc/library/sqlite3.rst:75 -#, fuzzy msgid "" "First, we need to create a new database and open a database connection to " "allow :mod:`!sqlite3` to work with it. Call :func:`sqlite3.connect` to " "create a connection to the database :file:`tutorial.db` in the current " "working directory, implicitly creating it if it does not exist:" msgstr "" -"Primero, necesitamos crear una nueva base de datos y abrir una conexión para " -"que :mod:`!sqlite3` trabaje con ella. Llamando :func:`sqlite3.connect` se " -"creará una conexión con la base de datos :file:`tutorial.db` en el " -"directorio actual, y de no existir, se creará automáticamente:" +"Primero, necesitamos crear una nueva base de datos y abrir una conexión de " +"base de datos para permitir que :mod:`!sqlite3` trabaje con ella. Llamamos " +"a :func:`sqlite3.connect` para crear una conexión a la base de datos :file:" +"`tutorial.db` en el directorio de trabajo actual, creándola implícitamente " +"si no existe:" #: ../Doc/library/sqlite3.rst:81 msgid "" "import sqlite3\n" "con = sqlite3.connect(\"tutorial.db\")" msgstr "" +"import sqlite3\n" +"con = sqlite3.connect(\"tutorial.db\")" #: ../Doc/library/sqlite3.rst:86 msgid "" @@ -168,7 +169,7 @@ msgstr "" #: ../Doc/library/sqlite3.rst:93 msgid "cur = con.cursor()" -msgstr "" +msgstr "cur = con.cursor()" #: ../Doc/library/sqlite3.rst:97 msgid "" @@ -188,7 +189,7 @@ msgstr "" #: ../Doc/library/sqlite3.rst:106 msgid "cur.execute(\"CREATE TABLE movie(title, year, score)\")" -msgstr "" +msgstr "cur.execute(\"CREATE TABLE movie(title, year, score)\")" #: ../Doc/library/sqlite3.rst:113 msgid "" @@ -212,18 +213,20 @@ msgid "" ">>> res.fetchone()\n" "('movie',)" msgstr "" +">>> res = cur.execute(\"SELECT name FROM sqlite_master\")\n" +">>> res.fetchone()\n" +"('movie',)" #: ../Doc/library/sqlite3.rst:127 -#, fuzzy msgid "" "We can see that the table has been created, as the query returns a :class:" "`tuple` containing the table's name. If we query ``sqlite_master`` for a non-" "existent table ``spam``, :meth:`!res.fetchone` will return ``None``:" msgstr "" -"Podemos observar que la tabla ha sido creada, ya que la consulta retorna " -"una :class:`tuple` conteniendo los nombres de la tabla. Si consultamos " -"``sqlite_master`` para una tabla no existente ``spam``, :meth:`!res." -"fetchone()` retornará ``None``:" +"Podemos ver que la tabla ha sido creada, ya que la consulta devuelve un :" +"class:`tuple` que contiene el nombre de la tabla. Si consultamos " +"``sqlite_master`` para una tabla inexistente ``spam``, :meth:`!res.fetchone` " +"devolverá ``None``:" #: ../Doc/library/sqlite3.rst:132 msgid "" @@ -231,6 +234,9 @@ msgid "" ">>> res.fetchone() is None\n" "True" msgstr "" +">>> res = cur.execute(\"SELECT name FROM sqlite_master WHERE name='spam'\")\n" +">>> res.fetchone() is None\n" +"True" #: ../Doc/library/sqlite3.rst:138 msgid "" @@ -250,6 +256,11 @@ msgid "" " ('And Now for Something Completely Different', 1971, 7.5)\n" "\"\"\")" msgstr "" +"cur.execute(\"\"\"\n" +" INSERT INTO movie VALUES\n" +" ('Monty Python and the Holy Grail', 1975, 8.2),\n" +" ('And Now for Something Completely Different', 1971, 7.5)\n" +"\"\"\")" #: ../Doc/library/sqlite3.rst:150 msgid "" @@ -266,7 +277,7 @@ msgstr "" #: ../Doc/library/sqlite3.rst:156 msgid "con.commit()" -msgstr "" +msgstr "con.commit()" #: ../Doc/library/sqlite3.rst:160 msgid "" @@ -287,6 +298,9 @@ msgid "" ">>> res.fetchall()\n" "[(8.2,), (7.5,)]" msgstr "" +">>> res = cur.execute(\"SELECT score FROM movie\")\n" +">>> res.fetchall()\n" +"[(8.2,), (7.5,)]" #: ../Doc/library/sqlite3.rst:172 msgid "" @@ -314,6 +328,13 @@ msgid "" "cur.executemany(\"INSERT INTO movie VALUES(?, ?, ?)\", data)\n" "con.commit() # Remember to commit the transaction after executing INSERT." msgstr "" +"data = [\n" +" (\"Monty Python Live at the Hollywood Bowl\", 1982, 7.9),\n" +" (\"Monty Python's The Meaning of Life\", 1983, 7.5),\n" +" (\"Monty Python's Life of Brian\", 1979, 8.0),\n" +"]\n" +"cur.executemany(\"INSERT INTO movie VALUES(?, ?, ?)\", data)\n" +"con.commit() # Remember to commit the transaction after executing INSERT." #: ../Doc/library/sqlite3.rst:188 msgid "" @@ -347,6 +368,14 @@ msgid "" "(1982, 'Monty Python Live at the Hollywood Bowl')\n" "(1983, \"Monty Python's The Meaning of Life\")" msgstr "" +">>> for row in cur.execute(\"SELECT year, title FROM movie ORDER BY " +"year\"):\n" +"... print(row)\n" +"(1971, 'And Now for Something Completely Different')\n" +"(1975, 'Monty Python and the Holy Grail')\n" +"(1979, \"Monty Python's Life of Brian\")\n" +"(1982, 'Monty Python Live at the Hollywood Bowl')\n" +"(1983, \"Monty Python's The Meaning of Life\")" #: ../Doc/library/sqlite3.rst:208 msgid "" @@ -381,6 +410,17 @@ msgid "" "released in 1975\n" ">>> new_con.close()" msgstr "" +">>> con.close()\n" +">>> new_con = sqlite3.connect(\"tutorial.db\")\n" +">>> new_cur = new_con.cursor()\n" +">>> res = new_cur.execute(\"SELECT title, year FROM movie ORDER BY score " +"DESC\")\n" +">>> title, year = res.fetchone()\n" +">>> print(f'The highest scoring Monty Python movie is {title!r}, released in " +"{year}')\n" +"The highest scoring Monty Python movie is 'Monty Python and the Holy Grail', " +"released in 1975\n" +">>> new_con.close()" #: ../Doc/library/sqlite3.rst:227 msgid "" @@ -411,9 +451,8 @@ msgid ":ref:`sqlite3-connection-context-manager`" msgstr ":ref:`sqlite3-connection-context-manager`" #: ../Doc/library/sqlite3.rst:245 -#, fuzzy msgid ":ref:`sqlite3-howto-row-factory`" -msgstr ":ref:`sqlite3-adapters`" +msgstr ":ref:`sqlite3-howto-row-factory`" #: ../Doc/library/sqlite3.rst:247 msgid "" @@ -444,19 +483,21 @@ msgid "" "create an `SQLite database existing only in memory `_, and open a connection to it." msgstr "" +"La ruta al archivo de base de datos que se va a abrir. Puede pasar ``\":" +"memory:\"`` para crear un `SQLite database existing only in memory `_ y abrir una conexión con él." #: ../Doc/library/sqlite3.rst:277 -#, fuzzy msgid "" "How many seconds the connection should wait before raising an :exc:" "`OperationalError` when a table is locked. If another connection opens a " "transaction to modify a table, that table will be locked until the " "transaction is committed. Default five seconds." msgstr "" -"Cuántos segundos la conexión debe esperar antes de lanzar una excepción si " -"la base de datos está bloqueada por otra conexión. Si otra conexión abre una " -"transacción para alterar la base de datos, será bloqueada antes que la " -"transacción sea confirmada. Por defecto son 5 segundos." +"Cuántos segundos debe esperar la conexión antes de generar un :exc:" +"`OperationalError` cuando una tabla está bloqueada. Si otra conexión abre " +"una transacción para modificar una tabla, esa tabla se bloqueará hasta que " +"se confirme la transacción. El valor predeterminado es cinco segundos." #: ../Doc/library/sqlite3.rst:284 msgid "" @@ -482,7 +523,6 @@ msgstr "" "la detección de tipos está deshabilitada." #: ../Doc/library/sqlite3.rst:298 -#, fuzzy msgid "" "Control legacy transaction handling behaviour. See :attr:`Connection." "isolation_level` and :ref:`sqlite3-transaction-control-isolation-level` for " @@ -491,14 +531,15 @@ msgid "" "Has no effect unless :attr:`Connection.autocommit` is set to :const:" "`~sqlite3.LEGACY_TRANSACTION_CONTROL` (the default)." msgstr "" -"El :attr:`~Connection.isolation_level` de la conexión, controla si y cómo " -"las transacciones son implícitamente abiertas. Puede ser ``\"DEFERRED\"`` " -"(por defecto), ``\"EXCLUSIVE\"`` o ``\"IMMEDIATE\"``; o ``None`` para " -"deshabilitar transacciones abiertas implícitamente. Consulte :ref:`sqlite3-" -"controlling-transactions` para más información." +"Controla el comportamiento de manejo de transacciones heredadas. Consulta :" +"attr:`Connection.isolation_level` y :ref:`sqlite3-transaction-control-" +"isolation-level` para obtener más información. Puede ser ``\"DEFERRED\"`` " +"(predeterminado), ``\"EXCLUSIVE\"`` o ``\"IMMEDIATE\"``; o ``None`` para " +"deshabilitar la apertura de transacciones de manera implícita. No tiene " +"efecto a menos que :attr:`Connection.autocommit` se configure en :const:" +"`~sqlite3.LEGACY_TRANSACTION_CONTROL` (predeterminado)." #: ../Doc/library/sqlite3.rst:308 -#, fuzzy msgid "" "If ``True`` (default), :exc:`ProgrammingError` will be raised if the " "database connection is used by a thread other than the one that created it. " @@ -506,10 +547,12 @@ msgid "" "operations may need to be serialized by the user to avoid data corruption. " "See :attr:`threadsafety` for more information." msgstr "" -"Si es ``True`` (por defecto), sólo el hilo creador puede utilizar la " -"conexión. Si es ``False``, la conexión se puede compartir entre varios " -"hilos; de ser así, las operaciones de escritura deben ser serializadas por " -"el usuario para evitar daños en los datos." +"Si es ``True`` (predeterminado), se generará :exc:`ProgrammingError` si la " +"conexión de la base de datos la utiliza un subproceso distinto del que la " +"creó. Si es ``False``, se puede acceder a la conexión en varios subprocesos; " +"es posible que el usuario deba serializar las operaciones de escritura para " +"evitar la corrupción de datos. Consulte :attr:`threadsafety` para obtener " +"más información." #: ../Doc/library/sqlite3.rst:317 msgid "" @@ -550,6 +593,11 @@ msgid "" "LEGACY_TRANSACTION_CONTROL`. The default will change to ``False`` in a " "future Python release." msgstr "" +"Controla el comportamiento de manejo de transacciones de :pep:`249`. " +"Consulta :attr:`Connection.autocommit` y :ref:`sqlite3-transaction-control-" +"autocommit` para obtener más información. *autocommit* tiene como valor " +"predeterminado :const:`~sqlite3.LEGACY_TRANSACTION_CONTROL`. El valor " +"predeterminado cambiará a ``False`` en una futura versión de Python." #: ../Doc/library/sqlite3.rst msgid "Return type" @@ -572,9 +620,8 @@ msgstr "" "argumento ``connection_handle``." #: ../Doc/library/sqlite3.rst:349 -#, fuzzy msgid "Added the *uri* parameter." -msgstr "Parámetro *uri*." +msgstr "Se agregó el parámetro *uri*." #: ../Doc/library/sqlite3.rst:352 msgid "" @@ -584,14 +631,12 @@ msgstr "" "cadena de caracteres." #: ../Doc/library/sqlite3.rst:355 -#, fuzzy msgid "Added the ``sqlite3.connect/handle`` auditing event." -msgstr "El evento de auditoría ``sqlite3.connect/handle``." +msgstr "Se agregó el evento de auditoría ``sqlite3.connect/handle``." #: ../Doc/library/sqlite3.rst:358 -#, fuzzy msgid "Added the *autocommit* parameter." -msgstr "Parámetro *uri*." +msgstr "Se agregó el parámetro *autocommit*." #: ../Doc/library/sqlite3.rst:361 msgid "" @@ -599,6 +644,10 @@ msgid "" "*isolation_level*, *check_same_thread*, *factory*, *cached_statements*, and " "*uri* is deprecated. They will become keyword-only parameters in Python 3.15." msgstr "" +"El uso posicional de los parámetros *timeout*, *detect_types*, " +"*isolation_level*, *check_same_thread*, *factory*, *cached_statements* y " +"*uri* está obsoleto. Se convertirán en parámetros de solo palabras clave en " +"Python 3.15." #: ../Doc/library/sqlite3.rst:369 msgid "" @@ -624,6 +673,10 @@ msgid "" ">>> sqlite3.complete_statement(\"SELECT foo\")\n" "False" msgstr "" +">>> sqlite3.complete_statement(\"SELECT foo FROM bar;\")\n" +"True\n" +">>> sqlite3.complete_statement(\"SELECT foo\")\n" +"False" #: ../Doc/library/sqlite3.rst:384 msgid "" @@ -640,6 +693,8 @@ msgid "" "See :func:`!runsource` in :source:`Lib/sqlite3/__main__.py` for real-world " "use." msgstr "" +"Consulte :func:`!runsource` en :source:`Lib/sqlite3/__main__.py` para uso en " +"el mundo real." #: ../Doc/library/sqlite3.rst:393 msgid "" @@ -662,22 +717,24 @@ msgid "" "exceptions. Use an :func:`unraisable hook handler ` for " "introspection of the failed callback." msgstr "" +"Los errores en las devoluciones de llamadas de funciones definidas por el " +"usuario se registran como excepciones que no se pueden generar. Utilice un :" +"func:`unraisable hook handler ` para la introspección de " +"la devolución de llamada fallida." #: ../Doc/library/sqlite3.rst:408 -#, fuzzy msgid "" "Register an *adapter* :term:`callable` to adapt the Python type *type* into " "an SQLite type. The adapter is called with a Python object of type *type* as " "its sole argument, and must return a value of a :ref:`type that SQLite " "natively understands `." msgstr "" -"Registra un *adapter* invocable para adaptar el tipo de Python *type* en un " -"tipo SQLite. El adaptador se llama con un objeto python de tipo *type* como " -"único argumento, y debe retornar un valor de un :ref:`tipo que SQLite " -"entiende de forma nativa `." +"Registre un *adapter* :term:`callable` para adaptar el tipo Python *type* a " +"un tipo SQLite. El adaptador se llama con un objeto Python de tipo *type* " +"como único argumento y debe devolver un valor :ref:`type that SQLite " +"natively understands `." #: ../Doc/library/sqlite3.rst:416 -#, fuzzy msgid "" "Register the *converter* :term:`callable` to convert SQLite objects of type " "*typename* into a Python object of a specific type. The converter is invoked " @@ -686,12 +743,12 @@ msgid "" "parameter *detect_types* of :func:`connect` for information regarding how " "type detection works." msgstr "" -"Registra el *converter* invocable para convertir objetos SQLite de tipo " -"*typename* en objetos Python de un tipo en específico. El *converter* se " -"invoca por todos los valores SQLite que sean de tipo *typename*; es pasado " -"un objeto de :class:`bytes` y debería retornar un objeto Python del tipo " -"deseado. Consulte el parámetro *detect_types* de :func:`connect` para más " -"información en cuanto a cómo funciona la detección de tipos." +"Registre *converter* :term:`callable` para convertir objetos SQLite de tipo " +"*typename* en un objeto Python de un tipo específico. El convertidor se " +"invoca para todos los valores SQLite de tipo *typename*; se le pasa un " +"objeto :class:`bytes` y debe devolver un objeto del tipo Python deseado. " +"Consulte el parámetro *detect_types* de :func:`connect` para obtener " +"información sobre cómo funciona la detección de tipos." #: ../Doc/library/sqlite3.rst:424 msgid "" @@ -711,6 +768,10 @@ msgid "" "Python 3.12) transaction control behaviour. See :ref:`sqlite3-transaction-" "control-isolation-level` for more information." msgstr "" +"Establezca :attr:`~Connection.autocommit` en esta constante para seleccionar " +"el comportamiento de control de transacciones de estilo antiguo (anterior a " +"Python 3.12). Consulte :ref:`sqlite3-transaction-control-isolation-level` " +"para obtener más información." #: ../Doc/library/sqlite3.rst:441 msgid "" @@ -728,6 +789,7 @@ msgstr "" msgid "" "SELECT p as \"p [point]\" FROM test; ! will look up converter \"point\"" msgstr "" +"SELECCIONE p como \"p [punto]\" DE prueba; ! buscará el convertidor \"punto\"" #: ../Doc/library/sqlite3.rst:451 msgid "" @@ -760,6 +822,11 @@ msgid "" " n number(10) ! will look up a converter named \"number\"\n" " )" msgstr "" +"CREATE TABLE test(\n" +" i integer primary key, ! will look up a converter named \"integer\"\n" +" p point, ! will look up a converter named \"point\"\n" +" n number(10) ! will look up a converter named \"number\"\n" +" )" #: ../Doc/library/sqlite3.rst:472 msgid "" @@ -770,13 +837,12 @@ msgstr "" "`` (*bitwise or*)." #: ../Doc/library/sqlite3.rst:479 -#, fuzzy msgid "" "Flags that should be returned by the *authorizer_callback* :term:`callable` " "passed to :meth:`Connection.set_authorizer`, to indicate whether:" msgstr "" -"Flags que deben ser retornadas por el invocable *authorizer_callback* que se " -"le pasa a :meth:`Connection.set_authorizer`, para indicar lo siguiente:" +"Banderas que debe devolver el *authorizer_callback* que :term:`callable` " +"pasa a :meth:`Connection.set_authorizer`, para indicar si:" #: ../Doc/library/sqlite3.rst:482 msgid "Access is allowed (:const:`!SQLITE_OK`)," @@ -815,7 +881,7 @@ msgstr "" #: ../Doc/library/sqlite3.rst:499 msgid "The ``named`` DB-API parameter style is also supported." -msgstr "" +msgstr "También se admite el estilo de parámetro ``named`` DB-API." #: ../Doc/library/sqlite3.rst:503 msgid "" @@ -885,7 +951,7 @@ msgstr "Modo de subprocesamiento SQLite" #: ../Doc/library/sqlite3.rst:529 msgid ":pep:`threadsafety <0249#threadsafety>`" -msgstr "" +msgstr ":pep:`threadsafety <0249#threadsafety>`" #: ../Doc/library/sqlite3.rst:529 msgid "`SQLITE_THREADSAFE`_" @@ -955,6 +1021,9 @@ msgid "" "package, a third-party library which used to upstream changes to :mod:`!" "sqlite3`. Today, it carries no meaning or practical value." msgstr "" +"Esta constante solía reflejar el número de versión del paquete ``pysqlite``, " +"una biblioteca de terceros que solía incluir cambios en :mod:`!sqlite3`. Hoy " +"en día, no tiene significado ni valor práctico." #: ../Doc/library/sqlite3.rst:559 msgid "" @@ -969,20 +1038,26 @@ msgid "" "These constants are used for the :meth:`Connection.setconfig` and :meth:" "`~Connection.getconfig` methods." msgstr "" +"Estas constantes se utilizan para los métodos :meth:`Connection.setconfig` " +"y :meth:`~Connection.getconfig`." #: ../Doc/library/sqlite3.rst:589 msgid "" "The availability of these constants varies depending on the version of " "SQLite Python was compiled with." msgstr "" +"La disponibilidad de estas constantes varía según la versión de SQLite con " +"la que se compiló Python." #: ../Doc/library/sqlite3.rst:596 msgid "https://www.sqlite.org/c3ref/c_dbconfig_defensive.html" -msgstr "" +msgstr "https://www.sqlite.org/c3ref/c_dbconfig_defensive.html" #: ../Doc/library/sqlite3.rst:597 msgid "SQLite docs: Database Connection Configuration Options" msgstr "" +"Documentación de SQLite: Opciones de configuración de la conexión a la base " +"de datos" #: ../Doc/library/sqlite3.rst:603 msgid "Connection objects" @@ -1008,6 +1083,8 @@ msgid "" "A :exc:`ResourceWarning` is emitted if :meth:`close` is not called before a :" "class:`!Connection` object is deleted." msgstr "" +"Se emite un :exc:`ResourceWarning` si no se llama a :meth:`close` antes de " +"eliminar un objeto :class:`!Connection`." #: ../Doc/library/sqlite3.rst:623 msgid "An SQLite database connection has the following attributes and methods:" @@ -1016,15 +1093,14 @@ msgstr "" "métodos:" #: ../Doc/library/sqlite3.rst:627 -#, fuzzy msgid "" "Create and return a :class:`Cursor` object. The cursor method accepts a " "single optional parameter *factory*. If supplied, this must be a :term:" "`callable` returning an instance of :class:`Cursor` or its subclasses." msgstr "" -"Crea y retorna un objeto :class:`Cursor`. El método cursor acepta un único " -"parámetro opcional *factory*. Si es agregado, éste debe ser un invocable que " -"retorna una instancia de :class:`Cursor` o sus subclases." +"Crea y devuelve un objeto :class:`Cursor`. El método del cursor acepta un " +"único parámetro opcional, *factory*. Si se proporciona, debe ser un :term:" +"`callable` que devuelva una instancia de :class:`Cursor` o sus subclases." #: ../Doc/library/sqlite3.rst:634 msgid "" @@ -1084,6 +1160,11 @@ msgid "" "attr:`!autocommit` is ``False``, a new transaction is implicitly opened if a " "pending transaction was committed by this method." msgstr "" +"Confirma cualquier transacción pendiente en la base de datos. Si :attr:" +"`autocommit` es ``True`` o no hay ninguna transacción abierta, este método " +"no hace nada. Si :attr:`!autocommit` es ``False``, se abre implícitamente " +"una nueva transacción si se confirmó una transacción pendiente con este " +"método." #: ../Doc/library/sqlite3.rst:677 msgid "" @@ -1092,9 +1173,12 @@ msgid "" "attr:`!autocommit` is ``False``, a new transaction is implicitly opened if a " "pending transaction was rolled back by this method." msgstr "" +"Revertir al inicio de cualquier transacción pendiente. Si :attr:`autocommit` " +"es ``True`` o no hay ninguna transacción abierta, este método no hace nada. " +"Si :attr:`!autocommit` es ``False``, se abre implícitamente una nueva " +"transacción si se revirtió una transacción pendiente con este método." #: ../Doc/library/sqlite3.rst:685 -#, fuzzy msgid "" "Close the database connection. If :attr:`autocommit` is ``False``, any " "pending transaction is implicitly rolled back. If :attr:`!autocommit` is " @@ -1102,9 +1186,11 @@ msgid "" "control is executed. Make sure to :meth:`commit` before closing to avoid " "losing pending changes." msgstr "" -"Cierra la conexión con la base de datos, y si hay alguna transacción " -"pendiente, esta no será guardada; asegúrese de :meth:`commit` antes de " -"cerrar la conexión, para evitar perder los cambios realizados." +"Cierre la conexión a la base de datos. Si :attr:`autocommit` es ``False``, " +"cualquier transacción pendiente se revierte implícitamente. Si :attr:`!" +"autocommit` es ``True`` o :data:`LEGACY_TRANSACTION_CONTROL`, no se ejecuta " +"ningún control de transacción implícito. Asegúrese de ejecutar :meth:" +"`commit` antes de cerrar para evitar perder los cambios pendientes." #: ../Doc/library/sqlite3.rst:695 msgid "" @@ -1147,16 +1233,14 @@ msgstr "" "podrá entonces recibir cualquier cantidad de argumentos." #: ../Doc/library/sqlite3.rst:722 -#, fuzzy msgid "" "A :term:`callable` that is called when the SQL function is invoked. The " "callable must return :ref:`a type natively supported by SQLite `. Set to ``None`` to remove an existing SQL function." msgstr "" -"Un invocable que es llamado cuando la función SQL se invoca. El invocable " -"debe retornar una :ref:`un tipo soportado de forma nativa por SQLite " -"`. Se establece como ``None`` para eliminar una función SQL " -"existente." +"Un :term:`callable` que se llama cuando se invoca la función SQL. El " +"invocable debe devolver :ref:`a type natively supported by SQLite `. Establézcalo en ``None`` para eliminar una función SQL existente." #: ../Doc/library/sqlite3.rst:729 msgid "" @@ -1169,9 +1253,8 @@ msgstr "" "SQLite realizar optimizaciones adicionales." #: ../Doc/library/sqlite3.rst:734 -#, fuzzy msgid "Added the *deterministic* parameter." -msgstr "El parámetro *deterministic*." +msgstr "Se agregó el parámetro *deterministic*." #: ../Doc/library/sqlite3.rst:737 ../Doc/library/sqlite3.rst:781 #: ../Doc/library/sqlite3.rst:849 ../Doc/library/sqlite3.rst:1128 @@ -1191,12 +1274,24 @@ msgid "" "('acbd18db4cc2f85cedef654fccc4a4d8',)\n" ">>> con.close()" msgstr "" +">>> import hashlib\n" +">>> def md5sum(t):\n" +"... return hashlib.md5(t).hexdigest()\n" +">>> con = sqlite3.connect(\":memory:\")\n" +">>> con.create_function(\"md5\", 1, md5sum)\n" +">>> for row in con.execute(\"SELECT md5(?)\", (b\"foo\",)):\n" +"... print(row)\n" +"('acbd18db4cc2f85cedef654fccc4a4d8',)\n" +">>> con.close()" #: ../Doc/library/sqlite3.rst:753 msgid "" "Passing *name*, *narg*, and *func* as keyword arguments is deprecated. These " "parameters will become positional-only in Python 3.15." msgstr "" +"El uso de *name*, *narg* y *func* como argumentos de palabras clave ya no es " +"recomendable. Estos parámetros pasarán a ser solo posicionales en Python " +"3.15." #: ../Doc/library/sqlite3.rst:759 msgid "Create or remove a user-defined SQL aggregate function." @@ -1279,12 +1374,34 @@ msgid "" "\n" "con.close()" msgstr "" +"class MySum:\n" +" def __init__(self):\n" +" self.count = 0\n" +"\n" +" def step(self, value):\n" +" self.count += value\n" +"\n" +" def finalize(self):\n" +" return self.count\n" +"\n" +"con = sqlite3.connect(\":memory:\")\n" +"con.create_aggregate(\"mysum\", 1, MySum)\n" +"cur = con.execute(\"CREATE TABLE test(i)\")\n" +"cur.execute(\"INSERT INTO test(i) VALUES(1)\")\n" +"cur.execute(\"INSERT INTO test(i) VALUES(2)\")\n" +"cur.execute(\"SELECT mysum(i) FROM test\")\n" +"print(cur.fetchone()[0])\n" +"\n" +"con.close()" #: ../Doc/library/sqlite3.rst:812 msgid "" "Passing *name*, *n_arg*, and *aggregate_class* as keyword arguments is " "deprecated. These parameters will become positional-only in Python 3.15." msgstr "" +"El uso de *name*, *n_arg* y *aggregate_class* como argumentos de palabras " +"clave ya no es recomendable. Estos parámetros pasarán a ser solo " +"posicionales en Python 3.15." #: ../Doc/library/sqlite3.rst:818 msgid "Create or remove a user-defined aggregate window function." @@ -1408,6 +1525,50 @@ msgid "" "print(cur.fetchall())\n" "con.close()" msgstr "" +"# Example taken from https://www.sqlite.org/windowfunctions.html#udfwinfunc\n" +"class WindowSumInt:\n" +" def __init__(self):\n" +" self.count = 0\n" +"\n" +" def step(self, value):\n" +" \"\"\"Add a row to the current window.\"\"\"\n" +" self.count += value\n" +"\n" +" def value(self):\n" +" \"\"\"Return the current value of the aggregate.\"\"\"\n" +" return self.count\n" +"\n" +" def inverse(self, value):\n" +" \"\"\"Remove a row from the current window.\"\"\"\n" +" self.count -= value\n" +"\n" +" def finalize(self):\n" +" \"\"\"Return the final value of the aggregate.\n" +"\n" +" Any clean-up actions should be placed here.\n" +" \"\"\"\n" +" return self.count\n" +"\n" +"\n" +"con = sqlite3.connect(\":memory:\")\n" +"cur = con.execute(\"CREATE TABLE test(x, y)\")\n" +"values = [\n" +" (\"a\", 4),\n" +" (\"b\", 5),\n" +" (\"c\", 3),\n" +" (\"d\", 8),\n" +" (\"e\", 1),\n" +"]\n" +"cur.executemany(\"INSERT INTO test VALUES(?, ?)\", values)\n" +"con.create_window_function(\"sumint\", 1, WindowSumInt)\n" +"cur.execute(\"\"\"\n" +" SELECT x, sumint(y) OVER (\n" +" ORDER BY x ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING\n" +" ) AS sum_y\n" +" FROM test ORDER BY x\n" +"\"\"\")\n" +"print(cur.fetchall())\n" +"con.close()" #: ../Doc/library/sqlite3.rst:905 msgid "" @@ -1455,6 +1616,23 @@ msgid "" " print(row)\n" "con.close()" msgstr "" +"def collate_reverse(string1, string2):\n" +" if string1 == string2:\n" +" return 0\n" +" elif string1 < string2:\n" +" return 1\n" +" else:\n" +" return -1\n" +"\n" +"con = sqlite3.connect(\":memory:\")\n" +"con.create_collation(\"reverse\", collate_reverse)\n" +"\n" +"cur = con.execute(\"CREATE TABLE test(x)\")\n" +"cur.executemany(\"INSERT INTO test(x) VALUES(?)\", [(\"a\",), (\"b\",)])\n" +"cur.execute(\"SELECT x FROM test ORDER BY x COLLATE reverse\")\n" +"for row in cur:\n" +" print(row)\n" +"con.close()" #: ../Doc/library/sqlite3.rst:941 msgid "Remove a collation function by setting *callable* to ``None``." @@ -1470,18 +1648,16 @@ msgstr "" "Anteriormente, solamente caracteres ASCII eran permitidos." #: ../Doc/library/sqlite3.rst:950 -#, fuzzy msgid "" "Call this method from a different thread to abort any queries that might be " "executing on the connection. Aborted queries will raise an :exc:" "`OperationalError`." msgstr "" -"Se puede llamar este método desde un hilo diferente para abortar cualquier " -"consulta que pueda estar ejecutándose en la conexión. Consultas abortadas " -"lanzaran una excepción." +"Llame a este método desde un subproceso diferente para cancelar cualquier " +"consulta que pueda estar ejecutándose en la conexión. Las consultas " +"canceladas generarán un error :exc:`OperationalError`." #: ../Doc/library/sqlite3.rst:957 -#, fuzzy msgid "" "Register :term:`callable` *authorizer_callback* to be invoked for each " "attempt to access a column of a table in the database. The callback should " @@ -1489,11 +1665,11 @@ msgid "" "`SQLITE_IGNORE` to signal how access to the column should be handled by the " "underlying SQLite library." msgstr "" -"Registra un invocable *authorizer_callback* que será invocado por cada " -"intento de acceso a la columna de la tabla en la base de datos. La " -"retrollamada podría retornar una :const:`SQLITE_OK`, :const:`SQLITE_DENY`, o " -"un :const:`SQLITE_IGNORE` para indicar cómo el acceso a la columna deberá " -"ser manipulado por las capas inferiores de la biblioteca SQLite." +"Registre :term:`callable` *authorizer_callback* para que se invoque cada vez " +"que se intente acceder a una columna de una tabla en la base de datos. La " +"devolución de llamada debe devolver uno de los siguientes: :const:" +"`SQLITE_OK`, :const:`SQLITE_DENY` o :const:`SQLITE_IGNORE` para indicar cómo " +"debe gestionar la biblioteca SQLite subyacente el acceso a la columna." #: ../Doc/library/sqlite3.rst:964 msgid "" @@ -1538,19 +1714,20 @@ msgid "" "Passing *authorizer_callback* as a keyword argument is deprecated. The " "parameter will become positional-only in Python 3.15." msgstr "" +"El uso de *authorizer_callback* como argumento de palabra clave ya no es " +"recomendable. El parámetro pasará a ser solo posicional en Python 3.15." #: ../Doc/library/sqlite3.rst:987 -#, fuzzy msgid "" "Register :term:`callable` *progress_handler* to be invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " "get called from SQLite during long-running operations, for example to update " "a GUI." msgstr "" -"Registra un invocable *progress_handler* que será invocado por cada *n* " -"instrucciones de la máquina virtual de SQLite. Esto es útil si quieres " -"recibir llamados de SQLite durante una operación de larga duración, como por " -"ejemplo la actualización de una GUI." +"Registre :term:`callable` *progress_handler* para que se invoque para cada " +"instrucción *n* de la máquina virtual SQLite. Esto es útil si desea recibir " +"llamadas de SQLite durante operaciones de larga duración, por ejemplo, para " +"actualizar una GUI." #: ../Doc/library/sqlite3.rst:992 msgid "" @@ -1561,29 +1738,30 @@ msgstr "" "llame el método con ``None`` para *progress_handler*." #: ../Doc/library/sqlite3.rst:995 -#, fuzzy msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise a :exc:`DatabaseError` " "exception." msgstr "" -"Retornando un valor diferente a 0 de la función gestora terminará la actual " -"consulta en ejecución y causará lanzar una excepción :exc:`OperationalError`." +"Si se devuelve un valor distinto de cero desde la función del controlador, " +"se finalizará la consulta que se está ejecutando actualmente y se generará " +"una excepción :exc:`DatabaseError`." #: ../Doc/library/sqlite3.rst:999 msgid "" "Passing *progress_handler* as a keyword argument is deprecated. The " "parameter will become positional-only in Python 3.15." msgstr "" +"El uso de *progress_handler* como argumento de palabra clave ya no es " +"recomendable. El parámetro pasará a ser solo posicional en Python 3.15." #: ../Doc/library/sqlite3.rst:1006 -#, fuzzy msgid "" "Register :term:`callable` *trace_callback* to be invoked for each SQL " "statement that is actually executed by the SQLite backend." msgstr "" -"Registra un invocable *trace_callback* que será llamado por cada sentencia " -"SQL que sea de hecho ejecutada por el *backend* de SQLite." +"Registre :term:`callable` *trace_callback* para que se invoque para cada " +"declaración SQL que realmente ejecute el backend de SQLite." #: ../Doc/library/sqlite3.rst:1009 msgid "" @@ -1623,6 +1801,8 @@ msgid "" "Passing *trace_callback* as a keyword argument is deprecated. The parameter " "will become positional-only in Python 3.15." msgstr "" +"El uso de *trace_callback* como argumento de palabra clave ya no es " +"recomendable. El parámetro pasará a ser solo posicional en Python 3.15." #: ../Doc/library/sqlite3.rst:1034 msgid "" @@ -1694,21 +1874,45 @@ msgid "" "name MATCH 'pie'\"):\n" " print(row)" msgstr "" +"con.enable_load_extension(True)\n" +"\n" +"# Load the fulltext search extension\n" +"con.execute(\"select load_extension('./fts3.so')\")\n" +"\n" +"# alternatively you can load the extension using an API call:\n" +"# con.load_extension(\"./fts3.so\")\n" +"\n" +"# disable extension loading again\n" +"con.enable_load_extension(False)\n" +"\n" +"# example from SQLite wiki\n" +"con.execute(\"CREATE VIRTUAL TABLE recipe USING fts3(name, ingredients)\")\n" +"con.executescript(\"\"\"\n" +" INSERT INTO recipe (name, ingredients) VALUES('broccoli stew', 'broccoli " +"peppers cheese tomatoes');\n" +" INSERT INTO recipe (name, ingredients) VALUES('pumpkin stew', 'pumpkin " +"onions garlic celery');\n" +" INSERT INTO recipe (name, ingredients) VALUES('broccoli pie', 'broccoli " +"cheese onions flour');\n" +" INSERT INTO recipe (name, ingredients) VALUES('pumpkin pie', 'pumpkin " +"sugar flour butter');\n" +" \"\"\")\n" +"for row in con.execute(\"SELECT rowid, name, ingredients FROM recipe WHERE " +"name MATCH 'pie'\"):\n" +" print(row)" #: ../Doc/library/sqlite3.rst:1086 -#, fuzzy msgid "" "Load an SQLite extension from a shared library. Enable extension loading " "with :meth:`enable_load_extension` before calling this method." msgstr "" -"Carga una extensión SQLite de una biblioteca compartida ubicada en *path*. " -"Se debe habilitar la carga de extensiones con :meth:`enable_load_extension` " -"antes de llamar este método." +"Cargue una extensión SQLite desde una biblioteca compartida. Habilite la " +"carga de extensiones con :meth:`enable_load_extension` antes de llamar a " +"este método." #: ../Doc/library/sqlite3.rst:1090 -#, fuzzy msgid "The path to the SQLite extension." -msgstr "El nombre de la función SQL." +msgstr "La ruta a la extensión SQLite." #: ../Doc/library/sqlite3.rst:1094 msgid "" @@ -1716,6 +1920,9 @@ msgid "" "entry point name of its own; see the SQLite docs `Loading an Extension`_ for " "details." msgstr "" +"Nombre del punto de entrada. Si es ``None`` (el valor predeterminado), " +"SQLite creará un nombre de punto de entrada propio; consulte la " +"documentación de SQLite `Loading an Extension`_ para obtener más detalles." #: ../Doc/library/sqlite3.rst:1103 msgid "" @@ -1730,9 +1937,8 @@ msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "Agregado el evento de auditoría ``sqlite3.load_extension``." #: ../Doc/library/sqlite3.rst:1110 -#, fuzzy msgid "Added the *entrypoint* parameter." -msgstr "Parámetro *uri*." +msgstr "Se agregó el parámetro *entrypoint*." #: ../Doc/library/sqlite3.rst:1117 msgid "" @@ -1751,6 +1957,9 @@ msgid "" "``prefix_%``. If ``None`` (the default), all database objects will be " "included." msgstr "" +"Un patrón ``LIKE`` opcional para volcar objetos de la base de datos, p. ej., " +"``prefix_%``. Si se usa ``None`` (el valor predeterminado), se incluirán " +"todos los objetos de la base de datos." #: ../Doc/library/sqlite3.rst:1130 #, python-format @@ -1762,16 +1971,20 @@ msgid "" " f.write('%s\\n' % line)\n" "con.close()" msgstr "" +"# Convert file example.db to SQL dump file dump.sql\n" +"con = sqlite3.connect('example.db')\n" +"with open('dump.sql', 'w') as f:\n" +" for line in con.iterdump():\n" +" f.write('%s\\n' % line)\n" +"con.close()" #: ../Doc/library/sqlite3.rst:1141 ../Doc/library/sqlite3.rst:1215 -#, fuzzy msgid ":ref:`sqlite3-howto-encoding`" -msgstr ":ref:`sqlite3-adapters`" +msgstr ":ref:`sqlite3-howto-encoding`" #: ../Doc/library/sqlite3.rst:1143 -#, fuzzy msgid "Added the *filter* parameter." -msgstr "Parámetro *uri*." +msgstr "Se agregó el parámetro *filter*." #: ../Doc/library/sqlite3.rst:1148 msgid "Create a backup of an SQLite database." @@ -1799,18 +2012,16 @@ msgstr "" "defecto es ``-1``." #: ../Doc/library/sqlite3.rst:1162 -#, fuzzy msgid "" "If set to a :term:`callable`, it is invoked with three integer arguments for " "every backup iteration: the *status* of the last iteration, the *remaining* " "number of pages still to be copied, and the *total* number of pages. " "Defaults to ``None``." msgstr "" -"Si se establece un invocable, este será invocado con 3 argumentos enteros " -"para cada iteración sobre la copia de seguridad: el *status* de la última " -"iteración, el *remaining*, que indica el número de páginas pendientes a ser " -"copiadas, y el *total* que indica le número total de páginas. El valor por " -"defecto es ``None``." +"Si se configura en :term:`callable`, se invoca con tres argumentos enteros " +"para cada iteración de copia de seguridad: el *status* de la última " +"iteración, el *remaining* número de páginas que aún se deben copiar y el " +"*total* número de páginas. El valor predeterminado es ``None``." #: ../Doc/library/sqlite3.rst:1171 msgid "" @@ -1847,6 +2058,15 @@ msgid "" "dst.close()\n" "src.close()" msgstr "" +"def progress(status, remaining, total):\n" +" print(f'Copied {total-remaining} of {total} pages...')\n" +"\n" +"src = sqlite3.connect('example.db')\n" +"dst = sqlite3.connect('backup.db')\n" +"with dst:\n" +" src.backup(dst, pages=1, progress=progress)\n" +"dst.close()\n" +"src.close()" #: ../Doc/library/sqlite3.rst:1201 msgid "Example 2, copy an existing database into a transient copy:" @@ -1861,6 +2081,11 @@ msgid "" "dst.close()\n" "src.close()" msgstr "" +"src = sqlite3.connect('example.db')\n" +"dst = sqlite3.connect(':memory:')\n" +"src.backup(dst)\n" +"dst.close()\n" +"src.close()" #: ../Doc/library/sqlite3.rst:1219 msgid "Get a connection runtime limit." @@ -1889,19 +2114,20 @@ msgid "" ">>> con.getlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH)\n" "1000000000" msgstr "" +">>> con.getlimit(sqlite3.SQLITE_LIMIT_SQL_LENGTH)\n" +"1000000000" #: ../Doc/library/sqlite3.rst:1249 -#, fuzzy msgid "" "Set a connection runtime limit. Attempts to increase a limit above its hard " "upper bound are silently truncated to the hard upper bound. Regardless of " "whether or not the limit was changed, the prior value of the limit is " "returned." msgstr "" -"Establece un límite para el tiempo de ejecución. Los intentos de aumentar un " -"límite por encima de su límite superior duro se truncan silenciosamente al " -"límite superior duro. Independientemente de si se cambió o no el límite, se " -"retorna el valor anterior del límite." +"Establezca un límite de tiempo de ejecución de la conexión. Los intentos de " +"aumentar un límite por encima de su límite superior estricto se truncan de " +"forma silenciosa hasta el límite superior estricto. Independientemente de si " +"se modificó o no el límite, se devuelve el valor anterior del límite." #: ../Doc/library/sqlite3.rst:1254 msgid "The `SQLite limit category`_ to be set." @@ -1927,24 +2153,30 @@ msgid "" ">>> con.getlimit(sqlite3.SQLITE_LIMIT_ATTACHED)\n" "1" msgstr "" +">>> con.setlimit(sqlite3.SQLITE_LIMIT_ATTACHED, 1)\n" +"10\n" +">>> con.getlimit(sqlite3.SQLITE_LIMIT_ATTACHED)\n" +"1" #: ../Doc/library/sqlite3.rst:1287 msgid "Query a boolean connection configuration option." -msgstr "" +msgstr "Consultar una opción de configuración de conexión booleana." #: ../Doc/library/sqlite3.rst:1289 ../Doc/library/sqlite3.rst:1300 msgid "A :ref:`SQLITE_DBCONFIG code `." -msgstr "" +msgstr "Un :ref:`SQLITE_DBCONFIG code `." #: ../Doc/library/sqlite3.rst:1298 msgid "Set a boolean connection configuration option." -msgstr "" +msgstr "Establezca una opción de configuración de conexión booleana." #: ../Doc/library/sqlite3.rst:1303 msgid "" "``True`` if the configuration option should be enabled (default); ``False`` " "if it should be disabled." msgstr "" +"``True`` si la opción de configuración debe estar habilitada " +"(predeterminado); ``False`` si debe estar deshabilitada." #: ../Doc/library/sqlite3.rst:1311 msgid "" @@ -2026,6 +2258,8 @@ msgid "" "This attribute controls :pep:`249`-compliant transaction behaviour. :attr:`!" "autocommit` has three allowed values:" msgstr "" +"Este atributo controla el comportamiento de las transacciones conforme a :" +"pep:`249`. :attr:`!autocommit` tiene tres valores permitidos:" #: ../Doc/library/sqlite3.rst:1368 msgid "" @@ -2033,42 +2267,57 @@ msgid "" "mod:`!sqlite3` ensures a transaction is always open. Use :meth:`commit` and :" "meth:`rollback` to close transactions." msgstr "" +"``False``: Seleccione un comportamiento de transacción compatible con :pep:" +"`249`, lo que implica que :mod:`!sqlite3` garantiza que una transacción esté " +"siempre abierta. Utilice :meth:`commit` y :meth:`rollback` para cerrar " +"transacciones." #: ../Doc/library/sqlite3.rst:1372 msgid "This is the recommended value of :attr:`!autocommit`." -msgstr "" +msgstr "Este es el valor recomendado de :attr:`!autocommit`." #: ../Doc/library/sqlite3.rst:1374 msgid "" "``True``: Use SQLite's `autocommit mode`_. :meth:`commit` and :meth:" "`rollback` have no effect in this mode." msgstr "" +"``True``: Utilice `autocommit mode`_ de SQLite. :meth:`commit` y :meth:" +"`rollback` no tienen efecto en este modo." #: ../Doc/library/sqlite3.rst:1377 msgid "" ":data:`LEGACY_TRANSACTION_CONTROL`: Pre-Python 3.12 (non-:pep:`249`-" "compliant) transaction control. See :attr:`isolation_level` for more details." msgstr "" +":data:`LEGACY_TRANSACTION_CONTROL`: Control de transacciones anterior a " +"Python 3.12 (no compatible con :pep:`249`). Consulte :attr:`isolation_level` " +"para obtener más detalles." #: ../Doc/library/sqlite3.rst:1381 msgid "This is currently the default value of :attr:`!autocommit`." -msgstr "" +msgstr "Este es actualmente el valor predeterminado de :attr:`!autocommit`." #: ../Doc/library/sqlite3.rst:1383 msgid "" "Changing :attr:`!autocommit` to ``False`` will open a new transaction, and " "changing it to ``True`` will commit any pending transaction." msgstr "" +"Cambiar :attr:`!autocommit` a ``False`` abrirá una nueva transacción y " +"cambiarlo a ``True`` confirmará cualquier transacción pendiente." #: ../Doc/library/sqlite3.rst:1386 msgid "See :ref:`sqlite3-transaction-control-autocommit` for more details." msgstr "" +"Consulte :ref:`sqlite3-transaction-control-autocommit` para obtener más " +"detalles." #: ../Doc/library/sqlite3.rst:1390 msgid "" "The :attr:`isolation_level` attribute has no effect unless :attr:" "`autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`." msgstr "" +"El atributo :attr:`isolation_level` no tiene efecto a menos que :attr:" +"`autocommit` sea :data:`LEGACY_TRANSACTION_CONTROL`." #: ../Doc/library/sqlite3.rst:1397 msgid "" @@ -2087,7 +2336,6 @@ msgstr "" "``False`` en caso contrario." #: ../Doc/library/sqlite3.rst:1407 -#, fuzzy msgid "" "Controls the :ref:`legacy transaction handling mode ` of :mod:`!sqlite3`. If set to ``None``, " @@ -2096,12 +2344,13 @@ msgid "" "`SQLite transaction behaviour`_, :ref:`implicit transaction management " "` is performed." msgstr "" -"Este atributo controla la :ref:`transaction handling ` realizado por :mod:`!sqlite3`. Si se establece como ``None``, " -"las transacciones nunca se abrirán implícitamente. Si se establece " -"``\"DEFERRED\"``, ``\"IMMEDIATE\"``, o ``\"EXCLUSIVE\"``, correspondientes " -"al `SQLite transaction behaviour`_, de las capas inferiores, implícitamente " -"se realiza :ref:`transaction management `." +"Controla el :ref:`legacy transaction handling mode ` de :mod:`!sqlite3`. Si se configura en ``None``, " +"las transacciones nunca se abren de forma implícita. Si se configura en uno " +"de los valores ``\"DEFERRED\"``, ``\"IMMEDIATE\"`` o ``\"EXCLUSIVE\"``, " +"correspondiente al `SQLite transaction behaviour`_ subyacente, se ejecuta :" +"ref:`implicit transaction management `." #: ../Doc/library/sqlite3.rst:1415 msgid "" @@ -2118,6 +2367,10 @@ msgid "" "unless :attr:`autocommit` is set to :data:`LEGACY_TRANSACTION_CONTROL` (the " "default)." msgstr "" +"Se recomienda utilizar :attr:`autocommit` para controlar el manejo de " +"transacciones en lugar de :attr:`!isolation_level`. :attr:`!isolation_level` " +"no tiene efecto a menos que :attr:`autocommit` se configure en :data:" +"`LEGACY_TRANSACTION_CONTROL` (el valor predeterminado)." #: ../Doc/library/sqlite3.rst:1427 msgid "" @@ -2127,30 +2380,31 @@ msgid "" "ones. Is ``None`` by default, meaning each row is returned as a :class:" "`tuple`." msgstr "" +"El :attr:`~Cursor.row_factory` inicial para los objetos :class:`Cursor` " +"creados a partir de esta conexión. La asignación a este atributo no afecta " +"al :attr:`!row_factory` de los cursores existentes que pertenecen a esta " +"conexión, solo a los nuevos. Es ``None`` de forma predeterminada, lo que " +"significa que cada fila se devuelve como :class:`tuple`." #: ../Doc/library/sqlite3.rst:1434 ../Doc/library/sqlite3.rst:1720 #: ../Doc/library/sqlite3.rst:1743 -#, fuzzy msgid "See :ref:`sqlite3-howto-row-factory` for more details." -msgstr ":ref:`sqlite3-howtos` para lecturas de interés:" +msgstr "Consulte :ref:`sqlite3-howto-row-factory` para obtener más detalles." #: ../Doc/library/sqlite3.rst:1438 -#, fuzzy msgid "" "A :term:`callable` that accepts a :class:`bytes` parameter and returns a " "text representation of it. The callable is invoked for SQLite values with " "the ``TEXT`` data type. By default, this attribute is set to :class:`str`." msgstr "" -"A invocable que acepta una :class:`bytes`como parámetro y retorna una " -"representación del texto de el. El invocable es llamado por valores SQLite " -"con el tipo de datos ``TEXT``. Por defecto, este atributo se configura como " -"una :class:`str`. Si quieres retornar en su lugar, ``bytes``, entonces se " -"establece *text_factory* como ``bytes``." +"Un :term:`callable` que acepta un parámetro :class:`bytes` y devuelve una " +"representación de texto del mismo. El objeto invocable se invoca para " +"valores SQLite con el tipo de datos ``TEXT``. De manera predeterminada, este " +"atributo está configurado en :class:`str`." #: ../Doc/library/sqlite3.rst:1443 -#, fuzzy msgid "See :ref:`sqlite3-howto-encoding` for more details." -msgstr ":ref:`sqlite3-howtos` para lecturas de interés:" +msgstr "Consulte :ref:`sqlite3-howto-encoding` para obtener más detalles." #: ../Doc/library/sqlite3.rst:1447 msgid "" @@ -2193,6 +2447,8 @@ msgid "" "for row in cur.execute(\"SELECT t FROM data\"):\n" " print(row)" msgstr "" +"for row in cur.execute(\"SELECT t FROM data\"):\n" +" print(row)" #: ../Doc/library/sqlite3.rst:1488 msgid "A :class:`Cursor` instance has the following attributes and methods." @@ -2204,10 +2460,12 @@ msgid "" "Execute a single SQL statement, optionally binding Python values using :ref:" "`placeholders `." msgstr "" +"Ejecuta una única declaración SQL, vinculando opcionalmente valores de " +"Python mediante :ref:`placeholders `." #: ../Doc/library/sqlite3.rst:1499 msgid "A single SQL statement." -msgstr "" +msgstr "Una sola declaración SQL." #: ../Doc/library/sqlite3.rst:1502 msgid "" @@ -2215,23 +2473,27 @@ msgid "" "placeholders are used. A :term:`!sequence` if unnamed placeholders are used. " "See :ref:`sqlite3-placeholders`." msgstr "" +"Valores de Python para vincular a marcadores de posición en *sql*. Un :class:" +"`!dict` si se utilizan marcadores de posición con nombre. Un :term:`!" +"sequence` si se utilizan marcadores de posición sin nombre. Consulte :ref:" +"`sqlite3-placeholders`." #: ../Doc/library/sqlite3.rst:1509 msgid "If *sql* contains more than one SQL statement." -msgstr "" +msgstr "Si *sql* contiene más de una declaración SQL." #: ../Doc/library/sqlite3.rst:1512 -#, fuzzy msgid "" "If :attr:`~Connection.autocommit` is :data:`LEGACY_TRANSACTION_CONTROL`, :" "attr:`~Connection.isolation_level` is not ``None``, *sql* is an ``INSERT``, " "``UPDATE``, ``DELETE``, or ``REPLACE`` statement, and there is no open " "transaction, a transaction is implicitly opened before executing *sql*." msgstr "" -"Si el :attr:`~Connection.isolation_level` no es ``None``, y *sql* es una " -"sentencia ``INSERT``, ``UPDATE``, ``DELETE``, o ``REPLACE``, y no hay " -"transacciones abierta, entonces una transacción se abre implícitamente antes " -"de ejecutar el *sql*." +"Si :attr:`~Connection.autocommit` es :data:`LEGACY_TRANSACTION_CONTROL`, :" +"attr:`~Connection.isolation_level` no es ``None``, *sql* es una declaración " +"``INSERT``, ``UPDATE``, ``DELETE`` o ``REPLACE`` y no hay ninguna " +"transacción abierta, se abre implícitamente una transacción antes de " +"ejecutar *sql*." #: ../Doc/library/sqlite3.rst:1521 msgid "" @@ -2240,10 +2502,15 @@ msgid "" "`dict`. Starting with Python 3.14, :exc:`ProgrammingError` will be raised " "instead." msgstr "" +"Se emite :exc:`DeprecationWarning` si se utilizan :ref:`named placeholders " +"` y *parameters* es una secuencia en lugar de :class:" +"`dict`. A partir de Python 3.14, se emitirá :exc:`ProgrammingError` en su " +"lugar." #: ../Doc/library/sqlite3.rst:1527 msgid "Use :meth:`executescript` to execute multiple SQL statements." msgstr "" +"Utilice :meth:`executescript` para ejecutar múltiples declaraciones SQL." #: ../Doc/library/sqlite3.rst:1531 msgid "" @@ -2251,25 +2518,33 @@ msgid "" "` :abbr:`DML (Data Manipulation Language)` SQL " "statement *sql*." msgstr "" +"Para cada elemento en *parameters*, ejecute repetidamente la instrucción " +"SQL :ref:`parameterized ` :abbr:`DML (lenguaje de " +"manipulación de datos)` *sql*." #: ../Doc/library/sqlite3.rst:1535 msgid "Uses the same implicit transaction handling as :meth:`~Cursor.execute`." msgstr "" +"Utiliza el mismo manejo de transacciones implícitas que :meth:`~Cursor." +"execute`." #: ../Doc/library/sqlite3.rst:1537 msgid "A single SQL DML statement." -msgstr "" +msgstr "Una sola declaración DML de SQL." #: ../Doc/library/sqlite3.rst:1540 msgid "" "An :term:`!iterable` of parameters to bind with the placeholders in *sql*. " "See :ref:`sqlite3-placeholders`." msgstr "" +"Un :term:`!iterable` de parámetros para vincular con los marcadores de " +"posición en *sql*. Consulte :ref:`sqlite3-placeholders`." #: ../Doc/library/sqlite3.rst:1546 msgid "" "If *sql* contains more than one SQL statement, or is not a DML statement." msgstr "" +"Si *sql* contiene más de una declaración SQL o no es una declaración DML." #: ../Doc/library/sqlite3.rst:1552 msgid "" @@ -2280,12 +2555,20 @@ msgid "" "# cur is an sqlite3.Cursor object\n" "cur.executemany(\"INSERT INTO data VALUES(?)\", rows)" msgstr "" +"rows = [\n" +" (\"row1\",),\n" +" (\"row2\",),\n" +"]\n" +"# cur is an sqlite3.Cursor object\n" +"cur.executemany(\"INSERT INTO data VALUES(?)\", rows)" #: ../Doc/library/sqlite3.rst:1567 msgid "" "Any resulting rows are discarded, including DML statements with `RETURNING " "clauses`_." msgstr "" +"Se descartan todas las filas resultantes, incluidas las declaraciones DML " +"con `RETURNING clauses`_." #: ../Doc/library/sqlite3.rst:1574 msgid "" @@ -2294,9 +2577,12 @@ msgid "" "of :class:`dict`\\s. Starting with Python 3.14, :exc:`ProgrammingError` will " "be raised instead." msgstr "" +"Se emite :exc:`DeprecationWarning` si se utilizan :ref:`named placeholders " +"` y los elementos en *parameters* son secuencias en " +"lugar de :class:`dict`. A partir de Python 3.14, se emitirá :exc:" +"`ProgrammingError` en su lugar." #: ../Doc/library/sqlite3.rst:1583 -#, fuzzy msgid "" "Execute the SQL statements in *sql_script*. If the :attr:`~Connection." "autocommit` is :data:`LEGACY_TRANSACTION_CONTROL` and there is a pending " @@ -2304,10 +2590,11 @@ msgid "" "implicit transaction control is performed; any transaction control must be " "added to *sql_script*." msgstr "" -"Ejecuta las sentencias SQL en *sql_script*. Si hay una transacción " -"pendiente, primero se ejecuta una instrucción ``COMMIT`` implícitamente. No " -"se realiza ningún otro control de transacción implícito; Cualquier control " -"de transacción debe agregarse a *sql_script*." +"Ejecute las sentencias SQL en *sql_script*. Si :attr:`~Connection." +"autocommit` es :data:`LEGACY_TRANSACTION_CONTROL` y hay una transacción " +"pendiente, primero se ejecuta una sentencia ``COMMIT`` implícita. No se " +"realiza ningún otro control de transacción implícito; cualquier control de " +"transacción debe agregarse a *sql_script*." #: ../Doc/library/sqlite3.rst:1591 msgid "*sql_script* must be a :class:`string `." @@ -2324,18 +2611,25 @@ msgid "" " COMMIT;\n" "\"\"\")" msgstr "" +"# cur is an sqlite3.Cursor object\n" +"cur.executescript(\"\"\"\n" +" BEGIN;\n" +" CREATE TABLE person(firstname, lastname, age);\n" +" CREATE TABLE book(title, author, published);\n" +" CREATE TABLE publisher(name, address);\n" +" COMMIT;\n" +"\"\"\")" #: ../Doc/library/sqlite3.rst:1608 -#, fuzzy msgid "" "If :attr:`~Cursor.row_factory` is ``None``, return the next row query result " "set as a :class:`tuple`. Else, pass it to the row factory and return its " "result. Return ``None`` if no more data is available." msgstr "" -"Si el :attr:`~Connection.row_factory` es ``None``, retorna el conjunto de " -"resultados de la consulta de la siguiente fila como un :class:`tuple`. De lo " -"contrario, páselo a la fábrica de filas y retorne su resultado. Retorna " -"``None`` si no hay más datos disponibles." +"Si :attr:`~Cursor.row_factory` es ``None``, devuelve el siguiente conjunto " +"de resultados de consulta de fila como :class:`tuple`. De lo contrario, " +"páselo a la fábrica de filas y devuelve su resultado. Devuelve ``None`` si " +"no hay más datos disponibles." #: ../Doc/library/sqlite3.rst:1616 msgid "" @@ -2429,6 +2723,11 @@ msgid "" "True\n" ">>> con.close()" msgstr "" +">>> con = sqlite3.connect(\":memory:\")\n" +">>> cur = con.cursor()\n" +">>> cur.connection == con\n" +"True\n" +">>> con.close()" #: ../Doc/library/sqlite3.rst:1674 msgid "" @@ -2472,7 +2771,6 @@ msgid "Added support for the ``REPLACE`` statement." msgstr "Se agregó soporte para sentencias ``REPLACE``." #: ../Doc/library/sqlite3.rst:1697 -#, fuzzy msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -2481,11 +2779,13 @@ msgid "" "methods, after the statement has run to completion. This means that any " "resulting rows must be fetched in order for :attr:`!rowcount` to be updated." msgstr "" -"Atributo de solo lectura que proporciona el número de filas modificadas para " -"las sentencias ``INSERT``, ``UPDATE``, ``DELETE`` y ``REPLACE``; se usa " -"``-1`` para otras sentencias, incluidas las consultas :abbr:`CTE (Common " -"Table Expression)`. Sólo se actualiza mediante los métodos :meth:`execute` " -"y :meth:`executemany`." +"Atributo de solo lectura que proporciona la cantidad de filas modificadas " +"para las instrucciones ``INSERT``, ``UPDATE``, ``DELETE`` y ``REPLACE``; es " +"``-1`` para otras instrucciones, incluidas las consultas CTE (Common Table " +"Expression) . Solo se actualiza mediante los métodos :meth:`execute` y :meth:" +"`executemany`, después de que la instrucción se haya ejecutado hasta su " +"finalización. Esto significa que se deben obtener todas las filas " +"resultantes para que se actualice :attr:`!rowcount`." #: ../Doc/library/sqlite3.rst:1708 msgid "" @@ -2495,6 +2795,11 @@ msgid "" "arguments, a :class:`Cursor` object and the :class:`!tuple` of row values, " "and returns a custom object representing an SQLite row." msgstr "" +"Controla cómo se representa una fila obtenida de este :class:`!Cursor`. Si " +"es ``None``, una fila se representa como :class:`tuple`. Se puede configurar " +"como :class:`sqlite3.Row` incluido; o como :term:`callable` que acepta dos " +"argumentos, un objeto :class:`Cursor` y el :class:`!tuple` de valores de " +"fila, y devuelve un objeto personalizado que representa una fila de SQLite." #: ../Doc/library/sqlite3.rst:1715 msgid "" @@ -2502,6 +2807,9 @@ msgid "" "Cursor` was created. Assigning to this attribute does not affect :attr:" "`Connection.row_factory` of the parent connection." msgstr "" +"El valor predeterminado es el valor que se estableció en :attr:`Connection." +"row_factory` cuando se creó :class:`!Cursor`. La asignación a este atributo " +"no afecta a :attr:`Connection.row_factory` de la conexión principal." #: ../Doc/library/sqlite3.rst:1731 msgid "Row objects" @@ -2520,13 +2828,12 @@ msgstr "" "nombre de columna e índice." #: ../Doc/library/sqlite3.rst:1740 -#, fuzzy msgid "" "Two :class:`!Row` objects compare equal if they have identical column names " "and values." msgstr "" -"Dos objetos de fila comparan iguales si tienen columnas iguales y miembros " -"iguales." +"Dos objetos :class:`!Row` se consideran iguales si tienen nombres de columna " +"y valores idénticos." #: ../Doc/library/sqlite3.rst:1747 msgid "" @@ -2588,6 +2895,24 @@ msgid "" "print(greeting) # outputs \"b'Hello, world!'\"\n" "con.close()" msgstr "" +"con = sqlite3.connect(\":memory:\")\n" +"con.execute(\"CREATE TABLE test(blob_col blob)\")\n" +"con.execute(\"INSERT INTO test(blob_col) VALUES(zeroblob(13))\")\n" +"\n" +"# Write to our blob, using two write operations:\n" +"with con.blobopen(\"test\", \"blob_col\", 1) as blob:\n" +" blob.write(b\"hello, \")\n" +" blob.write(b\"world.\")\n" +" # Modify the first and last bytes of our blob\n" +" blob[0] = ord(\"H\")\n" +" blob[-1] = ord(\"!\")\n" +"\n" +"# Read the contents of our blob\n" +"with con.blobopen(\"test\", \"blob_col\", 1) as blob:\n" +" greeting = blob.read()\n" +"\n" +"print(greeting) # outputs \"b'Hello, world!'\"\n" +"con.close()" #: ../Doc/library/sqlite3.rst:1800 msgid "Close the blob." @@ -2630,18 +2955,17 @@ msgid "Return the current access position of the blob." msgstr "Devolver la posición de acceso actual del blob." #: ../Doc/library/sqlite3.rst:1826 -#, fuzzy msgid "" "Set the current access position of the blob to *offset*. The *origin* " "argument defaults to :const:`os.SEEK_SET` (absolute blob positioning). Other " "values for *origin* are :const:`os.SEEK_CUR` (seek relative to the current " "position) and :const:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" -"Establezca la posición de acceso actual del blob en *offset*. El valor " -"predeterminado del argumento *origin* es :data:`os. SEEK_SET` " -"(posicionamiento absoluto de blobs). Otros valores para *origin* son :data:" -"`os. SEEK_CUR` (busca en relación con la posición actual) y :data:`os. " -"SEEK_END` (buscar en relación con el final del blob)." +"Establezca la posición de acceso actual del blob en *offset*. El argumento " +"*origin* tiene como valor predeterminado :const:`os.SEEK_SET` (posición " +"absoluta del blob). Otros valores para *origin* son :const:`os.SEEK_CUR` " +"(búsqueda relativa a la posición actual) y :const:`os.SEEK_END` (búsqueda " +"relativa al final del blob)." #: ../Doc/library/sqlite3.rst:1834 msgid "PrepareProtocol objects" @@ -2894,9 +3218,8 @@ msgstr "" "ref:`converters `." #: ../Doc/library/sqlite3.rst:1988 -#, fuzzy msgid "Default adapters and converters (deprecated)" -msgstr "Adaptadores y convertidores por defecto" +msgstr "Adaptadores y convertidores predeterminados (en desuso)" #: ../Doc/library/sqlite3.rst:1992 msgid "" @@ -2904,29 +3227,38 @@ msgid "" "Instead, use the :ref:`sqlite3-adapter-converter-recipes` and tailor them to " "your needs." msgstr "" +"Los adaptadores y convertidores predeterminados están obsoletos a partir de " +"Python 3.12. En su lugar, utilice :ref:`sqlite3-adapter-converter-recipes` y " +"adáptelos a sus necesidades." #: ../Doc/library/sqlite3.rst:1996 -#, fuzzy msgid "The deprecated default adapters and converters consist of:" -msgstr "Adaptadores y convertidores por defecto" +msgstr "" +"Los adaptadores y convertidores predeterminados obsoletos consisten en:" #: ../Doc/library/sqlite3.rst:1998 msgid "" "An adapter for :class:`datetime.date` objects to :class:`strings ` in " "`ISO 8601`_ format." msgstr "" +"Un adaptador para objetos :class:`datetime.date` a :class:`strings ` en " +"formato `ISO 8601`_." #: ../Doc/library/sqlite3.rst:2000 msgid "" "An adapter for :class:`datetime.datetime` objects to strings in ISO 8601 " "format." msgstr "" +"Un adaptador para objetos :class:`datetime.datetime` a cadenas en formato " +"ISO 8601." #: ../Doc/library/sqlite3.rst:2002 msgid "" "A converter for :ref:`declared ` \"date\" types to :" "class:`datetime.date` objects." msgstr "" +"Un convertidor de tipos \"fecha\" :ref:`declared ` a " +"objetos :class:`datetime.date`." #: ../Doc/library/sqlite3.rst:2004 msgid "" @@ -2934,6 +3266,9 @@ msgid "" "objects. Fractional parts will be truncated to 6 digits (microsecond " "precision)." msgstr "" +"Un convertidor de tipos de \"marca de tiempo\" declarados a objetos :class:" +"`datetime.datetime`. Las partes fraccionarias se truncarán a 6 dígitos " +"(precisión de microsegundos)." #: ../Doc/library/sqlite3.rst:2010 msgid "" @@ -2950,7 +3285,7 @@ msgstr "" #: ../Doc/library/sqlite3.rst:2023 msgid "Command-line interface" -msgstr "" +msgstr "Interfaz de línea de comandos" #: ../Doc/library/sqlite3.rst:2025 msgid "" @@ -2958,22 +3293,25 @@ msgid "" "interpreter's :option:`-m` switch, in order to provide a simple SQLite " "shell. The argument signature is as follows::" msgstr "" +"El módulo :mod:`!sqlite3` se puede invocar como un script, utilizando el " +"modificador :option:`-m` del intérprete, para proporcionar un shell SQLite " +"simple. La firma del argumento es la siguiente:" #: ../Doc/library/sqlite3.rst:2030 msgid "python -m sqlite3 [-h] [-v] [filename] [sql]" -msgstr "" +msgstr "python -m sqlite3 [-h] [-v] [filename] [sql]" #: ../Doc/library/sqlite3.rst:2032 msgid "Type ``.quit`` or CTRL-D to exit the shell." -msgstr "" +msgstr "Escriba ``.quit`` o CTRL-D para salir del shell." #: ../Doc/library/sqlite3.rst:2038 msgid "Print CLI help." -msgstr "" +msgstr "Ayuda de la CLI de impresión." #: ../Doc/library/sqlite3.rst:2042 msgid "Print underlying SQLite library version." -msgstr "" +msgstr "Imprima la versión de la biblioteca SQLite subyacente." #: ../Doc/library/sqlite3.rst:2050 msgid "How-to guides" @@ -2985,18 +3323,17 @@ msgstr "" "Cómo usar marcadores de posición para vincular valores en consultas SQL" #: ../Doc/library/sqlite3.rst:2057 -#, fuzzy msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " "vulnerable to `SQL injection attacks`_. For example, an attacker can simply " "close the single quote and inject ``OR TRUE`` to select all rows::" msgstr "" -"Las operaciones de SQL generalmente necesitan usar valores de variables de " -"Python. Sin embargo, tenga cuidado con el uso de las operaciones de cadena " -"de caracteres de Python para ensamblar consultas, ya que son vulnerables a " -"los `SQL injection attacks`_ (see the `xkcd webcomic `_ para ver un ejemplo gracioso de lo que puede ir mal)::" +"Las operaciones SQL suelen necesitar utilizar valores de variables de " +"Python. Sin embargo, tenga cuidado al utilizar las operaciones de cadena de " +"Python para ensamblar consultas, ya que son vulnerables a `SQL injection " +"attacks`_. Por ejemplo, un atacante puede simplemente cerrar la comilla " +"simple e inyectar ``OR TRUE`` para seleccionar todas las filas:" #: ../Doc/library/sqlite3.rst:2062 #, python-format @@ -3009,6 +3346,13 @@ msgid "" "SELECT * FROM stocks WHERE symbol = '' OR TRUE; --'\n" ">>> cur.execute(sql)" msgstr "" +">>> # Never do this -- insecure!\n" +">>> symbol = input()\n" +"' OR TRUE; --\n" +">>> sql = \"SELECT * FROM stocks WHERE symbol = '%s'\" % symbol\n" +">>> print(sql)\n" +"SELECT * FROM stocks WHERE symbol = '' OR TRUE; --'\n" +">>> cur.execute(sql)" #: ../Doc/library/sqlite3.rst:2070 msgid "" @@ -3017,9 +3361,13 @@ msgid "" "values into the query by providing them as a :class:`tuple` of values to the " "second argument of the cursor's :meth:`~Cursor.execute` method." msgstr "" +"En su lugar, utilice la sustitución de parámetros de DB-API. Para insertar " +"una variable en una cadena de consulta, utilice un marcador de posición en " +"la cadena y sustituya los valores reales en la consulta proporcionándolos " +"como un :class:`tuple` de valores al segundo argumento del método :meth:" +"`~Cursor.execute` del cursor." #: ../Doc/library/sqlite3.rst:2075 -#, fuzzy msgid "" "An SQL statement may use one of two kinds of placeholders: question marks " "(qmark style) or named placeholders (named style). For the qmark style, " @@ -3029,19 +3377,15 @@ msgid "" "which must contain keys for all named parameters; any extra items are " "ignored. Here's an example of both styles:" msgstr "" -"En su lugar, utilice la sustitución de parámetros de la DB-API. Para " -"insertar una variable en una consulta, use un marcador de posición en la " -"consulta y sustituya los valores reales en la consulta como una :class:" -"`tuple` de valores al segundo argumento de :meth:`~Cursor.execute`. Una " -"sentencia SQL puede utilizar uno de dos tipos de marcadores de posición: " +"Una sentencia SQL puede utilizar uno de dos tipos de marcadores de posición: " "signos de interrogación (estilo qmark) o marcadores de posición con nombre " -"(estilo con nombre). Para el estilo qmark, ``parameters`` debe ser un :term:" -"`sequence `. Para el estilo nombrado, puede ser una instancia :" -"term:`sequence ` o :class:`dict`. La longitud de :term:`sequence " -"` debe coincidir con el número de marcadores de posición, o se " -"lanzará un :exc:`ProgrammingError`. Si se proporciona un :class:`dict`, debe " -"contener claves para todos los parámetros nombrados. Cualquier item " -"adicional se ignorará. Aquí un ejemplo de ambos estilos:" +"(estilo con nombre). Para el estilo qmark, *parameters* debe ser un :term:" +"`sequence` cuya longitud debe coincidir con el número de marcadores de " +"posición, o se genera un :exc:`ProgrammingError`. Para el estilo con nombre, " +"*parameters* debe ser una instancia de un :class:`dict` (o una subclase), " +"que debe contener claves para todos los parámetros con nombre; se ignoran " +"todos los elementos adicionales. A continuación, se muestra un ejemplo de " +"ambos estilos:" #: ../Doc/library/sqlite3.rst:2086 msgid "" @@ -3063,12 +3407,31 @@ msgid "" "print(cur.fetchall())\n" "con.close()" msgstr "" +"con = sqlite3.connect(\":memory:\")\n" +"cur = con.execute(\"CREATE TABLE lang(name, first_appeared)\")\n" +"\n" +"# This is the named style used with executemany():\n" +"data = (\n" +" {\"name\": \"C\", \"year\": 1972},\n" +" {\"name\": \"Fortran\", \"year\": 1957},\n" +" {\"name\": \"Python\", \"year\": 1991},\n" +" {\"name\": \"Go\", \"year\": 2009},\n" +")\n" +"cur.executemany(\"INSERT INTO lang VALUES(:name, :year)\", data)\n" +"\n" +"# This is the qmark style used in a SELECT query:\n" +"params = (1972,)\n" +"cur.execute(\"SELECT * FROM lang WHERE first_appeared = ?\", params)\n" +"print(cur.fetchall())\n" +"con.close()" #: ../Doc/library/sqlite3.rst:2113 msgid "" ":pep:`249` numeric placeholders are *not* supported. If used, they will be " "interpreted as named placeholders." msgstr "" +"Los marcadores de posición numéricos :pep:`249` son compatibles con *not*. " +"Si se utilizan, se interpretarán como marcadores de posición con nombre." #: ../Doc/library/sqlite3.rst:2120 msgid "How to adapt custom Python types to SQLite values" @@ -3139,6 +3502,20 @@ msgid "" "print(cur.fetchone()[0])\n" "con.close()" msgstr "" +"class Point:\n" +" def __init__(self, x, y):\n" +" self.x, self.y = x, y\n" +"\n" +" def __conform__(self, protocol):\n" +" if protocol is sqlite3.PrepareProtocol:\n" +" return f\"{self.x};{self.y}\"\n" +"\n" +"con = sqlite3.connect(\":memory:\")\n" +"cur = con.cursor()\n" +"\n" +"cur.execute(\"SELECT ?\", (Point(4.0, -3.2),))\n" +"print(cur.fetchone()[0])\n" +"con.close()" #: ../Doc/library/sqlite3.rst:2172 msgid "How to register adapter callables" @@ -3172,6 +3549,21 @@ msgid "" "print(cur.fetchone()[0])\n" "con.close()" msgstr "" +"class Point:\n" +" def __init__(self, x, y):\n" +" self.x, self.y = x, y\n" +"\n" +"def adapt_point(point):\n" +" return f\"{point.x};{point.y}\"\n" +"\n" +"sqlite3.register_adapter(Point, adapt_point)\n" +"\n" +"con = sqlite3.connect(\":memory:\")\n" +"cur = con.cursor()\n" +"\n" +"cur.execute(\"SELECT ?\", (Point(1.0, 2.5),))\n" +"print(cur.fetchone()[0])\n" +"con.close()" #: ../Doc/library/sqlite3.rst:2205 msgid "How to convert SQLite values to custom Python types" @@ -3217,6 +3609,9 @@ msgid "" " x, y = map(float, s.split(b\";\"))\n" " return Point(x, y)" msgstr "" +"def convert_point(s):\n" +" x, y = map(float, s.split(b\";\"))\n" +" return Point(x, y)" #: ../Doc/library/sqlite3.rst:2229 msgid "" @@ -3290,6 +3685,44 @@ msgid "" "cur.close()\n" "con.close()" msgstr "" +"class Point:\n" +" def __init__(self, x, y):\n" +" self.x, self.y = x, y\n" +"\n" +" def __repr__(self):\n" +" return f\"Point({self.x}, {self.y})\"\n" +"\n" +"def adapt_point(point):\n" +" return f\"{point.x};{point.y}\"\n" +"\n" +"def convert_point(s):\n" +" x, y = list(map(float, s.split(b\";\")))\n" +" return Point(x, y)\n" +"\n" +"# Register the adapter and converter\n" +"sqlite3.register_adapter(Point, adapt_point)\n" +"sqlite3.register_converter(\"point\", convert_point)\n" +"\n" +"# 1) Parse using declared types\n" +"p = Point(4.0, -3.2)\n" +"con = sqlite3.connect(\":memory:\", detect_types=sqlite3.PARSE_DECLTYPES)\n" +"cur = con.execute(\"CREATE TABLE test(p point)\")\n" +"\n" +"cur.execute(\"INSERT INTO test(p) VALUES(?)\", (p,))\n" +"cur.execute(\"SELECT p FROM test\")\n" +"print(\"with declared types:\", cur.fetchone()[0])\n" +"cur.close()\n" +"con.close()\n" +"\n" +"# 2) Parse using column names\n" +"con = sqlite3.connect(\":memory:\", detect_types=sqlite3.PARSE_COLNAMES)\n" +"cur = con.execute(\"CREATE TABLE test(p)\")\n" +"\n" +"cur.execute(\"INSERT INTO test(p) VALUES(?)\", (p,))\n" +"cur.execute('SELECT p AS \"p [point]\" FROM test')\n" +"print(\"with column names:\", cur.fetchone()[0])\n" +"cur.close()\n" +"con.close()" #: ../Doc/library/sqlite3.rst:2292 msgid "Adapter and converter recipes" @@ -3338,6 +3771,40 @@ msgid "" "sqlite3.register_converter(\"datetime\", convert_datetime)\n" "sqlite3.register_converter(\"timestamp\", convert_timestamp)" msgstr "" +"import datetime\n" +"import sqlite3\n" +"\n" +"def adapt_date_iso(val):\n" +" \"\"\"Adapt datetime.date to ISO 8601 date.\"\"\"\n" +" return val.isoformat()\n" +"\n" +"def adapt_datetime_iso(val):\n" +" \"\"\"Adapt datetime.datetime to timezone-naive ISO 8601 date.\"\"\"\n" +" return val.isoformat()\n" +"\n" +"def adapt_datetime_epoch(val):\n" +" \"\"\"Adapt datetime.datetime to Unix timestamp.\"\"\"\n" +" return int(val.timestamp())\n" +"\n" +"sqlite3.register_adapter(datetime.date, adapt_date_iso)\n" +"sqlite3.register_adapter(datetime.datetime, adapt_datetime_iso)\n" +"sqlite3.register_adapter(datetime.datetime, adapt_datetime_epoch)\n" +"\n" +"def convert_date(val):\n" +" \"\"\"Convert ISO 8601 date to datetime.date object.\"\"\"\n" +" return datetime.date.fromisoformat(val.decode())\n" +"\n" +"def convert_datetime(val):\n" +" \"\"\"Convert ISO 8601 datetime to datetime.datetime object.\"\"\"\n" +" return datetime.datetime.fromisoformat(val.decode())\n" +"\n" +"def convert_timestamp(val):\n" +" \"\"\"Convert Unix epoch timestamp to datetime.datetime object.\"\"\"\n" +" return datetime.datetime.fromtimestamp(int(val))\n" +"\n" +"sqlite3.register_converter(\"date\", convert_date)\n" +"sqlite3.register_converter(\"datetime\", convert_datetime)\n" +"sqlite3.register_converter(\"timestamp\", convert_timestamp)" #: ../Doc/library/sqlite3.rst:2356 msgid "How to use connection shortcut methods" @@ -3387,13 +3854,32 @@ msgid "" "# the connection object should be closed manually\n" "con.close()" msgstr "" +"# Create and fill the table.\n" +"con = sqlite3.connect(\":memory:\")\n" +"con.execute(\"CREATE TABLE lang(name, first_appeared)\")\n" +"data = [\n" +" (\"C++\", 1985),\n" +" (\"Objective-C\", 1984),\n" +"]\n" +"con.executemany(\"INSERT INTO lang(name, first_appeared) VALUES(?, ?)\", " +"data)\n" +"\n" +"# Print the table contents\n" +"for row in con.execute(\"SELECT name, first_appeared FROM lang\"):\n" +" print(row)\n" +"\n" +"print(\"I just deleted\", con.execute(\"DELETE FROM lang\").rowcount, " +"\"rows\")\n" +"\n" +"# close() is not a shortcut method and it's not called automatically;\n" +"# the connection object should be closed manually\n" +"con.close()" #: ../Doc/library/sqlite3.rst:2399 msgid "How to use the connection context manager" msgstr "Como usar la conexión con un administrador de contexto" #: ../Doc/library/sqlite3.rst:2401 -#, fuzzy msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -3406,30 +3892,32 @@ msgid "" msgstr "" "Un objeto :class:`Connection` se puede utilizar como un administrador de " "contexto que confirma o revierte automáticamente las transacciones abiertas " -"al salir del administrador de contexto. Si el cuerpo de :keyword:`with` " -"termina con una excepción, la transacción es confirmada. Si la confirmación " -"falla, o si el cuerpo del ``with`` lanza una excepción que no es capturada, " -"la transacción se revierte." +"al salir del cuerpo del administrador de contexto. Si el cuerpo de la " +"instrucción :keyword:`with` finaliza sin excepciones, la transacción se " +"confirma. Si esta confirmación falla, o si el cuerpo de la instrucción " +"``with`` genera una excepción no detectada, la transacción se revierte. Si :" +"attr:`~Connection.autocommit` es ``False``, se abre implícitamente una nueva " +"transacción después de confirmar o revertir." #: ../Doc/library/sqlite3.rst:2412 -#, fuzzy msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, or if :attr:`~Connection.autocommit` is ``True``, the context " "manager does nothing." msgstr "" -"Si no hay una transacción abierta al salir del cuerpo de la declaración " -"``with``, el administrador de contexto no funciona." +"Si no hay ninguna transacción abierta al salir del cuerpo de la declaración " +"``with``, o si :attr:`~Connection.autocommit` es ``True``, el administrador " +"de contexto no hace nada." #: ../Doc/library/sqlite3.rst:2417 -#, fuzzy msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection. If you need a closing context manager, consider using :meth:" "`contextlib.closing`." msgstr "" "El administrador de contexto no abre implícitamente una nueva transacción ni " -"cierra la conexión." +"cierra la conexión. Si necesita un administrador de contexto de cierre, " +"considere usar :meth:`contextlib.closing`." #: ../Doc/library/sqlite3.rst:2421 msgid "" @@ -3454,6 +3942,26 @@ msgid "" "# so the connection object should be closed manually\n" "con.close()" msgstr "" +"con = sqlite3.connect(\":memory:\")\n" +"con.execute(\"CREATE TABLE lang(id INTEGER PRIMARY KEY, name VARCHAR " +"UNIQUE)\")\n" +"\n" +"# Successful, con.commit() is called automatically afterwards\n" +"with con:\n" +" con.execute(\"INSERT INTO lang(name) VALUES(?)\", (\"Python\",))\n" +"\n" +"# con.rollback() is called after the with block finishes with an exception,\n" +"# the exception is still raised and must be caught\n" +"try:\n" +" with con:\n" +" con.execute(\"INSERT INTO lang(name) VALUES(?)\", (\"Python\",))\n" +"except sqlite3.IntegrityError:\n" +" print(\"couldn't add Python twice\")\n" +"\n" +"# Connection object used as context manager only commits or rollbacks " +"transactions,\n" +"# so the connection object should be closed manually\n" +"con.close()" #: ../Doc/library/sqlite3.rst:2451 msgid "How to work with SQLite URIs" @@ -3474,6 +3982,10 @@ msgid "" "Traceback (most recent call last):\n" "OperationalError: attempt to write a readonly database" msgstr "" +">>> con = sqlite3.connect(\"file:tutorial.db?mode=ro\", uri=True)\n" +">>> con.execute(\"CREATE TABLE readonly(data)\")\n" +"Traceback (most recent call last):\n" +"OperationalError: attempt to write a readonly database" #: ../Doc/library/sqlite3.rst:2464 msgid "" @@ -3490,6 +4002,9 @@ msgid "" "Traceback (most recent call last):\n" "OperationalError: unable to open database file" msgstr "" +">>> con = sqlite3.connect(\"file:nosuchdb.db?mode=rw\", uri=True)\n" +"Traceback (most recent call last):\n" +"OperationalError: unable to open database file" #: ../Doc/library/sqlite3.rst:2474 msgid "Create a shared named in-memory database:" @@ -3509,6 +4024,17 @@ msgid "" "con1.close()\n" "con2.close()" msgstr "" +"db = \"file:mem1?mode=memory&cache=shared\"\n" +"con1 = sqlite3.connect(db, uri=True)\n" +"con2 = sqlite3.connect(db, uri=True)\n" +"with con1:\n" +" con1.execute(\"CREATE TABLE shared(data)\")\n" +" con1.execute(\"INSERT INTO shared VALUES(28)\")\n" +"res = con2.execute(\"SELECT data FROM shared\")\n" +"assert res.fetchone() == (28,)\n" +"\n" +"con1.close()\n" +"con2.close()" #: ../Doc/library/sqlite3.rst:2490 msgid "" @@ -3520,7 +4046,7 @@ msgstr "" #: ../Doc/library/sqlite3.rst:2499 msgid "How to create and use row factories" -msgstr "" +msgstr "Cómo crear y utilizar fábricas de filas" #: ../Doc/library/sqlite3.rst:2501 msgid "" @@ -3528,6 +4054,10 @@ msgid "" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" +"De forma predeterminada, :mod:`!sqlite3` representa cada fila como :class:" +"`tuple`. Si :class:`!tuple` no se adapta a sus necesidades, puede utilizar " +"la clase :class:`sqlite3.Row` o una :attr:`~Cursor.row_factory` " +"personalizada." #: ../Doc/library/sqlite3.rst:2506 msgid "" @@ -3536,6 +4066,10 @@ msgid "" "`Connection.row_factory`, so all cursors created from the connection will " "use the same row factory." msgstr "" +"Si bien :attr:`!row_factory` existe como atributo tanto en :class:`Cursor` " +"como en :class:`Connection`, se recomienda configurar :class:`Connection." +"row_factory`, de modo que todos los cursores creados a partir de la conexión " +"utilicen la misma fábrica de filas." #: ../Doc/library/sqlite3.rst:2511 msgid "" @@ -3544,16 +4078,23 @@ msgid "" "To use :class:`!Row` as a row factory, assign it to the :attr:`!row_factory` " "attribute:" msgstr "" +":class:`!Row` proporciona acceso indexado y sin distinción entre mayúsculas " +"y minúsculas a las columnas, con una sobrecarga de memoria y un impacto en " +"el rendimiento mínimos en comparación con :class:`!tuple`. Para utilizar :" +"class:`!Row` como una fábrica de filas, asígnelo al atributo :attr:`!" +"row_factory`:" #: ../Doc/library/sqlite3.rst:2516 msgid "" ">>> con = sqlite3.connect(\":memory:\")\n" ">>> con.row_factory = sqlite3.Row" msgstr "" +">>> con = sqlite3.connect(\":memory:\")\n" +">>> con.row_factory = sqlite3.Row" #: ../Doc/library/sqlite3.rst:2521 msgid "Queries now return :class:`!Row` objects:" -msgstr "" +msgstr "Las consultas ahora devuelven objetos :class:`!Row`:" #: ../Doc/library/sqlite3.rst:2523 msgid "" @@ -3569,6 +4110,17 @@ msgid "" "6378\n" ">>> con.close()" msgstr "" +">>> res = con.execute(\"SELECT 'Earth' AS name, 6378 AS radius\")\n" +">>> row = res.fetchone()\n" +">>> row.keys()\n" +"['name', 'radius']\n" +">>> row[0] # Access by index.\n" +"'Earth'\n" +">>> row[\"name\"] # Access by name.\n" +"'Earth'\n" +">>> row[\"RADIUS\"] # Column names are case-insensitive.\n" +"6378\n" +">>> con.close()" #: ../Doc/library/sqlite3.rst:2539 msgid "" @@ -3577,12 +4129,18 @@ msgid "" "defined by expressions, e.g. literals, with the given aliases ``expr AS " "alias``." msgstr "" +"La cláusula ``FROM`` se puede omitir en la declaración ``SELECT``, como en " +"el ejemplo anterior. En tales casos, SQLite devuelve una sola fila con " +"columnas definidas por expresiones, por ejemplo, literales, con los alias " +"indicados ``expr AS alias``." #: ../Doc/library/sqlite3.rst:2544 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" +"Puede crear un :attr:`~Cursor.row_factory` personalizado que devuelva cada " +"fila como un :class:`dict`, con nombres de columnas asignados a valores:" #: ../Doc/library/sqlite3.rst:2547 msgid "" @@ -3590,11 +4148,16 @@ msgid "" " fields = [column[0] for column in cursor.description]\n" " return {key: value for key, value in zip(fields, row)}" msgstr "" +"def dict_factory(cursor, row):\n" +" fields = [column[0] for column in cursor.description]\n" +" return {key: value for key, value in zip(fields, row)}" #: ../Doc/library/sqlite3.rst:2553 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" +"Al usarlo, las consultas ahora devuelven un :class:`!dict` en lugar de un :" +"class:`!tuple`:" #: ../Doc/library/sqlite3.rst:2555 msgid "" @@ -3605,10 +4168,16 @@ msgid "" "{'a': 1, 'b': 2}\n" ">>> con.close()" msgstr "" +">>> con = sqlite3.connect(\":memory:\")\n" +">>> con.row_factory = dict_factory\n" +">>> for row in con.execute(\"SELECT 1 AS a, 2 AS b\"):\n" +"... print(row)\n" +"{'a': 1, 'b': 2}\n" +">>> con.close()" #: ../Doc/library/sqlite3.rst:2564 msgid "The following row factory returns a :term:`named tuple`:" -msgstr "" +msgstr "La siguiente fábrica de filas devuelve un :term:`named tuple`:" #: ../Doc/library/sqlite3.rst:2566 msgid "" @@ -3619,10 +4188,16 @@ msgid "" " cls = namedtuple(\"Row\", fields)\n" " return cls._make(row)" msgstr "" +"from collections import namedtuple\n" +"\n" +"def namedtuple_factory(cursor, row):\n" +" fields = [column[0] for column in cursor.description]\n" +" cls = namedtuple(\"Row\", fields)\n" +" return cls._make(row)" #: ../Doc/library/sqlite3.rst:2575 msgid ":func:`!namedtuple_factory` can be used as follows:" -msgstr "" +msgstr ":func:`!namedtuple_factory` se puede utilizar de la siguiente manera:" #: ../Doc/library/sqlite3.rst:2577 msgid "" @@ -3638,6 +4213,17 @@ msgid "" "2\n" ">>> con.close()" msgstr "" +">>> con = sqlite3.connect(\":memory:\")\n" +">>> con.row_factory = namedtuple_factory\n" +">>> cur = con.execute(\"SELECT 1 AS a, 2 AS b\")\n" +">>> row = cur.fetchone()\n" +">>> row\n" +"Row(a=1, b=2)\n" +">>> row[0] # Indexed access.\n" +"1\n" +">>> row.b # Attribute access.\n" +"2\n" +">>> con.close()" #: ../Doc/library/sqlite3.rst:2591 msgid "" @@ -3645,10 +4231,13 @@ msgid "" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" +"Con algunos ajustes, la receta anterior se puede adaptar para utilizar un :" +"class:`~dataclasses.dataclass`, o cualquier otra clase personalizada, en " +"lugar de un :class:`~collections.namedtuple`." #: ../Doc/library/sqlite3.rst:2599 msgid "How to handle non-UTF-8 text encodings" -msgstr "" +msgstr "Cómo manejar codificaciones de texto que no sean UTF-8" #: ../Doc/library/sqlite3.rst:2601 msgid "" @@ -3657,6 +4246,11 @@ msgid "" "fail for other encodings and invalid UTF-8. You can use a custom :attr:" "`~Connection.text_factory` to handle such cases." msgstr "" +"De forma predeterminada, :mod:`!sqlite3` utiliza :class:`str` para adaptar " +"los valores de SQLite con el tipo de datos ``TEXT``. Esto funciona bien para " +"texto codificado en UTF-8, pero puede fallar para otras codificaciones y " +"UTF-8 no válido. Puede utilizar un :attr:`~Connection.text_factory` " +"personalizado para manejar estos casos." #: ../Doc/library/sqlite3.rst:2607 msgid "" @@ -3668,30 +4262,42 @@ msgid "" "data:`!con` connected to this database, we can decode the Latin-2 encoded " "text using this :attr:`~Connection.text_factory`:" msgstr "" +"Debido a `flexible typing`_ de SQLite, no es raro encontrar columnas de " +"tabla con el tipo de datos ``TEXT`` que contienen codificaciones que no son " +"UTF-8, o incluso datos arbitrarios. Para demostrarlo, supongamos que tenemos " +"una base de datos con texto codificado en ISO-8859-2 (Latin-2), por ejemplo, " +"una tabla de entradas de diccionario checo-inglés. Suponiendo que ahora " +"tenemos una instancia :class:`Connection` :py:data:`!con` conectada a esta " +"base de datos, podemos decodificar el texto codificado en Latin-2 utilizando " +"este :attr:`~Connection.text_factory`:" #: ../Doc/library/sqlite3.rst:2616 msgid "con.text_factory = lambda data: str(data, encoding=\"latin2\")" -msgstr "" +msgstr "con.text_factory = lambda data: str(data, encoding=\"latin2\")" #: ../Doc/library/sqlite3.rst:2620 msgid "" "For invalid UTF-8 or arbitrary data in stored in ``TEXT`` table columns, you " "can use the following technique, borrowed from the :ref:`unicode-howto`:" msgstr "" +"Para datos UTF-8 no válidos o arbitrarios almacenados en las columnas de la " +"tabla ``TEXT``, puede utilizar la siguiente técnica, tomada prestada de :ref:" +"`unicode-howto`:" #: ../Doc/library/sqlite3.rst:2623 msgid "con.text_factory = lambda data: str(data, errors=\"surrogateescape\")" -msgstr "" +msgstr "con.text_factory = lambda data: str(data, errors=\"surrogateescape\")" #: ../Doc/library/sqlite3.rst:2629 msgid "" "The :mod:`!sqlite3` module API does not support strings containing " "surrogates." msgstr "" +"La API del módulo :mod:`!sqlite3` no admite cadenas que contengan sustitutos." #: ../Doc/library/sqlite3.rst:2634 msgid ":ref:`unicode-howto`" -msgstr "" +msgstr ":ref:`unicode-howto`" #: ../Doc/library/sqlite3.rst:2640 msgid "Explanation" @@ -3708,10 +4314,15 @@ msgid "" "control-autocommit` is recommended, while :ref:`sqlite3-transaction-control-" "isolation-level` retains the pre-Python 3.12 behaviour." msgstr "" +":mod:`!sqlite3` ofrece múltiples métodos para controlar si se abren y " +"cierran las transacciones de la base de datos, cuándo y cómo. Se recomienda :" +"ref:`sqlite3-transaction-control-autocommit`, mientras que :ref:`sqlite3-" +"transaction-control-isolation-level` conserva el comportamiento anterior a " +"Python 3.12." #: ../Doc/library/sqlite3.rst:2657 msgid "Transaction control via the ``autocommit`` attribute" -msgstr "" +msgstr "Control de transacciones mediante el atributo ``autocommit``" #: ../Doc/library/sqlite3.rst:2659 msgid "" @@ -3719,12 +4330,17 @@ msgid "" "attr:`Connection.autocommit` attribute, which should preferably be set using " "the *autocommit* parameter of :func:`connect`." msgstr "" +"La forma recomendada de controlar el comportamiento de las transacciones es " +"a través del atributo :attr:`Connection.autocommit`, que preferiblemente " +"debe configurarse utilizando el parámetro *autocommit* de :func:`connect`." #: ../Doc/library/sqlite3.rst:2664 msgid "" "It is suggested to set *autocommit* to ``False``, which implies :pep:`249`-" "compliant transaction control. This means:" msgstr "" +"Se recomienda configurar *autocommit* en ``False``, lo que implica un " +"control de transacciones compatible con :pep:`249`. Esto significa:" #: ../Doc/library/sqlite3.rst:2668 msgid "" @@ -3734,20 +4350,30 @@ msgid "" "one, for the latter two). :mod:`!sqlite3` uses ``BEGIN DEFERRED`` statements " "when opening transactions." msgstr "" +":mod:`!sqlite3` garantiza que una transacción esté siempre abierta, por lo " +"que :func:`connect`, :meth:`Connection.commit` y :meth:`Connection.rollback` " +"abrirán implícitamente una nueva transacción (inmediatamente después de " +"cerrar la pendiente, en el caso de las dos últimas). :mod:`!sqlite3` utiliza " +"instrucciones ``BEGIN DEFERRED`` al abrir transacciones." #: ../Doc/library/sqlite3.rst:2673 msgid "Transactions should be committed explicitly using :meth:`!commit`." msgstr "" +"Las transacciones deben confirmarse explícitamente mediante :meth:`!commit`." #: ../Doc/library/sqlite3.rst:2674 msgid "Transactions should be rolled back explicitly using :meth:`!rollback`." msgstr "" +"Las transacciones deben revertirse explícitamente utilizando :meth:`!" +"rollback`." #: ../Doc/library/sqlite3.rst:2675 msgid "" "An implicit rollback is performed if the database is :meth:`~Connection." "close`-ed with pending changes." msgstr "" +"Se realiza una reversión implícita si la base de datos está modificada como :" +"meth:`~Connection.close` con cambios pendientes." #: ../Doc/library/sqlite3.rst:2678 msgid "" @@ -3757,6 +4383,12 @@ msgid "" "compliant :attr:`Connection.autocommit` attribute; use :attr:`Connection." "in_transaction` to query the low-level SQLite autocommit mode." msgstr "" +"Establezca *autocommit* en ``True`` para habilitar `autocommit mode`_ de " +"SQLite. En este modo, :meth:`Connection.commit` y :meth:`Connection." +"rollback` no tienen efecto. Tenga en cuenta que el modo de confirmación " +"automática de SQLite es distinto del atributo :attr:`Connection.autocommit` " +"compatible con :pep:`249`; utilice :attr:`Connection.in_transaction` para " +"consultar el modo de confirmación automática de bajo nivel de SQLite." #: ../Doc/library/sqlite3.rst:2686 msgid "" @@ -3764,10 +4396,14 @@ msgid "" "control behaviour to the :attr:`Connection.isolation_level` attribute. See :" "ref:`sqlite3-transaction-control-isolation-level` for more information." msgstr "" +"Establezca *autocommit* en :data:`LEGACY_TRANSACTION_CONTROL` para dejar el " +"comportamiento de control de transacciones al atributo :attr:`Connection." +"isolation_level`. Consulte :ref:`sqlite3-transaction-control-isolation-" +"level` para obtener más información." #: ../Doc/library/sqlite3.rst:2695 msgid "Transaction control via the ``isolation_level`` attribute" -msgstr "" +msgstr "Control de transacciones mediante el atributo ``isolation_level``" #: ../Doc/library/sqlite3.rst:2699 msgid "" @@ -3775,6 +4411,9 @@ msgid "" "`~Connection.autocommit` attribute. See :ref:`sqlite3-transaction-control-" "autocommit`." msgstr "" +"La forma recomendada de controlar las transacciones es mediante el atributo :" +"attr:`~Connection.autocommit`. Consulte :ref:`sqlite3-transaction-control-" +"autocommit`." #: ../Doc/library/sqlite3.rst:2703 msgid "" @@ -3783,6 +4422,11 @@ msgid "" "controlled using the :attr:`Connection.isolation_level` attribute. " "Otherwise, :attr:`!isolation_level` has no effect." msgstr "" +"Si :attr:`Connection.autocommit` se configura en :data:" +"`LEGACY_TRANSACTION_CONTROL` (el valor predeterminado), el comportamiento de " +"la transacción se controla mediante el atributo :attr:`Connection." +"isolation_level`. De lo contrario, :attr:`!isolation_level` no tiene ningún " +"efecto." #: ../Doc/library/sqlite3.rst:2709 msgid "" @@ -3848,15 +4492,17 @@ msgid "" "The recommended way of controlling transactions is now via the :attr:" "`~Connection.autocommit` attribute." msgstr "" +"La forma recomendada de controlar las transacciones ahora es a través del " +"atributo :attr:`~Connection.autocommit`." #: ../Doc/library/sqlite3.rst:1490 msgid "? (question mark)" -msgstr "" +msgstr "? (signo de interrogación)" #: ../Doc/library/sqlite3.rst:1490 ../Doc/library/sqlite3.rst:1491 msgid "in SQL statements" -msgstr "" +msgstr "en sentencias SQL" #: ../Doc/library/sqlite3.rst:1491 msgid ": (colon)" -msgstr "" +msgstr ": (dos puntos)" From 9448c5d2935fd3b3caa00375d1ddbd4e644e8542 Mon Sep 17 00:00:00 2001 From: "Carlos A. Crespo" Date: Tue, 14 Oct 2025 07:49:24 -0300 Subject: [PATCH 27/40] Workaround to fix code snippets issues on pospell (#3346) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related to #3324. Co-authored-by: Cristián Maureira-Fredes --- scripts/check_spell.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/scripts/check_spell.py b/scripts/check_spell.py index daf5feb3b6..d915d23849 100644 --- a/scripts/check_spell.py +++ b/scripts/check_spell.py @@ -7,6 +7,7 @@ import sys import tempfile +import polib import pospell @@ -44,7 +45,29 @@ def check_spell(po_files=None): if not po_files: po_files = Path(".").glob("*/*.po") - detected_errors = pospell.spell_check(po_files, personal_dict=output_filename, language="es_ES") + # Workaround issue #3324 FIXME + # It seems that all code snippets have line breaks '\n'. This causes the + # currently indentation issues. + + # Create temporary copies of the original files. + po_files_tmp = [] + for po_file in po_files: + with open(tempfile.mktemp(), "w") as temp_file: + # Copy content of the .po file + with open(po_file, "r", encoding="utf-8") as f: + temp_file.write(f.read()) + po_files_tmp.append(temp_file.name) + + # Don't translate probably code entries + polib_temp_file = polib.pofile(temp_file.name) + for entry in polib_temp_file: + if "\n" in entry.msgid: + entry.msgstr = "" + polib_temp_file.save() + + detected_errors = pospell.spell_check(po_files_tmp, personal_dict=output_filename, language="es_ES") + for tmp, orig in zip(po_files_tmp, po_files): + print(tmp, " == ", orig) return detected_errors From 9d4cdb66376c4cfd026943fbc60a8021a0fdc3b4 Mon Sep 17 00:00:00 2001 From: AlfonsoAreizaG <63620799+Alfareiza@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:50:29 -0300 Subject: [PATCH 28/40] =?UTF-8?q?Tradduci=C3=B3n=20de=20library/importlib?= =?UTF-8?q?=20(#3364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #2928 --------- Co-authored-by: Cristián Maureira-Fredes --- library/importlib.po | 492 ++++++++++++++++++++++++++++++++----------- 1 file changed, 366 insertions(+), 126 deletions(-) diff --git a/library/importlib.po b/library/importlib.po index e8d7508952..c02df966c1 100644 --- a/library/importlib.po +++ b/library/importlib.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: 2022-11-25 00:29+0800\n" -"Last-Translator: Rodrigo Tobar \n" -"Language: es\n" +"PO-Revision-Date: 2025-01-29 10:47-0300\n" +"Last-Translator: Alfonso Areiza \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.5\n" #: ../Doc/library/importlib.rst:2 msgid ":mod:`!importlib` --- The implementation of :keyword:`!import`" @@ -35,7 +36,7 @@ msgstr "Introducción" #: ../Doc/library/importlib.rst:20 msgid "The purpose of the :mod:`importlib` package is three-fold." -msgstr "El propósito del paquete :mod:`importlib` es triple:" +msgstr "El propósito del paquete :mod:`importlib` es triple." #: ../Doc/library/importlib.rst:22 msgid "" @@ -409,6 +410,10 @@ msgid "" "except NameError:\n" " cache = {}" msgstr "" +"try:\n" +" cache\n" +"except NameError:\n" +" cache = {}" #: ../Doc/library/importlib.rst:187 msgid "" @@ -495,15 +500,23 @@ msgid "" " +-- FileLoader\n" " +-- SourceLoader" msgstr "" +"object\n" +" +-- MetaPathFinder\n" +" +-- PathEntryFinder\n" +" +-- Loader\n" +" +-- ResourceLoader --------+\n" +" +-- InspectLoader |\n" +" +-- ExecutionLoader --+\n" +" +-- FileLoader\n" +" +-- SourceLoader" #: ../Doc/library/importlib.rst:240 msgid "An abstract base class representing a :term:`meta path finder`." msgstr "Una clase base abstracta que representa :term:`meta path finder`." #: ../Doc/library/importlib.rst:244 ../Doc/library/importlib.rst:280 -#, fuzzy msgid "No longer a subclass of :class:`!Finder`." -msgstr "Ya no hereda de :class:`Finder`." +msgstr "Ya no hereda de :class:`!Finder`." #: ../Doc/library/importlib.rst:249 msgid "" @@ -538,9 +551,8 @@ msgstr "" "`sys.meta_path`." #: ../Doc/library/importlib.rst:267 -#, fuzzy msgid "Returns ``None`` when called instead of :data:`NotImplemented`." -msgstr "Retorna ``None`` cuando se llama en lugar de ``NotImplemented``." +msgstr "Retorna ``None`` cuando se llama en lugar de :data:`NotImplemented`." #: ../Doc/library/importlib.rst:273 msgid "" @@ -645,7 +657,6 @@ msgstr "" "se lanza :exc:`ImportError`; de lo contrario, se retorna el módulo cargado." #: ../Doc/library/importlib.rst:345 -#, fuzzy msgid "" "If the requested module already exists in :data:`sys.modules`, that module " "should be used and reloaded. Otherwise the loader should create a new module " @@ -660,9 +671,8 @@ msgstr "" "e insertarlo en :data:`sys.modules` antes de que comience la carga, para " "evitar la recursividad de la importación. Si el cargador insertó un módulo y " "la carga falla, el cargador debe eliminarlo de :data:`sys.modules`; los " -"módulos que ya están en :data:`sys.modules` antes de que el cargador " -"comenzara a ejecutarse deben dejarse en paz (ver :func:`importlib.util." -"module_for_loader`)." +"módulos que ya estaban en :data:`sys.modules` antes de que el cargador " +"comenzara a ejecutarse deben dejarse intactos." #: ../Doc/library/importlib.rst:354 msgid "" @@ -715,7 +725,6 @@ msgid ":attr:`__path__`" msgstr ":attr:`__path__`" #: ../Doc/library/importlib.rst:372 -#, fuzzy msgid "" "The list of locations where the package's submodules will be found. Most of " "the time this is a single directory. The import system passes this attribute " @@ -726,7 +735,7 @@ msgstr "" "La lista de ubicaciones donde los sub-módulos del paquete pueden ser " "encontrados. La mayoría de las veces es un solo directorio. El sistema de " "importación pasa este atributo a ``__import__()`` y a buscadores de la misma " -"forma que :attr:`sys.path` pero sólo para el paquete. No está establecido en " +"forma que :data:`sys.path` pero sólo para el paquete. No está establecido en " "módulos que no son paquetes, por lo que puede ser usado como un indicador si " "el módulo es un paquete." @@ -863,10 +872,10 @@ msgid "" msgstr "" "Un método abstracto para retornar la fuente de un módulo. Se retorna como " "una cadena de caracteres de texto usando :term:`universal newlines`, " -"traduciendo todos los separadores de línea reconocidos en caracteres ``'\n" -"'``. Retorna ``None`` si no hay una fuente disponible (por ejemplo, un " -"módulo integrado). Lanza :exc:`ImportError` si el cargador no puede " -"encontrar el módulo especificado." +"traduciendo todos los separadores de línea reconocidos en caracteres " +"``'\\n'``. Retorna ``None`` si no hay una fuente disponible (por ejemplo, un " +"módulo integrado). Lanza la excepción :exc:`ImportError` si el cargador no " +"puede encontrar el módulo especificado." #: ../Doc/library/importlib.rst:457 ../Doc/library/importlib.rst:466 #: ../Doc/library/importlib.rst:516 @@ -991,7 +1000,7 @@ msgstr "Retorna :attr:`path`." #: ../Doc/library/importlib.rst:552 msgid "Reads *path* as a binary file and returns the bytes from it." -msgstr "Lee *path* como un archivo binario y devuelve los bytes de él." +msgstr "Lee *path* como un archivo binario y retorna los bytes de él." #: ../Doc/library/importlib.rst:557 msgid "" @@ -1045,7 +1054,7 @@ msgid "" "Optional abstract method which returns a :class:`dict` containing metadata " "about the specified path. Supported dictionary keys are:" msgstr "" -"Método abstracto opcional que devuelve un :class:`dict` que contiene " +"Método abstracto opcional que retorna un :class:`dict` que contiene " "metadatos sobre la ruta especificada. Las claves de diccionario admitidas " "son:" @@ -1102,13 +1111,12 @@ msgstr "" "automáticamente." #: ../Doc/library/importlib.rst:611 -#, fuzzy msgid "" "When writing to the path fails because the path is read-only (:const:`errno." "EACCES`/:exc:`PermissionError`), do not propagate the exception." msgstr "" "Cuando la escritura en la ruta falla porque la ruta es de solo lectura (:" -"attr:`errno.EACCES`/:exc:`PermissionError`), no propague la excepción." +"const:`errno.EACCES`/:exc:`PermissionError`), no propague la excepción." #: ../Doc/library/importlib.rst:615 msgid "No longer raises :exc:`NotImplementedError` when called." @@ -1150,12 +1158,14 @@ msgstr "" #: ../Doc/library/importlib.rst:650 msgid "*Superseded by TraversableResources*" -msgstr "" +msgstr "*Reemplazado por TraversableResources*" #: ../Doc/library/importlib.rst:652 msgid "" "An :term:`abstract base class` to provide the ability to read *resources*." msgstr "" +"Una :term:`abstract base class` para proporcionar la capacidad de leer " +"*recursos*." #: ../Doc/library/importlib.rst:655 msgid "" @@ -1166,6 +1176,12 @@ msgid "" "does not matter if the package and its data file(s) are stored e.g. in a zip " "file versus on the file system." msgstr "" +"Desde la perspectiva de este ABC, un *recurso* es un artefacto binario que " +"se envía dentro de un paquete. Normalmente, es algo así como un archivo de " +"datos que se encuentra junto al archivo ``__init__.py`` del paquete. El " +"propósito de esta clase es ayudar a abstraer el acceso a dichos archivos de " +"datos de modo que no importe si el paquete y sus archivos de datos se " +"almacenan, por ejemplo, en un archivo zip o en el sistema de archivos." #: ../Doc/library/importlib.rst:663 msgid "" @@ -1178,6 +1194,16 @@ msgid "" "class are expected to directly correlate to a specific package (instead of " "potentially representing multiple packages or a module)." msgstr "" +"Para cualquiera de los métodos de esta clase, se espera que un argumento " +"*recurso* sea un :term:`path-like object` que conceptualmente, representa " +"solo un nombre de archivo. Esto significa que no se deben incluir rutas de " +"subdirectorio en el argumento *recurso*. Esto se debe a que la ubicación del " +"paquete al que se dirige el lector actúa como el “directorio”. Por lo tanto, " +"la metáfora para los directorios y los nombres de archivo es paquetes y " +"recursos, respectivamente. Esta es también la razón por la que se espera que " +"las instancias de esta clase se correlacionen directamente con un paquete " +"específico (en lugar de representar potencialmente varios paquetes o un " +"módulo)." #: ../Doc/library/importlib.rst:674 msgid "" @@ -1187,38 +1213,51 @@ msgid "" "not a package, this method should return :const:`None`. An object compatible " "with this ABC should only be returned when the specified module is a package." msgstr "" +"Se espera que los cargadores que deseen admitir la lectura de recursos " +"proporcionen un método llamado ``get_resource_reader(fullname)`` que retorna " +"un objeto que implemente la interfaz de este ABC. Si el módulo especificado " +"por fullname no es un paquete, este método debe retornar un :const:`None`. " +"Un objeto compatible con este ABC solo debe devolverse cuando el módulo " +"especificado sea un paquete." #: ../Doc/library/importlib.rst:683 ../Doc/library/importlib.rst:793 -#, fuzzy msgid "Use :class:`importlib.resources.abc.TraversableResources` instead." -msgstr "Utilice :meth:`importlib.abc.Loader.exec_module` en su lugar." +msgstr "" +"Utilice :class:`importlib.resources.abc.TraversableResources` en su lugar." #: ../Doc/library/importlib.rst:688 msgid "" "Returns an opened, :term:`file-like object` for binary reading of the " "*resource*." msgstr "" +"Retorna un objeto abierto, :term:`file-like object`, para la lectura binaria " +"del *recurso*." #: ../Doc/library/importlib.rst:691 msgid "If the resource cannot be found, :exc:`FileNotFoundError` is raised." msgstr "" +"Si no se puede encontrar el recurso, se lanza una excepción :exc:" +"`FileNotFoundError`." #: ../Doc/library/importlib.rst:696 -#, fuzzy msgid "Returns the file system path to the *resource*." -msgstr "La ruta al archivo de origen." +msgstr "Retorna la ruta del sistema de archivos al *recurso*." #: ../Doc/library/importlib.rst:698 msgid "" "If the resource does not concretely exist on the file system, raise :exc:" "`FileNotFoundError`." msgstr "" +"Si el recurso no existe concretamente en el sistema de archivos, lanza una " +"excepción :exc:`FileNotFoundError`." #: ../Doc/library/importlib.rst:703 msgid "" "Returns ``True`` if the named *name* is considered a resource. :exc:" "`FileNotFoundError` is raised if *name* does not exist." msgstr "" +"Retorna ``True`` si el nombre *name* se considera un recurso. La excepción :" +"exc:`FileNotFoundError` se lanza si *name* no existe." #: ../Doc/library/importlib.rst:708 msgid "" @@ -1227,6 +1266,10 @@ msgid "" "actual resources, e.g. it is acceptable to return names for which :meth:" "`is_resource` would be false." msgstr "" +"Retorna un :term:`iterable` de cadenas de caracteres sobre el contenido del " +"paquete. Tenga en cuenta que no es necesario que todos los nombres devueltos " +"por el iterador sean recursos reales, por ejemplo, es aceptable devolver " +"nombres para los cuales :meth:`is_resource` sería falso." #: ../Doc/library/importlib.rst:714 msgid "" @@ -1236,71 +1279,85 @@ msgid "" "is allowed so that when it is known that the package and resources are " "stored on the file system then those subdirectory names can be used directly." msgstr "" +"Permitir que se retornen nombres que no sean recursos es permitir " +"situaciones en las que se conoce a priori cómo se almacenan un paquete y sus " +"recursos y los nombres que no son recursos serían útiles. Por ejemplo, se " +"permite retornar nombres de subdirectorios para que, cuando se sepa que el " +"paquete y los recursos están almacenados en el sistema de archivos, esos " +"nombres de subdirectorios se puedan usar directamente." #: ../Doc/library/importlib.rst:722 msgid "The abstract method returns an iterable of no items." -msgstr "" +msgstr "El método abstracto retorna un iterable sin elementos." #: ../Doc/library/importlib.rst:727 msgid "" "An object with a subset of :class:`pathlib.Path` methods suitable for " "traversing directories and opening files." msgstr "" +"Un objeto con un subconjunto de métodos de :class:`pathlib.Path` adecuados " +"para recorrer directorios y abrir archivos." #: ../Doc/library/importlib.rst:730 msgid "" "For a representation of the object on the file-system, use :meth:`importlib." "resources.as_file`." msgstr "" +"Para obtener una representación del objeto en el sistema de archivos, " +"utilice :meth:`importlib.resources.as_file`." #: ../Doc/library/importlib.rst:735 -#, fuzzy msgid "Use :class:`importlib.resources.abc.Traversable` instead." -msgstr "Utilice :meth:`importlib.abc.Loader.exec_module` en su lugar." +msgstr "Utilice :class:`importlib.resources.abc.Traversable` en su lugar." #: ../Doc/library/importlib.rst:740 msgid "Abstract. The base name of this object without any parent references." msgstr "" +"Abstracto. El nombre base de este objeto sin ninguna referencia principal." #: ../Doc/library/importlib.rst:744 msgid "Yield ``Traversable`` objects in ``self``." -msgstr "" +msgstr "Produce objetos ``Traversable`` en ``self``." #: ../Doc/library/importlib.rst:748 msgid "Return ``True`` if ``self`` is a directory." -msgstr "" +msgstr "Retorna ``True`` si ``self`` es un directorio." #: ../Doc/library/importlib.rst:752 msgid "Return ``True`` if ``self`` is a file." -msgstr "" +msgstr "Retorna ``True`` si ``self`` es un archivo." #: ../Doc/library/importlib.rst:756 msgid "Return Traversable child in ``self``." -msgstr "" +msgstr "Retorna un Traversable secundario en ``self``." #: ../Doc/library/importlib.rst:760 msgid "Return ``Traversable`` child in ``self``." -msgstr "" +msgstr "Retorna un ``Traversable`` secundario en ``self``." #: ../Doc/library/importlib.rst:764 msgid "" "*mode* may be 'r' or 'rb' to open as text or binary. Return a handle " "suitable for reading (same as :attr:`pathlib.Path.open`)." msgstr "" +"*mode* puede ser 'r' o 'rb' para abrir como texto o binario. Retorna un " +"identificador adecuado para su lectura (igual que :attr:`pathlib.Path.open`)." #: ../Doc/library/importlib.rst:767 msgid "" "When opening as text, accepts encoding parameters such as those accepted by :" "attr:`io.TextIOWrapper`." msgstr "" +"Al abrir como texto, acepta parámetros de codificación como los aceptados " +"por :attr:`io.TextIOWrapper`." #: ../Doc/library/importlib.rst:772 msgid "Read contents of ``self`` as bytes." -msgstr "" +msgstr "Lee el contenido de ``self`` como bytes." #: ../Doc/library/importlib.rst:776 msgid "Read contents of ``self`` as text." -msgstr "" +msgstr "Lee el contenido de ``self`` como texto." #: ../Doc/library/importlib.rst:781 msgid "" @@ -1311,18 +1368,28 @@ msgid "" "Therefore, any loader supplying :class:`importlib.abc.TraversableResources` " "also supplies ResourceReader." msgstr "" +"Una clase base abstracta para lectores de recursos capaces de servir a la " +"interfaz :meth:`importlib.resources.files`. Subclases :class:`importlib." +"resources.abc.ResourceReader` y proporciona implementaciones concretas de " +"los métodos abstractos de :class:`importlib.resources.abc.ResourceReader`. " +"Por lo tanto, cualquier cargador que proporcione :class:`importlib.abc." +"TraversableResources` también proporciona ResourceReader." #: ../Doc/library/importlib.rst:788 msgid "" "Loaders that wish to support resource reading are expected to implement this " "interface." msgstr "" +"Se espera que los cargadores que deseen admitir la lectura de recursos " +"implementen esta interfaz." #: ../Doc/library/importlib.rst:798 msgid "" "Returns a :class:`importlib.resources.abc.Traversable` object for the loaded " "package." msgstr "" +"Retorna un objeto :class:`importlib.resources.abc.Traversable` para el " +"paquete cargado." #: ../Doc/library/importlib.rst:804 msgid ":mod:`importlib.machinery` -- Importers and path hooks" @@ -1598,16 +1665,15 @@ msgid "Clear out the internal cache." msgstr "Borrar el caché interno." #: ../Doc/library/importlib.rst:1000 -#, fuzzy msgid "" "A class method which returns a closure for use on :data:`sys.path_hooks`. An " "instance of :class:`FileFinder` is returned by the closure using the path " "argument given to the closure directly and *loader_details* indirectly." msgstr "" -"Un método de clase que devuelve un cierre para su uso en :attr:`sys." -"path_hooks`. Una instancia de :class:`FileFinder` es retornada por el cierre " -"usando el argumento de ruta dado al cierre directamente y *loader_details* " -"indirectamente." +"Un método de clase que retorna un cierre para su uso en :data:`sys." +"path_hooks`. El cierre retorna una instancia de :class:`FileFinder` " +"utilizando el argumento de ruta proporcionado al cierre directamente y " +"*loader_details* indirectamente." #: ../Doc/library/importlib.rst:1005 msgid "" @@ -1637,7 +1703,7 @@ msgstr "La ruta al archivo de origen." #: ../Doc/library/importlib.rst:1027 msgid "Return ``True`` if :attr:`path` appears to be for a package." -msgstr "Devuelve ``True`` si :attr:`path` parece ser para un paquete." +msgstr "Retorna ``True`` si :attr:`path` parece ser para un paquete." #: ../Doc/library/importlib.rst:1031 msgid "" @@ -1704,7 +1770,7 @@ msgstr "" msgid "" "Returns ``None`` as bytecode files have no source when this loader is used." msgstr "" -"Devuelve ``None`` ya que los archivos de código de bytes no tienen fuente " +"Retorna ``None`` ya que los archivos de código de bytes no tienen fuente " "cuando se usa este cargador." #: ../Doc/library/importlib.rst:1092 @@ -1729,10 +1795,15 @@ msgid "" "subinterpreters if it doesn't implement multi-phase init (see :pep:`489`), " "even if it would otherwise import successfully." msgstr "" +"Tenga en cuenta que, de manera predeterminada, la importación de un módulo " +"de extensión fallará en los subintérpretes si no implementa la " +"inicialización multifase (ver :pep:`489`), incluso si de lo contrario se " +"importaría correctamente." #: ../Doc/library/importlib.rst:1104 msgid "Multi-phase init is now required for use in subinterpreters." msgstr "" +"Ahora se requiere inicialización multifase para el uso en subintérpretes." #: ../Doc/library/importlib.rst:1109 ../Doc/library/importlib.rst:1293 msgid "Name of the module the loader supports." @@ -1794,9 +1865,15 @@ msgid "" ">>> isinstance(my_namespace.__loader__, importlib.abc.Loader)\n" "True" msgstr "" +">>> from importlib.machinery import NamespaceLoader\n" +">>> import my_namespace\n" +">>> isinstance(my_namespace.__loader__, NamespaceLoader)\n" +"True\n" +">>> import importlib.abc\n" +">>> isinstance(my_namespace.__loader__, importlib.abc.Loader)\n" +"True" #: ../Doc/library/importlib.rst:1168 -#, fuzzy msgid "" "A specification for a module's import-system-related state. This is " "typically exposed as the module's :attr:`__spec__` attribute. Many of these " @@ -1809,37 +1886,35 @@ msgid "" "versa." msgstr "" "Una especificación para el estado relacionado con el sistema de importación " -"de un módulo. Esto generalmente se expone como el atributo :attr:`__spec__`` " -"del módulo. En las descripciones siguientes, los nombres entre paréntesis " -"dan el atributo correspondiente disponible directamente en el objeto del " -"módulo, por ejemplo, ``module.__spec__.origin == module.__file__``. Sin " -"embargo, tenga en cuenta que, si bien los *valores* suelen ser equivalentes, " -"pueden diferir ya que no hay sincronización entre los dos objetos. Por " -"ejemplo, es posible actualizar el :attr:`__path__` del módulo en tiempo de " -"ejecución, y esto no se reflejará automáticamente en el :attr:`__spec__." -"origin` del módulo, y viceversa." +"de un módulo. Esto se expone típicamente como el atributo :attr:`__spec__` " +"del módulo. Muchos de estos atributos también están disponibles directamente " +"en un módulo: por ejemplo, ``module.__spec__.origin == module.__file__``. " +"Sin embargo, tenga en cuenta que si bien los *values* suelen ser " +"equivalentes, pueden diferir ya que no hay sincronización entre los dos " +"objetos. Por ejemplo, es posible actualizar el :attr:`__file__` del módulo " +"en tiempo de ejecución y esto no se reflejará automáticamente en el :attr:" +"`__spec__.origin` del módulo, y viceversa." #: ../Doc/library/importlib.rst:1181 -#, fuzzy msgid "" "The module's fully qualified name (see :attr:`__name__` attributes on " "modules). The :term:`finder` should always set this attribute to a non-empty " "string." msgstr "" -"El nombre completo del módulo. El :term:`buscador ` debe siempre " -"establecer este atributo a una cadena de caracteres no vacía." +"El nombre completo del módulo (consulte los atributos :attr:`__name__` en " +"los módulos). El :term:`finder` siempre debe establecer este atributo en una " +"cadena de caracteres que no esté vacía." #: ../Doc/library/importlib.rst:1187 -#, fuzzy msgid "" "The :term:`loader` used to load the module (see :attr:`__loader__` " "attributes on modules). The :term:`finder` should always set this attribute." msgstr "" -"El :term:`Cargador ` que debe usarse para cargar el módulo. El :term:" -"`Buscador ` siempre debe establecer este atributo." +"El :term:`loader` utilizado para cargar el módulo (ver atributos :attr:" +"`__loader__` en módulos). El :term:`finder` siempre debe establecer este " +"atributo." #: ../Doc/library/importlib.rst:1193 -#, fuzzy msgid "" "The location the :term:`loader` should use to load the module (see :attr:" "`__file__` attributes on modules). For example, for modules loaded from a ." @@ -1848,15 +1923,15 @@ msgid "" "uncommon case that there is not one (like for namespace packages), it should " "be set to ``None``." msgstr "" -"La ubicación que el :term:`cargador ` debe usar para cargar el " -"módulo. Por ejemplo, para módulos cargados de archivos .py éste es el nombre " -"del archivo. El :term:`buscador ` debe siempre establecer este " -"atributo a un valor significativo para que el :term:`cargador ` lo " -"use. El en caso poco común de que no hay uno (como para paquetes de nombre " -"de espacio), debe estar establecido en ``None``." +"La ubicación que el :term:`loader` debe usar para cargar el módulo (vea los " +"atributos :attr:`__file__` en los módulos). Por ejemplo, para los módulos " +"cargados desde un archivo .py, este es el nombre del archivo. El :term:" +"`finder` siempre debe establecer este atributo en un valor significativo " +"para que lo use el :term:`loader`. En el caso poco común de que no haya uno " +"(como para los paquetes de espacios de nombres), se debe establecer en " +"``None``." #: ../Doc/library/importlib.rst:1202 -#, fuzzy msgid "" "The list of locations where the package's submodules will be found (see :" "attr:`__path__` attributes on modules). Most of the time this is a single " @@ -1865,12 +1940,13 @@ msgid "" "It should be set to ``None`` for non-package modules. It is set " "automatically later to a special object for namespace packages." msgstr "" -"La lista de ubicaciones donde los sub-módulos del paquete serán encontrados. " -"La mayoría de las veces es un solo directorio. El :term:`buscador ` " -"debe establecer este atributo a una lista, incluso una vacía, para indicar " -"al sistema de importación que el módulo es un paquete. Debe ser establecido " -"en ``None`` para módulos que no son paquetes. Es establecido automáticamente " -"más tarde a un objeto especial para paquetes de espacio de nombres." +"La lista de ubicaciones donde se encontrarán los submódulos del paquete " +"(consulte los atributos :attr:`__path__` en los módulos). La mayoría de las " +"veces, se trata de un solo directorio. El :term:`finder` debe establecer " +"este atributo en una lista, incluso una vacía, para indicar al sistema de " +"importación que el módulo es un paquete. Debe establecerse en ``None`` para " +"módulos que no sean paquetes. Se establece automáticamente más tarde en un " +"objeto especial para paquetes de espacio de nombres." #: ../Doc/library/importlib.rst:1212 msgid "" @@ -1883,46 +1959,46 @@ msgstr "" "carga el módulo.. De lo contrario, debe establecerse en ``None``." #: ../Doc/library/importlib.rst:1218 -#, fuzzy msgid "" "The filename of a compiled version of the module's code (see :attr:" "`__cached__` attributes on modules). The :term:`finder` should always set " "this attribute but it may be ``None`` for modules that do not need compiled " "code stored." msgstr "" -"El nombre de archivo de una versión compilada del código de el módulo. El :" -"term:`buscador ` siempre debe establecer este atributo pero puede " -"ser ``None`` para módulos que no necesitan guardar código compilado." +"El nombre de archivo de una versión compilada del código del módulo " +"(consulte los atributos :attr:`__cached__` en los módulos). El :term:" +"`finder` siempre debe establecer este atributo, pero puede ser ``None`` para " +"los módulos que no necesitan almacenar el código compilado." #: ../Doc/library/importlib.rst:1225 -#, fuzzy msgid "" "(Read-only) The fully qualified name of the package the module is in (or the " "empty string for a top-level module). See :attr:`__package__` attributes on " "modules. If the module is a package then this is the same as :attr:`name`." msgstr "" -"(Solo lectura) El nombre completo del paquete bajo el cual está este módulo " -"(o la cadena de caracteres vacía para los módulos de nivel superior). Si el " -"módulo es un paquete es lo mismo que :attr:`__name__`." +"(Solo lectura) El nombre completo del paquete en el que se encuentra el " +"módulo (o la cadena de caracteres vacía para un módulo de nivel superior). " +"Consulte los atributos :attr:`__package__` en los módulos. Si el módulo es " +"un paquete, esto es lo mismo que :attr:`name`." #: ../Doc/library/importlib.rst:1232 -#, fuzzy msgid "" "``True`` if the spec's :attr:`origin` refers to a loadable location, " "``False`` otherwise. This value impacts how :attr:`origin` is interpreted " "and how the module's :attr:`__file__` is populated." msgstr "" -"``False`` en caso contrario. Este valor impacta en cómo :attr:`origin` es " -"interpretado y cómo el atributo :attr:`__file__` del módulo es poblado." +"``True`` si el :attr:`origin` de la especificación hace referencia a una " +"ubicación cargable, ``Falso`` en caso contrario. Este valor afecta la forma " +"en que se interpreta el :attr:`origin` y cómo se completa el :attr:" +"`__file__` del módulo." #: ../Doc/library/importlib.rst:1239 -#, fuzzy msgid "" "A specialization of :class:`importlib.machinery.ExtensionFileLoader` that is " "able to load extension modules in Framework format." msgstr "" -"Una implementación concreta de :class:`importlib.abc.ExecutionLoader` para " -"módulos de extensión." +"Una especialización de :class:`importlib.machinery.ExtensionFileLoader` que " +"puede cargar módulos de extensión en formato Framework." #: ../Doc/library/importlib.rst:1242 msgid "" @@ -1932,6 +2008,12 @@ msgid "" "be only a single binary per framework, and there can be no executable binary " "material outside the Frameworks folder." msgstr "" +"Para que sea compatible con la App Store de iOS, *todos* los módulos " +"binarios de una aplicación de iOS deben ser bibliotecas dinámicas, " +"contenidas en un marco con metadatos apropiados, almacenados en la carpeta " +"``Frameworks`` de la aplicación empaquetada. Solo puede haber un único " +"binario por marco y no puede haber material binario ejecutable fuera de la " +"carpeta Frameworks." #: ../Doc/library/importlib.rst:1248 msgid "" @@ -1946,6 +2028,18 @@ msgid "" "expected to contain a ``.origin`` file that contains the location of the ``." "fwork`` file, relative to the app bundle." msgstr "" +"Para cumplir con este requisito, cuando se ejecuta en iOS, los binarios del " +"módulo de extensión *no* se empaquetan como archivos ``.so`` en ``sys." +"path``, sino como marcos independientes individuales. Para descubrir esos " +"marcos, este cargador se debe registrar con la extensión de archivo ``." +"fwork``, con un archivo ``.fwork`` que actúa como marcador de posición en la " +"ubicación original del binario en ``sys.path``. El archivo ``.fwork`` " +"contiene la ruta del binario real en la carpeta ``Frameworks``, en relación " +"con el paquete de la aplicación. Para permitir la resolución de un binario " +"empaquetado en el marco de trabajo en la ubicación original, se espera que " +"el marco de trabajo contenga un archivo ``.origin`` que contenga la " +"ubicación del archivo ``.fwork``, en relación con el paquete de la " +"aplicación." #: ../Doc/library/importlib.rst:1259 msgid "" @@ -1962,6 +2056,18 @@ msgid "" "framework would also contain ``Frameworks/foo.bar._whiz.framework/foo.bar." "_whiz.origin``, containing the path to the ``.fwork`` file." msgstr "" +"Por ejemplo, considere el caso de una importación ``from foo.bar import " +"_whiz``, donde ``_whiz`` se implementa con el módulo binario ``sources/foo/" +"bar/_whiz.abi3.so``, donde ``sources`` es la ubicación registrada en ``sys." +"path``, relativa al paquete de la aplicación. Este módulo *debe* " +"distribuirse como ``Frameworks/foo.bar._whiz.framework/foo.bar._whiz`` " +"(creando el nombre del marco a partir de la ruta de importación completa del " +"módulo), con un archivo ``Info.plist`` en el directorio ``.framework`` que " +"identifica el binario como un marco. El módulo ``foo.bar._whiz`` se " +"representaría en la ubicación original con un archivo marcador ``sources/foo/" +"bar/_whiz.abi3.fwork``, que contiene la ruta ``Frameworks/foo.bar._whiz/foo." +"bar._whiz``. El framework también contendría ``Frameworks/foo.bar._whiz." +"framework/foo.bar._whiz.origin``, que contiene la ruta al archivo ``.fwork``." #: ../Doc/library/importlib.rst:1273 msgid "" @@ -1971,6 +2077,11 @@ msgid "" "However, the spec origin will reference the location of the *actual* binary " "in the ``.framework`` folder." msgstr "" +"Cuando se carga un módulo con este cargador, el ``__file__`` del módulo se " +"indicará como la ubicación del archivo ``.fwork``. Esto permite que el " +"código utilice el ``__file__`` de un módulo como ancla para recorrer el " +"sistema de archivos. Sin embargo, el origen de la especificación hará " +"referencia a la ubicación del binario *real* en la carpeta ``.framework``." #: ../Doc/library/importlib.rst:1279 msgid "" @@ -1982,15 +2093,21 @@ msgid "" "with a build step in the Xcode project; see the iOS documentation for " "details on how to construct this build step." msgstr "" +"El proyecto Xcode que crea la aplicación es responsable de convertir los " +"archivos ``.so`` desde donde se encuentren en ``PYTHONPATH`` en marcos en la " +"carpeta ``Frameworks`` (lo que incluye quitar las extensiones del archivo " +"del módulo, agregar metadatos del marco y firmar el marco resultante), y " +"crear los archivos ``.fwork`` y ``.origin``. Esto generalmente se hará con " +"un paso de compilación en el proyecto Xcode; consulte la documentación de " +"iOS para obtener detalles sobre cómo construir este paso de compilación." #: ../Doc/library/importlib.rst:1289 msgid ":ref:`Availability `: iOS." -msgstr "" +msgstr ":ref:`Availability `: iOS." #: ../Doc/library/importlib.rst:1297 -#, fuzzy msgid "Path to the ``.fwork`` file for the extension module." -msgstr "Ruta al archivo del módulo." +msgstr "Ruta al archivo ``.fwork`` para el módulo de extensión." #: ../Doc/library/importlib.rst:1301 msgid ":mod:`importlib.util` -- Utility code for importers" @@ -2150,7 +2267,6 @@ msgstr "" "relativa no válidos." #: ../Doc/library/importlib.rst:1403 -#, fuzzy msgid "" "Find the :term:`spec ` for a module, optionally relative to the " "specified **package** name. If the module is in :data:`sys.modules`, then " @@ -2159,13 +2275,13 @@ msgid "" "Otherwise a search using :data:`sys.meta_path` is done. ``None`` is returned " "if no spec is found." msgstr "" -"Busca el :term:`spec ` para un módulo, opcionalmente relativo " -"al nombre del **package** especificado. Si el módulo está en :attr:`sys." +"Busque el :term:`spec ` de un módulo, opcionalmente relativa al " +"nombre del **paquete** especificado. Si el módulo está en :data:`sys." "modules`, se retorna ``sys.modules[name].__spec__`` (a menos que la " -"especificación sea ``None`` o no esté establecida, en cuyo caso se lanza :" -"exc:`ValueError`). De lo contrario, se realiza una búsqueda utilizando :attr:" -"`sys.meta_path`. Se retorna ``None`` si no se encuentra ninguna " -"especificación." +"especificación sea ``None`` o no esté configurada, en cuyo caso se lanza una " +"excepción :exc:`ValueError`). De lo contrario, se realiza una búsqueda " +"utilizando :data:`sys.meta_path`. Se retorna ``None`` si no se encuentra " +"ninguna especificación." #: ../Doc/library/importlib.rst:1410 msgid "" @@ -2263,6 +2379,12 @@ msgid "" "for a multi-phase init module that doesn't explicitly support a per-" "interpreter GIL, when imported in an interpreter with its own GIL." msgstr "" +"Un administrador de contexto que puede omitir temporalmente la comprobación " +"de compatibilidad para módulos de extensión. De manera predeterminada, la " +"comprobación está habilitada y fallará cuando se importe un módulo de " +"inicialización de una sola fase en un subintérprete. También fallará para un " +"módulo de inicialización de varias fases que no admita explícitamente una " +"GIL por intérprete, cuando se importe en un intérprete con su propia GIL." #: ../Doc/library/importlib.rst:1477 msgid "" @@ -2270,6 +2392,9 @@ msgid "" "is likely to eventually go away. There's is a pretty good chance this is " "not what you were looking for." msgstr "" +"Tenga en cuenta que esta función está pensada para dar cabida a un caso " +"inusual, que probablemente desaparecerá en algún momento. Es muy probable " +"que esto no sea lo que estaba buscando." #: ../Doc/library/importlib.rst:1481 msgid "" @@ -2277,12 +2402,18 @@ msgid "" "interface of multi-phase init (:pep:`489`) and lying about support for " "multiple interpreters (or per-interpreter GIL)." msgstr "" +"Puede obtener el mismo efecto que esta función implementando la interfaz " +"básica de init multifase (:pep:`489`) y mintiendo acerca del soporte para " +"múltiples intérpretes (o por intérprete GIL)." #: ../Doc/library/importlib.rst:1486 msgid "" "Using this function to disable the check can lead to unexpected behavior and " "even crashes. It should only be used during extension module development." msgstr "" +"El uso de esta función para desactivar la comprobación puede provocar un " +"comportamiento inesperado e incluso fallos. Solo debe utilizarse durante el " +"desarrollo de módulos de extensión." #: ../Doc/library/importlib.rst:1494 msgid "" @@ -2293,7 +2424,6 @@ msgstr "" "módulo tiene acceso a un atributo." #: ../Doc/library/importlib.rst:1497 -#, fuzzy msgid "" "This class **only** works with loaders that define :meth:`~importlib.abc." "Loader.exec_module` as control over what module type is used for the module " @@ -2306,14 +2436,14 @@ msgid "" "raised if such a substitution is detected." msgstr "" "Esta clase **solo** funciona con cargadores que definen :meth:`~importlib." -"abc.Loader.exec_module` ya que se requiere control sobre qué tipo de módulo " -"se usa para el módulo. Por esas mismas razones, el método del cargador :meth:" -"`~importlib.abc.Loader.create_module` debe retornar ``None`` o un tipo para " -"el cual su atributo ``__class__`` se puede mutar junto con no usar :term:" +"abc.Loader.exec_module`, ya que se requiere control sobre qué tipo de módulo " +"se usa para el módulo. Por esas mismas razones, el método :meth:`~importlib." +"abc.Loader.create_module` del cargador debe retornar ``None`` o un tipo para " +"el cual se pueda mutar su atributo ``__class__`` junto con no usar :term:" "`slots <__slots__>`. Finalmente, los módulos que sustituyen el objeto " -"colocado en :attr:`sys.modules` no funcionarán ya que no hay forma de " +"colocado en :data:`sys.modules` no funcionarán ya que no hay forma de " "reemplazar correctamente las referencias del módulo en todo el intérprete de " -"forma segura; :exc:`ValueError` se genera si se detecta tal sustitución." +"manera segura; :exc:`ValueError` se lanza si se detecta dicha sustitución." #: ../Doc/library/importlib.rst:1508 msgid "" @@ -2341,14 +2471,13 @@ msgstr "" "BuiltinImporter` y :class:`importlib.machinery.ExtensionFileLoader`." #: ../Doc/library/importlib.rst:1523 -#, fuzzy msgid "" "A class method which returns a callable that creates a lazy loader. This is " "meant to be used in situations where the loader is passed by class instead " "of by instance. ::" msgstr "" -"Un método estático que devuelve un invocable que crea un cargador diferido. " -"Esto está destinado a utilizarse en situaciones en las que el cargador se " +"Un método de clase que retorna un elemento invocable que crea un cargador " +"diferido. Está pensado para usarse en situaciones en las que el cargador se " "pasa por clase en lugar de por instancia. ::" #: ../Doc/library/importlib.rst:1528 @@ -2358,6 +2487,10 @@ msgid "" "lazy_loader = importlib.util.LazyLoader.factory(loader)\n" "finder = importlib.machinery.FileFinder(path, (lazy_loader, suffixes))" msgstr "" +"suffixes = importlib.machinery.SOURCE_SUFFIXES\n" +"loader = importlib.machinery.SourceFileLoader\n" +"lazy_loader = importlib.util.LazyLoader.factory(loader)\n" +"finder = importlib.machinery.FileFinder(path, (lazy_loader, suffixes))" #: ../Doc/library/importlib.rst:1536 msgid "Examples" @@ -2380,6 +2513,9 @@ msgid "" "\n" "itertools = importlib.import_module('itertools')" msgstr "" +"import importlib\n" +"\n" +"itertools = importlib.import_module('itertools')" #: ../Doc/library/importlib.rst:1550 msgid "Checking if a module can be imported" @@ -2420,6 +2556,22 @@ msgid "" "else:\n" " print(f\"can't find the {name!r} module\")" msgstr "" +"import importlib.util\n" +"import sys\n" +"\n" +"# Con fines ilustrativos.\n" +"name = 'itertools'\n" +"\n" +"if name in sys.modules:\n" +" print(f\"{name!r} already in sys.modules\")\n" +"elif (spec := importlib.util.find_spec(name)) is not None:\n" +"# Si eligió realizar la importación real ...\n" +"module = importlib.util.module_from_spec(spec)\n" +"sys.modules[name] = module\n" +"spec.loader.exec_module(module)\n" +"print(f\"{name!r} ha sido importado\")\n" +"else:\n" +" print(f\"no puede ser encontrado el módulo {name!r}\")" #: ../Doc/library/importlib.rst:1578 msgid "Importing a source file directly" @@ -2434,15 +2586,20 @@ msgid "" "`runpy.run_path` when the global namespace resulting from running a Python " "file is appropriate." msgstr "" +"Esta receta debe usarse con precaución: es una aproximación de una " +"declaración de importación donde se especifica directamente la ruta del " +"archivo, en lugar de buscar :data:`sys.path`. Primero se deben considerar " +"alternativas, como modificar :data:`sys.path` cuando se requiere un módulo " +"adecuado o usar :func:`runpy.run_path` cuando el espacio de nombres global " +"resultante de la ejecución de un archivo Python es apropiado." #: ../Doc/library/importlib.rst:1587 -#, fuzzy msgid "" "To import a Python source file directly from a path, use the following " "recipe::" msgstr "" -"Para importar un archivo fuente de Python directamente, use la siguiente " -"receta::" +"Para importar un archivo fuente de Python directamente desde una ruta, use " +"la siguiente receta:" #: ../Doc/library/importlib.rst:1589 msgid "" @@ -2466,6 +2623,25 @@ msgid "" "# Similar outcome as `import json`.\n" "json = import_from_path(module_name, file_path)" msgstr "" +"import importlib.util\n" +"import sys\n" +"\n" +"\n" +"def import_from_path(module_name, file_path):\n" +" spec = importlib.util.spec_from_file_location(module_name, file_path)\n" +" module = importlib.util.module_from_spec(spec)\n" +" sys.modules[module_name] = module\n" +" spec.loader.exec_module(module)\n" +" return module\n" +"\n" +"\n" +"# Sólo con fines ilustrativos. (el uso de `json` es arbitrario).\n" +"import json\n" +"file_path = json.__file__\n" +"module_name = json.__name__\n" +"\n" +"# Resultado similar a `import json`.\n" +"json = import_from_path(module_name, file_path)" #: ../Doc/library/importlib.rst:1611 msgid "Implementing lazy imports" @@ -2494,13 +2670,28 @@ msgid "" ">>> lazy_typing.TYPE_CHECKING\n" "False" msgstr "" +">>> import importlib.util\n" +">>> import sys\n" +">>> def lazy_import(name):\n" +"... spec = importlib.util.find_spec(name)\n" +"... loader = importlib.util.LazyLoader(spec.loader)\n" +"... spec.loader = loader\n" +"... module = importlib.util.module_from_spec(spec)\n" +"... sys.modules[name] = module\n" +"... loader.exec_module(module)\n" +"... return module\n" +"...\n" +">>> lazy_typing = lazy_import(\"typing\")\n" +">>> #lazy_typing es un objeto de módulo real,\n" +">>> #pero aún no está cargado en la memoria.\n" +">>> lazy_typing.TYPE_CHECKING\n" +"False" #: ../Doc/library/importlib.rst:1634 msgid "Setting up an importer" msgstr "Configurar un importador" #: ../Doc/library/importlib.rst:1636 -#, fuzzy msgid "" "For deep customizations of import, you typically want to implement an :term:" "`importer`. This means managing both the :term:`finder` and :term:`loader` " @@ -2513,17 +2704,17 @@ msgid "" "will use them (for creating an importer for yourself, read the documentation " "for the appropriate classes defined within this package)::" msgstr "" -"Para personalizaciones profundas de la importación, normalmente desea " -"implementar un :term:`importador`. Esto significa administrar tanto el lado :" -"term:`finder` como :term:`loader` de las cosas. Para los buscadores, hay dos " -"sabores para elegir según sus necesidades: un :term:`meta path finder` o un :" -"term:`path entry finder`. El primero es lo que pondrías en :attr:`sys." -"meta_path` mientras que el segundo es lo que creas usando un :term:`path " -"entry hook` en :attr:`sys.path_hooks` que funciona con :attr:`sys .path` " -"entradas para crear potencialmente un buscador. Este ejemplo le mostrará " -"cómo registrar sus propios importadores para que import los utilice (para " -"crear un importador para usted, lea la documentación de las clases " -"apropiadas definidas dentro de este paquete):" +"Para personalizaciones profundas de importación, normalmente querrá " +"implementar un :term:`importador`. Esto significa gestionar tanto el :term:" +"`buscador` como el :term:`cargador`. Para los buscadores hay dos opciones " +"para elegir según sus necesidades: un :term:`meta path finder` o un :term:" +"`path entry finder`. El primero es lo que pondría en :data:`sys.meta_path` " +"mientras que el segundo es lo que crea utilizando un :term:`path entry hook` " +"en :data:`sys.path_hooks` que funciona con entradas :data:`sys.path` para " +"crear potencialmente un buscador. Este ejemplo le mostrará cómo registrar " +"sus propios importadores para que la importación los utilice (para crear un " +"importador para usted, lea la documentación de las clases apropiadas " +"definidas dentro de este paquete)::" #: ../Doc/library/importlib.rst:1647 msgid "" @@ -2548,6 +2739,26 @@ msgid "" "# of priority.\n" "sys.path_hooks.append(SpamPathEntryFinder.path_hook(loader_details))" msgstr "" +"import importlib.machinery\n" +"import sys\n" +"\n" +"# Sólo con fines ilustrativos.\n" +"SpamMetaPathFinder = importlib.machinery.PathFinder\n" +"SpamPathEntryFinder = importlib.machinery.FileFinder\n" +"detalles_del_cargador = (importlib.machinery.SourceFileLoader,\n" +" importlib.machinery.SOURCE_SUFFIXES)\n" +"\n" +"# Configuración de un meta buscador de rutas.\n" +"# Asegúrese de colocar el buscador en la ubicación adecuada en la lista en términos " +"de\n" +"# prioridad.\n" +"sys.meta_path.append(SpamMetaPathFinder)\n" +"\n" +"# Configuración de un buscador de entradas de ruta.\n" +"# Asegúrese de colocar el gancho de ruta en la ubicación adecuada en la lista en " +"términos\n" +"# de prioridad.\n" +"sys.path_hooks.append(SpamPathEntryFinder.path_hook(detalles_del_cargador))" #: ../Doc/library/importlib.rst:1668 msgid "Approximating :func:`importlib.import_module`" @@ -2598,11 +2809,40 @@ msgid "" " setattr(parent_module, child_name, module)\n" " return module" msgstr "" +"import importlib.util\n" +"import sys\n" +"\n" +"def import_module(name, package=None):\n" +" \"\"\"An approximate implementation of import.\"\"\"\n" +" absolute_name = importlib.util.resolve_name(name, package)\n" +" try:\n" +" return sys.modules[absolute_name]\n" +" except KeyError:\n" +" pass\n" +"\n" +" path = None\n" +" if '.' in absolute_name:\n" +" parent_name, _, child_name = absolute_name.rpartition('.')\n" +" parent_module = import_module(parent_name)\n" +" path = parent_module.__spec__.submodule_search_locations\n" +" for finder in sys.meta_path:\n" +" spec = finder.find_spec(absolute_name, path)\n" +" if spec is not None:\n" +" break\n" +" else:\n" +" msg = f'No module named {absolute_name!r}'\n" +" raise ModuleNotFoundError(msg, name=absolute_name)\n" +" module = importlib.util.module_from_spec(spec)\n" +" sys.modules[absolute_name] = module\n" +" spec.loader.exec_module(module)\n" +" if path is not None:\n" +" setattr(parent_module, child_name, module)\n" +" return module" #: ../Doc/library/importlib.rst:443 msgid "universal newlines" -msgstr "" +msgstr "nuevas líneas universales" #: ../Doc/library/importlib.rst:443 msgid "importlib.abc.InspectLoader.get_source method" -msgstr "" +msgstr "importlib.abc.InspectLoader.get_source method" From 42bbcc62996c4757abbecebb6eed480e1ce7d9a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 12:56:37 +0200 Subject: [PATCH 29/40] Translate library/typing (#3325) Closes #2994 --- dictionaries/library_typing.txt | 85 +- library/typing.po | 2449 +++++++++++++++++++++++-------- 2 files changed, 1920 insertions(+), 614 deletions(-) diff --git a/dictionaries/library_typing.txt b/dictionaries/library_typing.txt index 3ce8cbcca5..8a9980ad1f 100644 --- a/dictionaries/library_typing.txt +++ b/dictionaries/library_typing.txt @@ -1,8 +1,85 @@ +Absolute +Ann +Annotated +Bucket +Combiner +Concatenate +Employee +Generic +Matrix +Movie +Never +Okay +Proto +Revealed +Sip +Starship +Tambien +Ts +Unrelated +Variadic +Vec +Yup +abs +allowed +another +asignacin +backports +bad +bound +broadcast +capitalized +cb +comprobadores +concat +concatenate +cualificador +damage +despues +employees +enterprise +exhaustividad +greet +greetings +hi +inner interdependientes +kind +manner +maxitems +maxlen +movie +mutate +my +never +numbers +overrides +predicate +prints +proper +provides +raises +reasignaciones +results +retroadaptación +retroportaciones +reveal +revealed +scalar +second +servers +status +team +there tipificación +together +tup +two +typeddict +typo +usuarie variádico variádicos -cualificador -usuarie -exhaustividad -backports +veficiación +way +year diff --git a/library/typing.po b/library/typing.po index 37e33faa92..3a3a7c0590 100644 --- a/library/typing.po +++ b/library/typing.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: 2024-11-21 11:04-0500\n" -"Last-Translator: Alfonso Areiza Guerra \n" -"Language: es\n" +"PO-Revision-Date: 2025-10-14 12:43+0200\n" +"Last-Translator: Cristián Maureira-Fredes \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/library/typing.rst:3 msgid ":mod:`typing` --- Support for type hints" @@ -30,38 +31,44 @@ msgid "**Source code:** :source:`Lib/typing.py`" msgstr "**Source code:** :source:`Lib/typing.py`" #: ../Doc/library/typing.rst:20 -#, fuzzy msgid "" "The Python runtime does not enforce function and variable type annotations. " "They can be used by third party tools such as :term:`type checkers `, IDEs, linters, etc." msgstr "" -"En tiempo de ejecución, Python no impone las anotaciones de tipado en " -"funciones y variables. Pueden ser utilizadas por herramientas de terceros " -"como validadores de tipado, IDEs, linters, etc." +"El entorno de ejecución de Python no exige anotaciones de tipos de funciones " +"y variables. Pueden ser utilizadas por herramientas de terceros " +"como :term:`type checkers `, IDE, linters, etc." #: ../Doc/library/typing.rst:26 -#, fuzzy msgid "This module provides runtime support for type hints." -msgstr ":mod:`typing` --- Soporte para *type hints*" +msgstr "" +"Este módulo proporciona soporte en tiempo de ejecución para sugerencias de " +"tipo." #: ../Doc/library/typing.rst:28 msgid "Consider the function below::" -msgstr "" +msgstr "Considere la función a continuación::" #: ../Doc/library/typing.rst:30 msgid "" "def surface_area_of_cube(edge_length: float) -> str:\n" " return f\"The surface area of the cube is {6 * edge_length ** 2}.\"" msgstr "" +"def surface_area_of_cube(edge_length: float) -> str:\n" +" return f\"The surface area of the cube is {6 * edge_length ** 2}.\"" #: ../Doc/library/typing.rst:33 msgid "" "The function ``surface_area_of_cube`` takes an argument expected to be an " "instance of :class:`float`, as indicated by the :term:`type hint` " -"``edge_length: float``. The function is expected to return an instance of :" -"class:`str`, as indicated by the ``-> str`` hint." +"``edge_length: float``. The function is expected to return an instance " +"of :class:`str`, as indicated by the ``-> str`` hint." msgstr "" +"La función ``surface_area_of_cube`` toma un argumento que se espera que sea " +"una instancia de :class:`float`, como lo indica :term:`type hint` " +"``edge_length: float``. Se espera que la función devuelva una instancia " +"de :class:`str`, como lo indica la sugerencia ``-> str``." #: ../Doc/library/typing.rst:38 msgid "" @@ -69,18 +76,20 @@ msgid "" "they can also be more complex. The :mod:`typing` module provides a " "vocabulary of more advanced type hints." msgstr "" +"Si bien las sugerencias de tipos pueden ser clases simples " +"como :class:`float` o :class:`str`, también pueden ser más complejas. El " +"módulo :mod:`typing` proporciona un vocabulario de sugerencias de tipos más " +"avanzadas." #: ../Doc/library/typing.rst:42 -#, fuzzy msgid "" -"New features are frequently added to the ``typing`` module. The :pypi:" -"`typing_extensions` package provides backports of these new features to " -"older versions of Python." +"New features are frequently added to the ``typing`` module. " +"The :pypi:`typing_extensions` package provides backports of these new " +"features to older versions of Python." msgstr "" -"Frecuentemente se agregan nuevas funcionalidades al módulo ``typing``. El " -"paquete `typing_extensions `_ " -"provee backports de estas nuevas funcionalidades para versiones más antiguas " -"de Python." +"Con frecuencia se agregan nuevas funciones al módulo ``typing``. El " +"paquete :pypi:`typing_extensions` proporciona versiones anteriores de estas " +"nuevas funciones para versiones anteriores de Python." #: ../Doc/library/typing.rst:49 msgid "" @@ -98,11 +107,11 @@ msgstr "" #: ../Doc/library/typing.rst:54 msgid "" -"\"Type System Reference\" section of `the mypy docs `_" +"\"Type System Reference\" section of `the mypy docs `_" msgstr "" -"Sección “Referencia sobre sistema de tipo” de `the mypy docs `_" +"Sección “Referencia sobre sistema de tipo” de `the mypy docs `_" #: ../Doc/library/typing.rst:52 msgid "" @@ -131,14 +140,17 @@ msgstr "" #: ../Doc/library/typing.rst:64 msgid "Specification for the Python Type System" -msgstr "" +msgstr "Especificación del sistema de tipos de Python" #: ../Doc/library/typing.rst:66 msgid "" "The canonical, up-to-date specification of the Python type system can be " -"found at `\"Specification for the Python type system\" `_." +"found at `\"Specification for the Python type system\" `_." msgstr "" +"La especificación canónica y actualizada del sistema de tipos Python se " +"puede encontrar en `\"Specification for the Python type system\" `_." #: ../Doc/library/typing.rst:72 msgid "Type aliases" @@ -165,6 +177,13 @@ msgid "" "# passes type checking; a list of floats qualifies as a Vector.\n" "new_vector = scale(2.0, [1.0, -4.2, 5.4])" msgstr "" +"type Vector = list[float]\n" +"\n" +"def scale(scalar: float, vector: Vector) -> Vector:\n" +" return [scalar * num for num in vector]\n" +"\n" +"# pasa las verificaciones de tipo; una lista de float califica como Vector.\n" +"new_vector = scale(2.0, [1.0, -4.2, 5.4])" #: ../Doc/library/typing.rst:87 msgid "" @@ -193,6 +212,22 @@ msgid "" ") -> None:\n" " ..." msgstr "" +"from collections.abc import Sequence\n" +"\n" +"type ConnectionOptions = dict[str, str]\n" +"type Address = tuple[str, int]\n" +"type Server = tuple[Address, ConnectionOptions]\n" +"\n" +"def broadcast_message(message: str, servers: Sequence[Server]) -> None:\n" +" ...\n" +"\n" +"# El verificador de tipos estáticos tratará la firma de tipo anterior como\n" +"# exactamente equivalente a esta.\n" +"def broadcast_message(\n" +" message: str,\n" +" servers: Sequence[tuple[tuple[str, int], dict[str, str]]]\n" +") -> None:\n" +" ..." #: ../Doc/library/typing.rst:106 msgid "" @@ -205,7 +240,7 @@ msgstr "" #: ../Doc/library/typing.rst:109 msgid "Vector = list[float]" -msgstr "" +msgstr "Vector = list[float]" #: ../Doc/library/typing.rst:111 msgid "" @@ -221,6 +256,9 @@ msgid "" "\n" "Vector: TypeAlias = list[float]" msgstr "" +"from typing import TypeAlias\n" +"\n" +"Vector: TypeAlias = list[float]" #: ../Doc/library/typing.rst:121 msgid "NewType" @@ -237,6 +275,10 @@ msgid "" "UserId = NewType('UserId', int)\n" "some_id = UserId(524313)" msgstr "" +"from typing import NewType\n" +"\n" +"UserId = NewType('UserId', int)\n" +"some_id = UserId(524313)" #: ../Doc/library/typing.rst:130 msgid "" @@ -257,6 +299,14 @@ msgid "" "# fails type checking; an int is not a UserId\n" "user_b = get_user_name(-1)" msgstr "" +"def get_user_name(user_id: UserId) -> str:\n" +" ...\n" +"\n" +"# pasa la verificación de tipos\n" +"user_a = get_user_name(UserId(42351))\n" +"\n" +"# falla la verificación de tipos; un int no es un UserId\n" +"user_b = get_user_name(-1)" #: ../Doc/library/typing.rst:142 msgid "" @@ -275,6 +325,8 @@ msgid "" "# 'output' is of type 'int', not 'UserId'\n" "output = UserId(23413) + UserId(54341)" msgstr "" +"# 'output' es del tipo 'int', no 'UserId'\n" +"output = UserId(23413) + UserId(54341)" #: ../Doc/library/typing.rst:150 msgid "" @@ -312,6 +364,12 @@ msgid "" "# Fails at runtime and does not pass type checking\n" "class AdminUserId(UserId): pass" msgstr "" +"from typing import NewType\n" +"\n" +"UserId = NewType('UserId', int)\n" +"\n" +"# Falla en runtime y no pasa la verificación de tipos\n" +"class AdminUserId(UserId): pass" #: ../Doc/library/typing.rst:168 msgid "" @@ -329,6 +387,11 @@ msgid "" "\n" "ProUserId = NewType('ProUserId', UserId)" msgstr "" +"from typing import NewType\n" +"\n" +"UserId = NewType('UserId', int)\n" +"\n" +"ProUserId = NewType('ProUserId', UserId)" #: ../Doc/library/typing.rst:176 msgid "and typechecking for ``ProUserId`` will work as expected." @@ -391,17 +454,18 @@ msgid "Annotating callable objects" msgstr "Anotaciones en objetos invocables" #: ../Doc/library/typing.rst:210 -#, fuzzy msgid "" -"Functions -- or other :term:`callable` objects -- can be annotated using :" -"class:`collections.abc.Callable` or deprecated :data:`typing.Callable`. " -"``Callable[[int], str]`` signifies a function that takes a single parameter " -"of type :class:`int` and returns a :class:`str`." +"Functions -- or other :term:`callable` objects -- can be annotated " +"using :class:`collections.abc.Callable` or " +"deprecated :data:`typing.Callable`. ``Callable[[int], str]`` signifies a " +"function that takes a single parameter of type :class:`int` and returns " +"a :class:`str`." msgstr "" -"Las funciones -- u otro objeto invocable :term:`callable` se pueden anotar " -"utilizando :class:`collections.abc.Callable` o :data:`typing.Callable`. " -"``Callable[[int], str]`` se refiere a una función que toma un solo parámetro " -"de tipo :class:`int` y retorna un :class:`str`." +"Las funciones (u otros objetos :term:`callable`) se pueden anotar " +"utilizando :class:`collections.abc.Callable` o el " +"obsoleto :data:`typing.Callable`. ``Callable[[int], str]`` significa una " +"función que toma un único parámetro de tipo :class:`int` y devuelve " +"un :class:`str`." #: ../Doc/library/typing.rst:215 ../Doc/library/typing.rst:3128 #: ../Doc/library/typing.rst:3308 @@ -424,6 +488,19 @@ msgid "" "\n" "callback: Callable[[str], Awaitable[None]] = on_update" msgstr "" +"from collections.abc import Callable, Awaitable\n" +"\n" +"def feeder(get_next_item: Callable[[], str]) -> None:\n" +" ... # Body\n" +"\n" +"def async_query(on_success: Callable[[int], None],\n" +" on_error: Callable[[int, Exception], None]) -> None:\n" +" ... # Body\n" +"\n" +"async def on_update(value: str) -> None:\n" +" ... # Body\n" +"\n" +"callback: Callable[[str], Awaitable[None]] = on_update" #: ../Doc/library/typing.rst:233 msgid "" @@ -434,8 +511,9 @@ msgid "" msgstr "" "La sintaxis de suscripción siempre debe utilizarse con exactamente dos " "valores: una lista de argumentos y el tipo de retorno. La lista de " -"argumentos debe ser una lista de tipos, un :class:`ParamSpec`, :data:" -"`Concatenate` o una elipsis. El tipo de retorno debe ser un único tipo." +"argumentos debe ser una lista de tipos, " +"un :class:`ParamSpec`, :data:`Concatenate` o una elipsis. El tipo de retorno " +"debe ser un único tipo." #: ../Doc/library/typing.rst:238 msgid "" @@ -454,21 +532,26 @@ msgid "" "x = str # OK\n" "x = concat # Also OK" msgstr "" +"def concat(x: str, y: str) -> str:\n" +" return x + y\n" +"\n" +"x: Callable[..., str]\n" +"x = str # OK\n" +"x = concat # Also OK" #: ../Doc/library/typing.rst:250 -#, fuzzy msgid "" "``Callable`` cannot express complex signatures such as functions that take a " "variadic number of arguments, :ref:`overloaded functions `, or " "functions that have keyword-only parameters. However, these signatures can " -"be expressed by defining a :class:`Protocol` class with a :meth:`~object." -"__call__` method:" +"be expressed by defining a :class:`Protocol` class with " +"a :meth:`~object.__call__` method:" msgstr "" -"``Callable`` no puede representar firmas complejas como funciones que toman " -"un número variado de argumentos, :func:`funciones sobrecargadas ` " -"o funciones que reciben parámetros de solo palabras clave. Sin embargo, " -"estas firmas se pueden definir al definir una clase :class:`Protocol` con un " -"método :meth:`~object.__call__` method:" +"``Callable`` no puede expresar firmas complejas, como funciones que toman un " +"número variádico de argumentos, :ref:`overloaded functions ` o " +"funciones que tienen parámetros que solo contienen palabras clave. Sin " +"embargo, estas firmas se pueden expresar definiendo una " +"clase :class:`Protocol` con un método :meth:`~object.__call__`:" #: ../Doc/library/typing.rst:256 msgid "" @@ -493,6 +576,27 @@ msgid "" "of\n" " # different name and kind in the callback" msgstr "" +"from collections.abc import Iterable\n" +"from typing import Protocol\n" +"\n" +"class Combiner(Protocol):\n" +" def __call__(self, *vals: bytes, maxlen: int | None = None) -> " +"list[bytes]: ...\n" +"\n" +"def batch_proc(data: Iterable[bytes], cb_results: Combiner) -> bytes:\n" +" for item in data:\n" +" ...\n" +"\n" +"def good_cb(*vals: bytes, maxlen: int | None = None) -> list[bytes]:\n" +" ...\n" +"def bad_cb(*vals: bytes, maxitems: int | None) -> list[bytes]:\n" +" ...\n" +"\n" +"batch_proc([], good_cb) # OK\n" +"batch_proc([], bad_cb) # Error! El argumento 2 tiene un tipo incompatible " +"debido a\n" +" # nombre y tipo diferentes en la devolución de " +"llamada" #: ../Doc/library/typing.rst:277 msgid "" @@ -505,20 +609,20 @@ msgid "" "ReturnType]`` respectively." msgstr "" "Los invocables que toman otros invocables como argumentos pueden indicar que " -"sus tipos de parámetros dependen unos de otros utilizando :class:" -"`ParamSpec`. Además, si ese invocable agrega o elimina argumentos de otros " -"invocables, se puede utilizar el operador :data:`Concatenate`. Toman la " -"forma ``Callable[ParamSpecVariable, ReturnType]`` y " -"``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], " -"ReturnType]`` respectivamente." +"sus tipos de parámetros dependen unos de otros " +"utilizando :class:`ParamSpec`. Además, si ese invocable agrega o elimina " +"argumentos de otros invocables, se puede utilizar el " +"operador :data:`Concatenate`. Toman la forma ``Callable[ParamSpecVariable, " +"ReturnType]`` y ``Callable[Concatenate[Arg1Type, Arg2Type, ..., " +"ParamSpecVariable], ReturnType]`` respectivamente." #: ../Doc/library/typing.rst:285 ../Doc/library/typing.rst:3798 msgid "" -"``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" -"pep:`612` for more details." +"``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. " +"See :pep:`612` for more details." msgstr "" -"``Callable`` ahora es compatible con :class:`ParamSpec` y :data:" -"`Concatenate`. Consulte :pep:`612` para obtener más información." +"``Callable`` ahora es compatible con :class:`ParamSpec` " +"y :data:`Concatenate`. Consulte :pep:`612` para obtener más información." #: ../Doc/library/typing.rst:290 msgid "" @@ -556,6 +660,17 @@ msgid "" "def notify_by_email(employees: Sequence[Employee],\n" " overrides: Mapping[str, str]) -> None: ..." msgstr "" +"from collections.abc import Mapping, Sequence\n" +"\n" +"class Employee: ...\n" +"\n" +"# Sequence[Employee] indica que todos los elementos de la secuencia\n" +"# deben ser instancias de \"Employee\".\n" +"# Mapping[str, str] indica que todas las claves y todos los valores de la " +"asignación\n" +"# deben ser cadenas.\n" +"def notify_by_email(employees: Sequence[Employee],\n" +" overrides: Mapping[str, str]) -> None: ..." #: ../Doc/library/typing.rst:315 msgid "" @@ -573,6 +688,11 @@ msgid "" "\"T\"\n" " return l[0]" msgstr "" +"from collections.abc import Sequence\n" +"\n" +"def first[T](l: Sequence[T]) -> T: # La función es genérica sobre el " +"TypeVar \"T\"\n" +" return l[0]" #: ../Doc/library/typing.rst:323 msgid "Or by using the :class:`TypeVar` factory directly::" @@ -589,6 +709,14 @@ msgid "" "\"U\"\n" " return l[1]" msgstr "" +"from collections.abc import Sequence\n" +"from typing import TypeVar\n" +"\n" +"U = TypeVar('U') # Declara variable tipo \"U\"\n" +"\n" +"def second(l: Sequence[U]) -> U: # La función es genérica sobre TypeVar " +"\"U\"\n" +" return l[1]" #: ../Doc/library/typing.rst:333 msgid "Syntactic support for generics is new in Python 3.12." @@ -620,26 +748,41 @@ msgid "" "# and that all values in ``z`` are meant to be either strings or ints\n" "z: Mapping[str, str | int] = {}" msgstr "" +"from collections.abc import Mapping\n" +"\n" +"# El verificador de tipos inferirá que todos los elementos en ``x`` deben " +"ser ints\n" +"x: list[int] = []\n" +"\n" +"#Error del verificador de tipo: ``list`` solo acepta un único argumento de " +"tipo:\n" +"y: list[int, str] = [1, 'foo']\n" +"\n" +"# El verificador de tipos inferirá que todas las claves en ``z`` deben ser " +"strings,\n" +"# y que todos los valores en ``z`` deben ser strings o ints\n" +"z: Mapping[str, str | int] = {}" #: ../Doc/library/typing.rst:356 msgid "" ":class:`list` only accepts one type argument, so a type checker would emit " -"an error on the ``y`` assignment above. Similarly, :class:`~collections.abc." -"Mapping` only accepts two type arguments: the first indicates the type of " -"the keys, and the second indicates the type of the values." +"an error on the ``y`` assignment above. " +"Similarly, :class:`~collections.abc.Mapping` only accepts two type " +"arguments: the first indicates the type of the keys, and the second " +"indicates the type of the values." msgstr "" ":class:`list` solo acepta un argumento de tipo, por lo que un validador de " -"tipos emitiría un error en la asignación ``y`` anterior. De manera similar, :" -"class:`~collections.abc.Mapping` solo acepta dos argumentos de tipo: el " -"primero indica el tipo de las claves y el segundo indica el tipo de los " -"valores." +"tipos emitiría un error en la asignación ``y`` anterior. De manera " +"similar, :class:`~collections.abc.Mapping` solo acepta dos argumentos de " +"tipo: el primero indica el tipo de las claves y el segundo indica el tipo de " +"los valores." #: ../Doc/library/typing.rst:362 msgid "" "Unlike most other Python containers, however, it is common in idiomatic " "Python code for tuples to have elements which are not all of the same type. " -"For this reason, tuples are special-cased in Python's typing system. :class:" -"`tuple` accepts *any number* of type arguments::" +"For this reason, tuples are special-cased in Python's typing " +"system. :class:`tuple` accepts *any number* of type arguments::" msgstr "" "Sin embargo, a diferencia de la mayoría de los demás contenedores de Python, " "es común en el código idiomático de Python que las tuplas tengan elementos " @@ -661,6 +804,17 @@ msgid "" "# but ``z`` has been assigned to a tuple of length 3\n" "z: tuple[int] = (1, 2, 3)" msgstr "" +"# OK: ``x`` se asigna a una tupla de longitud 1 donde el único elemento es " +"un int\n" +"x: tuple[int] = (5,)\n" +"\n" +"# OK: ``y`` se asigna a una tupla de longitud 2;\n" +"# el elemento 1 es un int, el elemento 2 es una cadena\n" +"y: tuple[int, str] = (5, \"foo\")\n" +"\n" +"# Error: la anotación de tipo indica una tupla de longitud 1,\n" +"# pero ``z`` se ha asignado a una tupla de longitud 3\n" +"z: tuple[int] = (1, 2, 3)" #: ../Doc/library/typing.rst:378 msgid "" @@ -693,23 +847,40 @@ msgid "" "z = (1, 2, 3)\n" "z = ()" msgstr "" +"x: tuple[int, ...] = (1, 2)\n" +"# Estas reasignaciones están bien: ``tuple[int, ...]`` indica que x puede " +"tener cualquier longitud\n" +"x = (1, 2, 3)\n" +"x = ()\n" +"# Esta reasignación es un error: todos los elementos en ``x`` deben ser " +"enteros\n" +"x = (\"foo\", \"bar\")\n" +"\n" +"# ``y`` solo se puede asignar a una tupla vacía\n" +"y: tuple[()] = ()\n" +"\n" +"z: tuple = (\"foo\", \"bar\")\n" +"# Estas reasignaciones están bien: una ``tupla`` simple es equivalente a " +"``tuple[Any, ...]``\n" +"z = (1, 2, 3)\n" +"z = ()" #: ../Doc/library/typing.rst:401 msgid "The type of class objects" msgstr "El tipo de objetos de clase" #: ../Doc/library/typing.rst:403 -#, fuzzy msgid "" "A variable annotated with ``C`` may accept a value of type ``C``. In " -"contrast, a variable annotated with ``type[C]`` (or deprecated :class:" -"`typing.Type[C] `) may accept values that are classes themselves -- " -"specifically, it will accept the *class object* of ``C``. For example::" +"contrast, a variable annotated with ``type[C]`` (or " +"deprecated :class:`typing.Type[C] `) may accept values that are " +"classes themselves -- specifically, it will accept the *class object* of " +"``C``. For example::" msgstr "" "Una variable anotada con ``C`` puede aceptar un valor de tipo ``C``. Por el " "contrario, una variable anotada con ``type[C]`` (o :class:`typing.Type[C] " -"`) puede aceptar valores que sean clases en sí mismas; " -"específicamente, aceptará el *objeto de clase* de ``C``. Por ejemplo:" +"` en desuso) puede aceptar valores que sean clases en sí mismos; " +"específicamente, aceptará el *class object* de ``C``. Por ejemplo:" #: ../Doc/library/typing.rst:409 msgid "" @@ -717,6 +888,9 @@ msgid "" "b = int # Has type ``type[int]``\n" "c = type(a) # Also has type ``type[int]``" msgstr "" +"a = 3 # Tiene tipo ``int``\n" +"b = int # Tiene tipo ``type[int]``\n" +"c = type(a) # Tambien tiene tipo ``type[int]``" #: ../Doc/library/typing.rst:413 msgid "Note that ``type[C]`` is covariant::" @@ -740,15 +914,32 @@ msgid "" "make_new_user(int) # Error: ``type[int]`` is not a subtype of " "``type[User]``" msgstr "" +"class User: ...\n" +"class ProUser(User): ...\n" +"class TeamUser(User): ...\n" +"\n" +"def make_new_user(user_class: type[User]) -> User:\n" +" # ...\n" +" return user_class()\n" +"\n" +"make_new_user(User) # OK\n" +"make_new_user(ProUser) # También OK: ``type[ProUser]`` es un subtipo de " +"``type[User]``\n" +"make_new_user(TeamUser) # aún está bien\n" +"make_new_user(User()) # Error: se espera ``type[User]`` pero se usó " +"``User``\n" +"make_new_user(int) # Error: ``type[int]`` no es un subtipo de " +"``type[User]``" #: ../Doc/library/typing.rst:429 msgid "" -"The only legal parameters for :class:`type` are classes, :data:`Any`, :ref:" -"`type variables `, and unions of any of these types. For example::" +"The only legal parameters for :class:`type` are " +"classes, :data:`Any`, :ref:`type variables `, and unions of any of " +"these types. For example::" msgstr "" -"Los únicos parámetros legales para :class:`type` son las clases, :data:" -"`Any`, :ref:`variables de tipo ` y uniones de cualquiera de estos " -"tipos. Por ejemplo::" +"Los únicos parámetros legales para :class:`type` son las " +"clases, :data:`Any`, :ref:`variables de tipo ` y uniones de " +"cualquiera de estos tipos. Por ejemplo::" #: ../Doc/library/typing.rst:433 msgid "" @@ -760,28 +951,35 @@ msgid "" " # of ``type[BasicUser | ProUser]``\n" "new_non_team_user(User) # Also an error" msgstr "" +"def new_non_team_user(user_class: type[BasicUser | ProUser]): ...\n" +"\n" +"new_non_team_user(BasicUser) # OK\n" +"new_non_team_user(ProUser) # OK\n" +"new_non_team_user(TeamUser) # Error: ``type[TeamUser]`` no es un subtipo\n" +" # de ``type[BasicUser | ProUser]``\n" +"new_non_team_user(User) # También un error" #: ../Doc/library/typing.rst:441 msgid "" -"``type[Any]`` is equivalent to :class:`type`, which is the root of Python's :" -"ref:`metaclass hierarchy `." +"``type[Any]`` is equivalent to :class:`type`, which is the root of " +"Python's :ref:`metaclass hierarchy `." msgstr "" -"``type[Any]`` es equivalente a :class:`type`, que es la raíz de la :ref:" -"`jerarquía de metaclases ` de Python." +"``type[Any]`` es equivalente a :class:`type`, que es la raíz de " +"la :ref:`jerarquía de metaclases ` de Python." #: ../Doc/library/typing.rst:448 msgid "Annotating generators and coroutines" -msgstr "" +msgstr "Anotación de generadores y corrutinas" #: ../Doc/library/typing.rst:450 -#, fuzzy msgid "" -"A generator can be annotated using the generic type :class:" -"`Generator[YieldType, SendType, ReturnType] `. " -"For example::" +"A generator can be annotated using the generic " +"type :class:`Generator[YieldType, SendType, ReturnType] " +"`. For example::" msgstr "" -"Un generador puede ser anotado con el tipo genérico ``Generator[YieldType, " -"SendType, ReturnType]``. Por ejemplo::" +"Se puede anotar un generador utilizando el tipo " +"genérico :class:`Generator[YieldType, SendType, ReturnType] " +"`. Por ejemplo:" #: ../Doc/library/typing.rst:454 msgid "" @@ -791,22 +989,28 @@ msgid "" " sent = yield round(sent)\n" " return 'Done'" msgstr "" +"def echo_round() -> Generator[int, float, str]:\n" +" sent = yield 0\n" +" while sent >= 0:\n" +" sent = yield round(sent)\n" +" return 'Done'" #: ../Doc/library/typing.rst:460 -#, fuzzy msgid "" "Note that unlike many other generic classes in the standard library, the " "``SendType`` of :class:`~collections.abc.Generator` behaves contravariantly, " "not covariantly or invariantly." msgstr "" -"Nótese que en contraste con muchos otros genéricos en el módulo *typing*, el " -"``SendType`` de :class:`Generator` se comporta como contravariante, no " -"covariante ni invariante." +"Tenga en cuenta que, a diferencia de muchas otras clases genéricas en la " +"biblioteca estándar, ``SendType`` de :class:`~collections.abc.Generator` se " +"comporta de manera contravariante, no covariante o invariante." #: ../Doc/library/typing.rst:464 msgid "" "The ``SendType`` and ``ReturnType`` parameters default to :const:`!None`::" msgstr "" +"Los parámetros ``SendType`` y ``ReturnType`` tienen como valor " +"predeterminado :const:`!None`::" #: ../Doc/library/typing.rst:466 msgid "" @@ -815,10 +1019,14 @@ msgid "" " yield start\n" " start += 1" msgstr "" +"def infinite_stream(start: int) -> Generator[int]:\n" +" while True:\n" +" yield start\n" +" start += 1" #: ../Doc/library/typing.rst:471 msgid "It is also possible to set these types explicitly::" -msgstr "" +msgstr "También es posible configurar estos tipos explícitamente:" #: ../Doc/library/typing.rst:473 msgid "" @@ -827,13 +1035,22 @@ msgid "" " yield start\n" " start += 1" msgstr "" +"def infinite_stream(start: int) -> Generator[int, None, None]:\n" +" while True:\n" +" yield start\n" +" start += 1" #: ../Doc/library/typing.rst:478 msgid "" "Simple generators that only ever yield values can also be annotated as " -"having a return type of either :class:`Iterable[YieldType] ` or :class:`Iterator[YieldType] `::" +"having a return type of either :class:`Iterable[YieldType] " +"` or :class:`Iterator[YieldType] " +"`::" msgstr "" +"Los generadores simples que solo producen valores también se pueden anotar " +"como que tienen un tipo de retorno de :class:`Iterable[YieldType] " +"` o :class:`Iterator[YieldType] " +"`::" #: ../Doc/library/typing.rst:483 msgid "" @@ -842,14 +1059,23 @@ msgid "" " yield start\n" " start += 1" msgstr "" +"def infinite_stream(start: int) -> Iterator[int]:\n" +" while True:\n" +" yield start\n" +" start += 1" #: ../Doc/library/typing.rst:488 msgid "" "Async generators are handled in a similar fashion, but don't expect a " "``ReturnType`` type argument (:class:`AsyncGenerator[YieldType, SendType] " -"`). The ``SendType`` argument defaults to :" -"const:`!None`, so the following definitions are equivalent::" +"`). The ``SendType`` argument defaults " +"to :const:`!None`, so the following definitions are equivalent::" msgstr "" +"Los generadores asincrónicos se manejan de manera similar, pero no espere un " +"argumento de tipo ``ReturnType`` (:class:`AsyncGenerator[YieldType, " +"SendType] `). El argumento ``SendType`` " +"tiene como valor predeterminado :const:`!None`, por lo que las siguientes " +"definiciones son equivalentes:" #: ../Doc/library/typing.rst:494 msgid "" @@ -863,13 +1089,26 @@ msgid "" " yield start\n" " start = await increment(start)" msgstr "" +"async def infinite_stream(start: int) -> AsyncGenerator[int]:\n" +" while True:\n" +" yield start\n" +" start = await increment(start)\n" +"\n" +"async def infinite_stream(start: int) -> AsyncGenerator[int, None]:\n" +" while True:\n" +" yield start\n" +" start = await increment(start)" #: ../Doc/library/typing.rst:504 msgid "" -"As in the synchronous case, :class:`AsyncIterable[YieldType] ` and :class:`AsyncIterator[YieldType] ` are available as well::" +"As in the synchronous case, :class:`AsyncIterable[YieldType] " +"` and :class:`AsyncIterator[YieldType] " +"` are available as well::" msgstr "" +"Al igual que en el caso sincrónico, también están " +"disponibles :class:`AsyncIterable[YieldType] " +"` y :class:`AsyncIterator[YieldType] " +"`:" #: ../Doc/library/typing.rst:509 msgid "" @@ -878,6 +1117,10 @@ msgid "" " yield start\n" " start = await increment(start)" msgstr "" +"async def infinite_stream(start: int) -> AsyncIterator[int]:\n" +" while True:\n" +" yield start\n" +" start = await increment(start)" #: ../Doc/library/typing.rst:514 msgid "" @@ -885,6 +1128,9 @@ msgid "" "ReturnType] `. Generic arguments correspond to " "those of :class:`~collections.abc.Generator`, for example::" msgstr "" +"Las corrutinas se pueden anotar utilizando :class:`Coroutine[YieldType, " +"SendType, ReturnType] `. Los argumentos genéricos " +"corresponden a los de :class:`~collections.abc.Generator`, por ejemplo:" #: ../Doc/library/typing.rst:519 msgid "" @@ -894,6 +1140,12 @@ msgid "" "async def bar() -> None:\n" " y = await c # Inferred type of 'y' is int" msgstr "" +"from collections.abc import Coroutine\n" +"c: Coroutine[list[str], str, int] # Algunas corrutinas definidas en otro " +"lugar\n" +"x = c.send('hi') # El tipo inferido de 'x' es list[str]\n" +"async def bar() -> None:\n" +" y = await c # El tipo inferido de 'y' es int" #: ../Doc/library/typing.rst:528 msgid "User-defined generic types" @@ -926,23 +1178,40 @@ msgid "" " def log(self, message: str) -> None:\n" " self.logger.info('%s: %s', self.name, message)" msgstr "" +"from logging import Logger\n" +"\n" +"class LoggedVar[T]:\n" +" def __init__(self, value: T, name: str, logger: Logger) -> None:\n" +" self.name = name\n" +" self.logger = logger\n" +" self.value = value\n" +"\n" +" def set(self, new: T) -> None:\n" +" self.log('Set ' + repr(self.value))\n" +" self.value = new\n" +"\n" +" def get(self) -> T:\n" +" self.log('Get ' + repr(self.value))\n" +" return self.value\n" +"\n" +" def log(self, message: str) -> None:\n" +" self.logger.info('%s: %s', self.name, message)" #: ../Doc/library/typing.rst:553 -#, fuzzy msgid "" "This syntax indicates that the class ``LoggedVar`` is parameterised around a " "single :ref:`type variable ` ``T`` . This also makes ``T`` valid as " "a type within the class body." msgstr "" "Esta sintaxis indica que la clase ``LoggedVar`` está parametrizada en torno " -"a una única variable de tipo :class:`` ``T`` . Esto también hace " -"que ``T`` sea válida como tipo dentro del cuerpo de la clase." +"a un único :ref:`type variable ` ``T`` . Esto también hace que " +"``T`` sea válido como tipo dentro del cuerpo de la clase." #: ../Doc/library/typing.rst:557 msgid "" "Generic classes implicitly inherit from :class:`Generic`. For compatibility " -"with Python 3.11 and lower, it is also possible to inherit explicitly from :" -"class:`Generic` to indicate a generic class::" +"with Python 3.11 and lower, it is also possible to inherit explicitly " +"from :class:`Generic` to indicate a generic class::" msgstr "" "Las clases genéricas heredan implícitamente de :class:`Generic`. Para " "compatibilidad con Python 3.11 y versiones anteriores, también es posible " @@ -957,6 +1226,12 @@ msgid "" "class LoggedVar(Generic[T]):\n" " ..." msgstr "" +"from typing import TypeVar, Generic\n" +"\n" +"T = TypeVar('T')\n" +"\n" +"class LoggedVar(Generic[T]):\n" +" ..." #: ../Doc/library/typing.rst:568 msgid "" @@ -975,11 +1250,16 @@ msgid "" " for var in vars:\n" " var.set(0)" msgstr "" +"from collections.abc import Iterable\n" +"\n" +"def zero_all_vars(vars: Iterable[LoggedVar[int]]) -> None:\n" +" for var in vars:\n" +" var.set(0)" #: ../Doc/library/typing.rst:577 msgid "" -"A generic type can have any number of type variables. All varieties of :" -"class:`TypeVar` are permissible as parameters for a generic type::" +"A generic type can have any number of type variables. All varieties " +"of :class:`TypeVar` are permissible as parameters for a generic type::" msgstr "" "Un tipo genérico puede tener un numero cualquiera de variables de tipo. Se " "permiten todas las variaciones de :class:`TypeVar` para ser usadas como " @@ -999,6 +1279,17 @@ msgid "" "class OldWeirdTrio(Generic[OldT, OldB, OldS]):\n" " ..." msgstr "" +"from typing import TypeVar, Generic, Sequence\n" +"\n" +"class WeirdTrio[T, B: Sequence[bytes], S: (int, str)]:\n" +" ...\n" +"\n" +"OldT = TypeVar('OldT', contravariant=True)\n" +"OldB = TypeVar('OldB', bound=Sequence[bytes], covariant=True)\n" +"OldS = TypeVar('OldS', int, str)\n" +"\n" +"class OldWeirdTrio(Generic[OldT, OldB, OldS]):\n" +" ..." #: ../Doc/library/typing.rst:592 msgid "" @@ -1021,6 +1312,16 @@ msgid "" "class Pair(Generic[T, T]): # INVALID\n" " ..." msgstr "" +"from typing import TypeVar, Generic\n" +"...\n" +"\n" +"class Pair[M, M]: # SyntaxError\n" +" ...\n" +"\n" +"T = TypeVar('T')\n" +"\n" +"class Pair(Generic[T, T]): # INVALID\n" +" ..." #: ../Doc/library/typing.rst:606 msgid "Generic classes can also inherit from other classes::" @@ -1033,6 +1334,10 @@ msgid "" "class LinkedList[T](Sized):\n" " ..." msgstr "" +"from collections.abc import Sized\n" +"\n" +"class LinkedList[T](Sized):\n" +" ..." #: ../Doc/library/typing.rst:613 msgid "" @@ -1047,6 +1352,10 @@ msgid "" "class MyDict[T](Mapping[str, T]):\n" " ..." msgstr "" +"from collections.abc import Mapping\n" +"\n" +"class MyDict[T](Mapping[str, T]):\n" +" ..." #: ../Doc/library/typing.rst:620 msgid "In this case ``MyDict`` has a single parameter, ``T``." @@ -1058,9 +1367,10 @@ msgid "" "for each position. In the following example, ``MyIterable`` is not generic " "but implicitly inherits from ``Iterable[Any]``:" msgstr "" -"El uso de una clase genérica sin especificar parámetros de tipo supone :data:" -"`Any` para cada posición. En el siguiente ejemplo, ``MyIterable`` no es " -"genérico, sino que hereda implícitamente de ``Iterable[Any]``:" +"El uso de una clase genérica sin especificar parámetros de tipo " +"supone :data:`Any` para cada posición. En el siguiente ejemplo, " +"``MyIterable`` no es genérico, sino que hereda implícitamente de " +"``Iterable[Any]``:" #: ../Doc/library/typing.rst:626 msgid "" @@ -1069,6 +1379,10 @@ msgid "" "class MyIterable(Iterable): # Same as Iterable[Any]\n" " ..." msgstr "" +"from collections.abc import Iterable\n" +"\n" +"class MyIterable(Iterable): # Igual que Iterable[Any]\n" +" ..." #: ../Doc/library/typing.rst:633 msgid "User-defined generic type aliases are also supported. Examples::" @@ -1092,6 +1406,19 @@ msgid "" "Iterable[tuple[T, T]]\n" " return sum(x*y for x, y in v)" msgstr "" +"from collections.abc import Iterable\n" +"\n" +"type Response[S] = Iterable[S] | int\n" +"\n" +"# Return type here is same as Iterable[str] | int\n" +"def response(query: str) -> Response[str]:\n" +" ...\n" +"\n" +"type Vec[T] = Iterable[tuple[T, T]]\n" +"\n" +"def inproduct[T: (int, float, complex)](v: Vec[T]) -> T: # Same as " +"Iterable[tuple[T, T]]\n" +" return sum(x*y for x, y in v)" #: ../Doc/library/typing.rst:648 msgid "" @@ -1109,6 +1436,11 @@ msgid "" "S = TypeVar(\"S\")\n" "Response = Iterable[S] | int" msgstr "" +"from collections.abc import Iterable\n" +"from typing import TypeVar\n" +"\n" +"S = TypeVar(\"S\")\n" +"Response = Iterable[S] | int" #: ../Doc/library/typing.rst:657 msgid ":class:`Generic` no longer has a custom metaclass." @@ -1148,6 +1480,10 @@ msgid "" ">>> Z[int, [dict, float]]\n" "__main__.Z[int, [dict, float]]" msgstr "" +">>> class Z[T, **P]: ... # T es un TypeVar; P es un ParamSpec\n" +"...\n" +">>> Z[int, [dict, float]]\n" +"__main__.Z[int, [dict, float]]" #: ../Doc/library/typing.rst:676 msgid "" @@ -1166,6 +1502,12 @@ msgid "" "class Z(Generic[P]):\n" " ..." msgstr "" +"from typing import ParamSpec, Generic\n" +"\n" +"P = ParamSpec('P')\n" +"\n" +"class Z(Generic[P]):\n" +" ..." #: ../Doc/library/typing.rst:686 msgid "" @@ -1190,6 +1532,12 @@ msgid "" ">>> X[[int, str]]\n" "__main__.X[[int, str]]" msgstr "" +">>> class X[**P]: ...\n" +"...\n" +">>> X[int, str]\n" +"__main__.X[[int, str]]\n" +">>> X[[int, str]]\n" +"__main__.X[[int, str]]" #: ../Doc/library/typing.rst:699 msgid "" @@ -1203,8 +1551,8 @@ msgstr "" #: ../Doc/library/typing.rst:703 msgid "" -":class:`Generic` can now be parameterized over parameter expressions. See :" -"class:`ParamSpec` and :pep:`612` for more details." +":class:`Generic` can now be parameterized over parameter expressions. " +"See :class:`ParamSpec` and :pep:`612` for more details." msgstr "" ":class:`Generic` ahora se puede parametrizar sobre expresiones de " "parámetros. Consulte :class:`ParamSpec` y :pep:`612` para obtener más " @@ -1214,8 +1562,8 @@ msgstr "" msgid "" "A user-defined generic class can have ABCs as base classes without a " "metaclass conflict. Generic metaclasses are not supported. The outcome of " -"parameterizing generics is cached, and most types in the typing module are :" -"term:`hashable` and comparable for equality." +"parameterizing generics is cached, and most types in the typing module " +"are :term:`hashable` and comparable for equality." msgstr "" "Una clase genérica definida por el usuario puede tener clases ABC sin que se " "produzca un conflicto de metaclases. No se admiten metaclases genéricas. El " @@ -1262,14 +1610,28 @@ msgid "" " item.bar()\n" " ..." msgstr "" +"from typing import Any\n" +"\n" +"a: Any = None\n" +"a = [] # OK\n" +"a = 2 # OK\n" +"\n" +"s: str = ''\n" +"s = a # OK\n" +"\n" +"def foo(item: Any) -> int:\n" +" # Pasa la verificación de tipos; 'item' puede ser de cualquier tipo,\n" +" # y ese tipo puede tener el método 'bar'\n" +" item.bar()\n" +" ..." #: ../Doc/library/typing.rst:738 msgid "" -"Notice that no type checking is performed when assigning a value of type :" -"data:`Any` to a more precise type. For example, the static type checker did " -"not report an error when assigning ``a`` to ``s`` even though ``s`` was " -"declared to be of type :class:`str` and receives an :class:`int` value at " -"runtime!" +"Notice that no type checking is performed when assigning a value of " +"type :data:`Any` to a more precise type. For example, the static type " +"checker did not report an error when assigning ``a`` to ``s`` even though " +"``s`` was declared to be of type :class:`str` and receives an :class:`int` " +"value at runtime!" msgstr "" "Nótese que no se realiza comprobación de tipo cuando se asigna un valor de " "tipo :data:`Any` a un tipo más preciso. Por ejemplo, el Validador estático " @@ -1297,6 +1659,15 @@ msgid "" " ...\n" " return data" msgstr "" +"def legacy_parser(text):\n" +" ...\n" +" return data\n" +"\n" +"# Un verificador de tipos estáticos tratará\n" +"# lo anterior como si tuviera la misma firma que:\n" +"def legacy_parser(text: Any) -> Any:\n" +" ...\n" +" return data" #: ../Doc/library/typing.rst:757 msgid "" @@ -1315,8 +1686,8 @@ msgid "" msgstr "" "Compárese el comportamiento de :data:`Any` con el de :class:`object`. De " "manera similar a :data:`Any`, todo tipo es un subtipo de :class:`object`. " -"Sin embargo, en oposición a :data:`Any`, lo contrario no es cierto: :class:" -"`object` *no* es un subtipo de ningún otro tipo." +"Sin embargo, en oposición a :data:`Any`, lo contrario no es " +"cierto: :class:`object` *no* es un subtipo de ningún otro tipo." #: ../Doc/library/typing.rst:765 msgid "" @@ -1350,6 +1721,26 @@ msgid "" "hash_b(42)\n" "hash_b(\"foo\")" msgstr "" +"def hash_a(item: object) -> int:\n" +" # No pasa la comprobación de tipos; un objeto no tiene un método " +"\"mágico\".\n" +" item.magic()\n" +" ...\n" +"\n" +"def hash_b(item: Any) -> int:\n" +" # Pasa la veficiación de tipos\n" +" item.magic()\n" +" ...\n" +"\n" +"# Pasa la verificación de tipo, ya que los ints y str son subclases de " +"objeto\n" +"hash_a(42)\n" +"hash_a(\"foo\")\n" +"\n" +"# Pasa la verificación de tipo, ya que Any es compatible con todos los " +"tipos\n" +"hash_b(42)\n" +"hash_b(\"foo\")" #: ../Doc/library/typing.rst:787 msgid "" @@ -1378,11 +1769,11 @@ msgstr "" # Frase ultracompleja, necesitar una revisión fuerte #: ../Doc/library/typing.rst:798 msgid "" -"This requirement previously also applied to abstract base classes, such as :" -"class:`~collections.abc.Iterable`. The problem with this approach is that a " -"class had to be explicitly marked to support them, which is unpythonic and " -"unlike what one would normally do in idiomatic dynamically typed Python " -"code. For example, this conforms to :pep:`484`::" +"This requirement previously also applied to abstract base classes, such " +"as :class:`~collections.abc.Iterable`. The problem with this approach is " +"that a class had to be explicitly marked to support them, which is " +"unpythonic and unlike what one would normally do in idiomatic dynamically " +"typed Python code. For example, this conforms to :pep:`484`::" msgstr "" "Este requisito también se aplicaba anteriormente a clases base abstractas " "(ABC), tales como :class:`~collections.abc.Iterable`. El problema con esta " @@ -1400,6 +1791,12 @@ msgid "" " def __len__(self) -> int: ...\n" " def __iter__(self) -> Iterator[int]: ..." msgstr "" +"from collections.abc import Sized, Iterable, Iterator\n" +"\n" +"class Bucket(Sized, Iterable[int]):\n" +" ...\n" +" def __len__(self) -> int: ...\n" +" def __iter__(self) -> Iterator[int]: ..." #: ../Doc/library/typing.rst:811 msgid "" @@ -1427,6 +1824,15 @@ msgid "" "def collect(items: Iterable[int]) -> int: ...\n" "result = collect(Bucket()) # Passes type check" msgstr "" +"from collections.abc import Iterator, Iterable\n" +"\n" +"class Bucket: # Nota: sin clases base\n" +" ...\n" +" def __len__(self) -> int: ...\n" +" def __iter__(self) -> Iterator[int]: ...\n" +"\n" +"def collect(items: Iterable[int]) -> int: ...\n" +"result = collect(Bucket()) # Pasa la verificación de tipos" #: ../Doc/library/typing.rst:827 msgid "" @@ -1498,7 +1904,7 @@ msgstr "Definición::" #: ../Doc/library/typing.rst:863 msgid "AnyStr = TypeVar('AnyStr', str, bytes)" -msgstr "" +msgstr "AnyStr = TypeVar('AnyStr', str, bytes)" #: ../Doc/library/typing.rst:865 msgid "" @@ -1526,12 +1932,19 @@ msgid "" "concat(b\"foo\", b\"bar\") # OK, output has type 'bytes'\n" "concat(\"foo\", b\"bar\") # Error, cannot mix str and bytes" msgstr "" +"def concat(a: AnyStr, b: AnyStr) -> AnyStr:\n" +" return a + b\n" +"\n" +"concat(\"foo\", \"bar\") # OK, output tiene tipo 'str'\n" +"concat(b\"foo\", b\"bar\") # OK, output tiene tipo 'bytes'\n" +"concat(\"foo\", b\"bar\") # Error, no se puede mezclar str y bytes" #: ../Doc/library/typing.rst:877 msgid "" -"Note that, despite its name, ``AnyStr`` has nothing to do with the :class:" -"`Any` type, nor does it mean \"any string\". In particular, ``AnyStr`` and " -"``str | bytes`` are different from each other and have different use cases::" +"Note that, despite its name, ``AnyStr`` has nothing to do with " +"the :class:`Any` type, nor does it mean \"any string\". In particular, " +"``AnyStr`` and ``str | bytes`` are different from each other and have " +"different use cases::" msgstr "" "Tenga en cuenta que, a pesar de su nombre, ``AnyStr`` no tiene nada que ver " "con el tipo :class:`Any`, ni significa “cualquier cadena de caracteres”. En " @@ -1550,13 +1963,25 @@ msgid "" "def greet_proper(cond: bool) -> str | bytes:\n" " return \"hi there!\" if cond else b\"greetings!\"" msgstr "" +"# Uso inválido de AnyStr:\n" +"# La variable de tipo se usa solo una vez en la firma de la función,\n" +"# por lo que el verificador de tipos no puede resolverla.\n" +"def greet_bad(cond: bool) -> AnyStr:\n" +" return \"hi there!\" if cond else b\"greetings!\"\n" +"\n" +"# La mejor manera de anotar esta función:\n" +"def greet_proper(cond: bool) -> str | bytes:\n" +" return \"hi there!\" if cond else b\"greetings!\"" #: ../Doc/library/typing.rst:892 msgid "" "Deprecated in favor of the new :ref:`type parameter syntax `. " -"Use ``class A[T: (str, bytes)]: ...`` instead of importing ``AnyStr``. See :" -"pep:`695` for more details." +"Use ``class A[T: (str, bytes)]: ...`` instead of importing ``AnyStr``. " +"See :pep:`695` for more details." msgstr "" +"Obsoleto en favor del nuevo :ref:`type parameter syntax `. " +"Utilice ``class A[T: (str, bytes)]: ...`` en lugar de importar ``AnyStr``. " +"Consulte :pep:`695` para obtener más detalles." #: ../Doc/library/typing.rst:897 msgid "" @@ -1565,6 +1990,10 @@ msgid "" "imported from ``typing``. ``AnyStr`` will be removed from ``typing`` in " "Python 3.18." msgstr "" +"En Python 3.16, ``AnyStr`` se eliminará de ``typing.__all__`` y se emitirán " +"advertencias de desuso en tiempo de ejecución cuando se acceda a él o se " +"importe desde ``typing``. ``AnyStr`` se eliminará de ``typing`` en Python " +"3.18." #: ../Doc/library/typing.rst:904 msgid "Special type that includes only literal strings." @@ -1601,6 +2030,17 @@ msgid "" " f\"SELECT * FROM students WHERE name = {arbitrary_string}\"\n" " )" msgstr "" +"def run_query(sql: LiteralString) -> None:\n" +" ...\n" +"\n" +"def caller(arbitrary_string: str, literal_string: LiteralString) -> None:\n" +" run_query(\"SELECT * FROM students\") # OK\n" +" run_query(literal_string) # OK\n" +" run_query(\"SELECT * FROM \" + literal_string) # OK\n" +" run_query(arbitrary_string) # type checker error\n" +" run_query( # type checker error\n" +" f\"SELECT * FROM students WHERE name = {arbitrary_string}\"\n" +" )" #: ../Doc/library/typing.rst:928 msgid "" @@ -1620,22 +2060,20 @@ msgstr "Véase :pep:`675` para más detalle." # bottom type? #: ../Doc/library/typing.rst:940 -#, fuzzy msgid "" -":data:`!Never` and :data:`!NoReturn` represent the `bottom type `_, a type that has no members." +":data:`!Never` and :data:`!NoReturn` represent the `bottom type `_, a type that has no members." msgstr "" -"El `bottom type `_ (tipo vacío), " -"es un tipo que no tiene miembros." +":data:`!Never` y :data:`!NoReturn` representan `bottom type `_, un tipo que no tiene miembros." -# se añade valor para matizar que la funcion retorna (retorna el control) pero -# no de manera normal. En el ejemplo lanza una excepción. #: ../Doc/library/typing.rst:944 -#, fuzzy msgid "" -"They can be used to indicate that a function never returns, such as :func:" -"`sys.exit`::" -msgstr "Tipo especial que indica que una función nunca retorna un valor." +"They can be used to indicate that a function never returns, such " +"as :func:`sys.exit`::" +msgstr "" +"Se pueden utilizar para indicar que una función nunca retorna, " +"como :func:`sys.exit`::" #: ../Doc/library/typing.rst:947 msgid "" @@ -1644,15 +2082,18 @@ msgid "" "def stop() -> Never:\n" " raise RuntimeError('no way')" msgstr "" +"from typing import Never # o NoReturn\n" +"\n" +"def stop() -> Never:\n" +" raise RuntimeError('no way')" #: ../Doc/library/typing.rst:952 -#, fuzzy msgid "" "Or to define a function that should never be called, as there are no valid " "arguments, such as :func:`assert_never`::" msgstr "" -"Puede ser utilizado para definir una función que nunca debe ser llamada, o " -"una función que nunca retorna::" +"O definir una función que nunca debe llamarse, ya que no hay argumentos " +"válidos, como :func:`assert_never`::" #: ../Doc/library/typing.rst:956 msgid "" @@ -1671,20 +2112,37 @@ msgid "" " case _:\n" " never_call_me(arg) # OK, arg is of type Never (or NoReturn)" msgstr "" +"from typing import Never # o NoReturn\n" +"\n" +"def never_call_me(arg: Never) -> None:\n" +" pass\n" +"\n" +"def int_or_str(arg: int | str) -> None:\n" +" never_call_me(arg) # error del verificador de tipos\n" +" match arg:\n" +" case int():\n" +" print(\"It's an int\")\n" +" case str():\n" +" print(\"It's a str\")\n" +" case _:\n" +" never_call_me(arg) # OK, arg es del tipo Never (o NoReturn)" #: ../Doc/library/typing.rst:971 msgid "" ":data:`!Never` and :data:`!NoReturn` have the same meaning in the type " "system and static type checkers treat both equivalently." msgstr "" +":data:`!Never` y :data:`!NoReturn` tienen el mismo significado en el sistema " +"de tipos y los verificadores de tipos estáticos los tratan a ambos de manera " +"equivalente." #: ../Doc/library/typing.rst:976 msgid "Added :data:`NoReturn`." -msgstr "" +msgstr "Se agregó :data:`NoReturn`." #: ../Doc/library/typing.rst:980 msgid "Added :data:`Never`." -msgstr "" +msgstr "Se agregó :data:`Never`." # ¿cómo se le llama en español a una variable "capturada" en una clausura? #: ../Doc/library/typing.rst:984 @@ -1706,6 +2164,18 @@ msgid "" "reveal_type(SubclassOfFoo().return_self()) # Revealed type is " "\"SubclassOfFoo\"" msgstr "" +"from typing import Self, reveal_type\n" +"\n" +"class Foo:\n" +" def return_self(self) -> Self:\n" +" ...\n" +" return self\n" +"\n" +"class SubclassOfFoo(Foo): pass\n" +"\n" +"reveal_type(Foo().return_self()) # Revealed type is \"Foo\"\n" +"reveal_type(SubclassOfFoo().return_self()) # Tipo revelado es " +"\"SubclassOfFoo\"" #: ../Doc/library/typing.rst:1000 msgid "" @@ -1726,6 +2196,14 @@ msgid "" " ...\n" " return self" msgstr "" +"from typing import TypeVar\n" +"\n" +"Self = TypeVar(\"Self\", bound=\"Foo\")\n" +"\n" +"class Foo:\n" +" def return_self(self: Self) -> Self:\n" +" ...\n" +" return self" #: ../Doc/library/typing.rst:1012 msgid "" @@ -1775,6 +2253,12 @@ msgid "" " def returns_eggs(self) -> \"Eggs\":\n" " return Eggs()" msgstr "" +"class Eggs:\n" +" # Self would be an incorrect return annotation here,\n" +" # as the object returned is always an instance of Eggs,\n" +" # even in subclasses\n" +" def returns_eggs(self) -> \"Eggs\":\n" +" return Eggs()" #: ../Doc/library/typing.rst:1035 msgid "See :pep:`673` for more details." @@ -1794,6 +2278,9 @@ msgid "" "\n" "Factors: TypeAlias = list[int]" msgstr "" +"from typing import TypeAlias\n" +"\n" +"Factors: TypeAlias = list[int]" #: ../Doc/library/typing.rst:1049 msgid "" @@ -1823,6 +2310,21 @@ msgid "" " @classmethod\n" " def make_box_of_strings(cls) -> BoxOfStrings: ..." msgstr "" +"from typing import Generic, TypeAlias, TypeVar\n" +"\n" +"T = TypeVar(\"T\")\n" +"\n" +"# \"Box\" aún no existe,\n" +"# entonces tenemos que usar comillas para la referencia adelantada en Python " +"<3.12.\n" +"# Usando ``TypeAlias`` le dice al verificador de tipos que es una " +"declaración de tipo alias,\n" +"# no una asignacin de variable a un string.\n" +"BoxOfStrings: TypeAlias = \"Box[str]\"\n" +"\n" +"class Box(Generic[T]):\n" +" @classmethod\n" +" def make_box_of_strings(cls) -> BoxOfStrings: ..." #: ../Doc/library/typing.rst:1069 msgid "See :pep:`613` for more details." @@ -1832,19 +2334,20 @@ msgstr "Ver :pep:`613` para más detalle." msgid "" ":data:`TypeAlias` is deprecated in favor of the :keyword:`type` statement, " "which creates instances of :class:`TypeAliasType` and which natively " -"supports forward references. Note that while :data:`TypeAlias` and :class:" -"`TypeAliasType` serve similar purposes and have similar names, they are " -"distinct and the latter is not the type of the former. Removal of :data:" -"`TypeAlias` is not currently planned, but users are encouraged to migrate " -"to :keyword:`type` statements." -msgstr "" -":data:`TypeAlias` ha sido descontinuado en favor de la declaración :keyword:" -"`type`, la cual crea instancias de :class:`TypeAliasType` y que admite de " -"forma nativa referencias de versiones posteriores de Python. Tenga en cuenta " -"que, si bien :data:`TypeAlias` y :class:`TypeAliasType` tienen propósitos " -"similares y tienen nombres similares, son distintos y el último no es el " -"tipo del primero. La eliminación de :data:`TypeAlias` no está prevista " -"actualmente, pero se recomienda a los usuarios que migren a las " +"supports forward references. Note that while :data:`TypeAlias` " +"and :class:`TypeAliasType` serve similar purposes and have similar names, " +"they are distinct and the latter is not the type of the former. Removal " +"of :data:`TypeAlias` is not currently planned, but users are encouraged to " +"migrate to :keyword:`type` statements." +msgstr "" +":data:`TypeAlias` ha sido descontinuado en favor de la " +"declaración :keyword:`type`, la cual crea instancias " +"de :class:`TypeAliasType` y que admite de forma nativa referencias de " +"versiones posteriores de Python. Tenga en cuenta que, si " +"bien :data:`TypeAlias` y :class:`TypeAliasType` tienen propósitos similares " +"y tienen nombres similares, son distintos y el último no es el tipo del " +"primero. La eliminación de :data:`TypeAlias` no está prevista actualmente, " +"pero se recomienda a los usuarios que migren a las " "declaraciones :keyword:`type`." #: ../Doc/library/typing.rst:1084 @@ -1884,7 +2387,7 @@ msgstr "Las uniones de uniones se simplifican (se aplanan), p. ej.::" #: ../Doc/library/typing.rst:1099 msgid "Union[Union[int, str], float] == Union[int, str, float]" -msgstr "" +msgstr "Union[Union[int, str], float] == Union[int, str, float]" #: ../Doc/library/typing.rst:1101 msgid "Unions of a single argument vanish, e.g.::" @@ -1892,7 +2395,7 @@ msgstr "Las uniones con un solo argumento se eliminan, p. ej.::" #: ../Doc/library/typing.rst:1103 msgid "Union[int] == int # The constructor actually returns int" -msgstr "" +msgstr "Union[int] == int # El constructor de hecho retorna int" #: ../Doc/library/typing.rst:1105 msgid "Redundant arguments are skipped, e.g.::" @@ -1900,7 +2403,7 @@ msgstr "Argumentos repetidos se omiten, p. ej.::" #: ../Doc/library/typing.rst:1107 msgid "Union[int, str, int] == Union[int, str] == int | str" -msgstr "" +msgstr "Union[int, str, int] == Union[int, str] == int | str" #: ../Doc/library/typing.rst:1109 msgid "When comparing unions, the argument order is ignored, e.g.::" @@ -1909,7 +2412,7 @@ msgstr "" #: ../Doc/library/typing.rst:1111 msgid "Union[int, str] == Union[str, int]" -msgstr "" +msgstr "Union[int, str] == Union[str, int]" #: ../Doc/library/typing.rst:1113 msgid "You cannot subclass or instantiate a ``Union``." @@ -1952,6 +2455,8 @@ msgid "" "def foo(arg: int = 0) -> None:\n" " ..." msgstr "" +"def foo(arg: int = 0) -> None:\n" +" ..." #: ../Doc/library/typing.rst:1136 msgid "" @@ -1967,6 +2472,8 @@ msgid "" "def foo(arg: Optional[int] = None) -> None:\n" " ..." msgstr "" +"def foo(arg: Optional[int] = None) -> None:\n" +" ..." #: ../Doc/library/typing.rst:1143 msgid "" @@ -1996,26 +2503,26 @@ msgstr "" "invocable. El uso se realiza en el formato ``Concatenate[Arg1Type, " "Arg2Type, ..., ParamSpecVariable]``. ``Concatenate`` actualmente solo es " "válido cuando se utiliza como primer argumento de un :ref:`Callable " -"`. El último parámetro de ``Concatenate`` debe ser un :" -"class:`ParamSpec` o elipsis." +"`. El último parámetro de ``Concatenate`` debe ser " +"un :class:`ParamSpec` o elipsis." #: ../Doc/library/typing.rst:1160 msgid "" -"For example, to annotate a decorator ``with_lock`` which provides a :class:" -"`threading.Lock` to the decorated function, ``Concatenate`` can be used to " -"indicate that ``with_lock`` expects a callable which takes in a ``Lock`` as " -"the first argument, and returns a callable with a different type signature. " -"In this case, the :class:`ParamSpec` indicates that the returned callable's " -"parameter types are dependent on the parameter types of the callable being " -"passed in::" -msgstr "" -"Por ejemplo, para anotar un decorador ``with_lock`` que proporciona un :" -"class:`threading.Lock` a la función decorada, ``Concatenate`` puede usarse " -"para indicar que ``with_lock`` espera un invocable que toma un ``Lock`` como " -"primer argumento y retorna un invocable con un tipo de firma diferente. En " -"este caso, el :class:`ParamSpec` indica que los tipos de parámetros de los " -"invocables retornados dependen de los tipos de parámetros de los invocables " -"que se pasan en ::" +"For example, to annotate a decorator ``with_lock`` which provides " +"a :class:`threading.Lock` to the decorated function, ``Concatenate`` can be " +"used to indicate that ``with_lock`` expects a callable which takes in a " +"``Lock`` as the first argument, and returns a callable with a different type " +"signature. In this case, the :class:`ParamSpec` indicates that the returned " +"callable's parameter types are dependent on the parameter types of the " +"callable being passed in::" +msgstr "" +"Por ejemplo, para anotar un decorador ``with_lock`` que proporciona " +"un :class:`threading.Lock` a la función decorada, ``Concatenate`` puede " +"usarse para indicar que ``with_lock`` espera un invocable que toma un " +"``Lock`` como primer argumento y retorna un invocable con un tipo de firma " +"diferente. En este caso, el :class:`ParamSpec` indica que los tipos de " +"parámetros de los invocables retornados dependen de los tipos de parámetros " +"de los invocables que se pasan en ::" #: ../Doc/library/typing.rst:1168 msgid "" @@ -2044,6 +2551,32 @@ msgid "" "# We don't need to pass in the lock ourselves thanks to the decorator.\n" "sum_threadsafe([1.1, 2.2, 3.3])" msgstr "" +"from collections.abc import Callable\n" +"from threading import Lock\n" +"from typing import Concatenate\n" +"\n" +"# Utilice este bloqueo para garantizar que solo un hilo esté ejecutando una " +"función\n" +"# en cualquier momento.\n" +"my_lock = Lock()\n" +"\n" +"def with_lock[**P, R](f: Callable[Concatenate[Lock, P], R]) -> Callable[P, " +"R]:\n" +" '''A type-safe decorator which provides a lock.'''\n" +" def inner(*args: P.args, **kwargs: P.kwargs) -> R:\n" +" # Proporcione el bloqueo como primer argumento.\n" +" return f(my_lock, *args, **kwargs)\n" +" return inner\n" +"\n" +"@with_lock\n" +"def sum_threadsafe(lock: Lock, numbers: list[float]) -> float:\n" +" '''Add a list of numbers together in a thread-safe manner.'''\n" +" with lock:\n" +" return sum(numbers)\n" +"\n" +"# No necesitamos pasar por la cerradura nosotros mismos gracias al " +"decorador.\n" +"sum_threadsafe([1.1, 2.2, 3.3])" #: ../Doc/library/typing.rst:1196 ../Doc/library/typing.rst:2127 msgid "" @@ -2086,6 +2619,15 @@ msgid "" "open_helper('/some/path', 'r') # Passes type check\n" "open_helper('/other/path', 'typo') # Error in type checker" msgstr "" +"def validate_simple(data: Any) -> Literal[True]: # siempre retorna True\n" +" ...\n" +"\n" +"type Mode = Literal['r', 'rb', 'w', 'wb']\n" +"def open_helper(file: str, mode: Mode) -> str:\n" +" ...\n" +"\n" +"open_helper('/some/path', 'r') # Pasa el verificador de tipos\n" +"open_helper('/other/path', 'typo') # Error en el verificador de tipos" #: ../Doc/library/typing.rst:1221 msgid "" @@ -2132,6 +2674,9 @@ msgid "" " stats: ClassVar[dict[str, int]] = {} # class variable\n" " damage: int = 10 # instance variable" msgstr "" +"class Starship:\n" +" stats: ClassVar[dict[str, int]] = {} # variable de clase\n" +" damage: int = 10 # variable de instancia" # subscribed se substituye por niveles de subindice #: ../Doc/library/typing.rst:1245 @@ -2141,13 +2686,14 @@ msgstr "" #: ../Doc/library/typing.rst:1247 msgid "" -":data:`ClassVar` is not a class itself, and should not be used with :func:" -"`isinstance` or :func:`issubclass`. :data:`ClassVar` does not change Python " -"runtime behavior, but it can be used by third-party type checkers. For " -"example, a type checker might flag the following code as an error::" +":data:`ClassVar` is not a class itself, and should not be used " +"with :func:`isinstance` or :func:`issubclass`. :data:`ClassVar` does not " +"change Python runtime behavior, but it can be used by third-party type " +"checkers. For example, a type checker might flag the following code as an " +"error::" msgstr "" -":data:`ClassVar` no es un clase en sí misma, y no debe ser usado con :func:" -"`isinstance` o :func:`issubclass`. :data:`ClassVar` no modifica el " +":data:`ClassVar` no es un clase en sí misma, y no debe ser usado " +"con :func:`isinstance` o :func:`issubclass`. :data:`ClassVar` no modifica el " "comportamiento de Python en tiempo de ejecución pero puede ser utilizado por " "validadores de terceros. Por ejemplo, un validador de tipos puede marcar el " "siguiente código como erróneo::" @@ -2158,10 +2704,14 @@ msgid "" "enterprise_d.stats = {} # Error, setting class variable on instance\n" "Starship.stats = {} # This is OK" msgstr "" +"enterprise_d = Starship(3000)\n" +"enterprise_d.stats = {} # Error, establece variable de clase en la " +"instancia\n" +"Starship.stats = {} # Ésto está OK" #: ../Doc/library/typing.rst:1261 msgid ":data:`ClassVar` can now be nested in :data:`Final` and vice versa." -msgstr "" +msgstr "Ahora :data:`ClassVar` se puede anidar en :data:`Final` y viceversa." #: ../Doc/library/typing.rst:1265 msgid "Special typing construct to indicate final names to type checkers." @@ -2188,18 +2738,26 @@ msgid "" "class FastConnector(Connection):\n" " TIMEOUT = 1 # Error reported by type checker" msgstr "" +"MAX_SIZE: Final = 9000\n" +"MAX_SIZE += 1 # Error reportado por un verificador de tipos\n" +"\n" +"class Connection:\n" +" TIMEOUT: Final[int] = 10\n" +"\n" +"class FastConnector(Connection):\n" +" TIMEOUT = 1 # Error reportado por un verificador de tipos" #: ../Doc/library/typing.rst:1281 ../Doc/library/typing.rst:3081 msgid "" "There is no runtime checking of these properties. See :pep:`591` for more " "details." msgstr "" -"No hay comprobación en tiempo de ejecución para estas propiedades. Véase :" -"pep:`591` para más detalles." +"No hay comprobación en tiempo de ejecución para estas propiedades. " +"Véase :pep:`591` para más detalles." #: ../Doc/library/typing.rst:1288 msgid ":data:`Final` can now be nested in :data:`ClassVar` and vice versa." -msgstr "" +msgstr "Ahora :data:`Final` se puede anidar en :data:`ClassVar` y viceversa." #: ../Doc/library/typing.rst:1292 msgid "Special typing construct to mark a :class:`TypedDict` key as required." @@ -2212,8 +2770,8 @@ msgid "" "This is mainly useful for ``total=False`` TypedDicts. See :class:`TypedDict` " "and :pep:`655` for more details." msgstr "" -"Esto es útil principalmente para TypedDicts ``total=False``. Vea :class:" -"`TypedDict` y :pep:`655` para obtener más detalles." +"Esto es útil principalmente para TypedDicts ``total=False``. " +"Vea :class:`TypedDict` y :pep:`655` para obtener más detalles." #: ../Doc/library/typing.rst:1301 msgid "" @@ -2228,13 +2786,12 @@ msgid "See :class:`TypedDict` and :pep:`655` for more details." msgstr "Véase :class:`TypedDict` y :pep:`655` para más detalle." #: ../Doc/library/typing.rst:1310 -#, fuzzy msgid "" "A special typing construct to mark an item of a :class:`TypedDict` as read-" "only." msgstr "" -"Construcción de tipado especial para marcar una clave :class:`TypedDict` " -"como requerida." +"Una construcción de tipificación especial para marcar un elemento de " +"un :class:`TypedDict` como de solo lectura." #: ../Doc/library/typing.rst:1314 msgid "" @@ -2246,16 +2803,22 @@ msgid "" " m[\"year\"] = 1999 # allowed\n" " m[\"title\"] = \"The Matrix\" # typechecker error" msgstr "" +"class Movie(TypedDict):\n" +" title: ReadOnly[str]\n" +" year: int\n" +"\n" +"def mutate_movie(m: Movie) -> None:\n" +" m[\"year\"] = 1999 # allowed\n" +" m[\"title\"] = \"The Matrix\" # error del verificador de tipos" #: ../Doc/library/typing.rst:1322 -#, fuzzy msgid "There is no runtime checking for this property." -msgstr "No hay ninguna comprobación en tiempo de ejecución de esta propiedad." +msgstr "" +"No hay ninguna comprobación en tiempo de ejecución para esta propiedad." #: ../Doc/library/typing.rst:1324 -#, fuzzy msgid "See :class:`TypedDict` and :pep:`705` for more details." -msgstr "Véase :class:`TypedDict` y :pep:`655` para más detalle." +msgstr "Vea :class:`TypedDict` y :pep:`705` para más detalle." #: ../Doc/library/typing.rst:1330 msgid "Special typing form to add context-specific metadata to an annotation." @@ -2307,18 +2870,17 @@ msgstr "" "deshabilita por completo la verificación de tipos para una función o clase." #: ../Doc/library/typing.rst:1350 -#, fuzzy msgid "" "The responsibility of how to interpret the metadata lies with the tool or " "library encountering an ``Annotated`` annotation. A tool or library " "encountering an ``Annotated`` type can scan through the metadata elements to " "determine if they are of interest (e.g., using :func:`isinstance`)." msgstr "" -"La responsabilidad de cómo interpretar los metadatos recae en la herramienta " -"o biblioteca que encuentre la anotación ``Annotated``. Una herramienta o " +"La responsabilidad de interpretar los metadatos recae en la herramienta o " +"biblioteca que encuentra una anotación ``Annotated``. Una herramienta o " "biblioteca que encuentra un tipo ``Annotated`` puede examinar los elementos " -"de metadatos para determinar si son de interés (por ejemplo, utilizando :" -"func:`isinstance`)." +"de metadatos para determinar si son de interés (por ejemplo, " +"utilizando :func:`isinstance`)." #: ../Doc/library/typing.rst:1358 msgid "" @@ -2339,6 +2901,13 @@ msgid "" "T1 = Annotated[int, ValueRange(-10, 5)]\n" "T2 = Annotated[T1, ValueRange(-20, 3)]" msgstr "" +"@dataclass\n" +"class ValueRange:\n" +" lo: int\n" +" hi: int\n" +"\n" +"T1 = Annotated[int, ValueRange(-10, 5)]\n" +"T2 = Annotated[T1, ValueRange(-20, 3)]" #: ../Doc/library/typing.rst:1371 msgid "Details of the syntax:" @@ -2364,6 +2933,11 @@ msgid "" "\n" "Annotated[int, ValueRange(3, 10), ctype(\"char\")]" msgstr "" +"@dataclass\n" +"class ctype:\n" +" kind: str\n" +"\n" +"Annotated[int, ValueRange(3, 10), ctype(\"char\")]" #: ../Doc/library/typing.rst:1384 msgid "" @@ -2397,6 +2971,9 @@ msgid "" " int, ctype(\"char\"), ValueRange(3, 10)\n" "]" msgstr "" +"assert Annotated[int, ValueRange(3, 10), ctype(\"char\")] != Annotated[\n" +" int, ctype(\"char\"), ValueRange(3, 10)\n" +"]" #: ../Doc/library/typing.rst:1398 msgid "" @@ -2413,6 +2990,10 @@ msgid "" " int, ValueRange(3, 10), ctype(\"char\")\n" "]" msgstr "" +"assert Annotated[Annotated[int, ValueRange(3, 10)], ctype(\"char\")] == " +"Annotated[\n" +" int, ValueRange(3, 10), ctype(\"char\")\n" +"]" #: ../Doc/library/typing.rst:1405 msgid "Duplicated metadata elements are not removed::" @@ -2424,6 +3005,9 @@ msgid "" " int, ValueRange(3, 10), ValueRange(3, 10)\n" "]" msgstr "" +"assert Annotated[int, ValueRange(3, 10)] != Annotated[\n" +" int, ValueRange(3, 10), ValueRange(3, 10)\n" +"]" #: ../Doc/library/typing.rst:1411 msgid "``Annotated`` can be used with nested and generic aliases:" @@ -2442,6 +3026,16 @@ msgid "" "# ``Annotated[list[tuple[int, int]], MaxLen(10)]``:\n" "type V = Vec[int]" msgstr "" +"@dataclass\n" +"class MaxLen:\n" +" value: int\n" +"\n" +"type Vec[T] = Annotated[list[tuple[T, T]], MaxLen(10)]\n" +"\n" +"# Cuando se utiliza en una anotación de tipo, un verificador de tipo tratará " +"\"V\" de la misma manera que\n" +"# ``Annotated[list[tuple[int, int]], MaxLen(10)]``:\n" +"type V = Vec[int]" #: ../Doc/library/typing.rst:1425 msgid "``Annotated`` cannot be used with an unpacked :class:`TypeVarTuple`::" @@ -2450,8 +3044,8 @@ msgstr "" "descomprimido::" #: ../Doc/library/typing.rst:1427 -msgid "type Variadic[*Ts] = Annotated[*Ts, Ann1] # NOT valid" -msgstr "" +msgid "type Variadic[\*Ts] = Annotated[\*Ts, Ann1] # NOT valid" +msgstr "type Variadic[\*Ts] = Annotated[\*Ts, Ann1] # NO válido" #: ../Doc/library/typing.rst:1429 msgid "This would be equivalent to::" @@ -2459,7 +3053,7 @@ msgstr "Esto sería equivalente a:" #: ../Doc/library/typing.rst:1431 msgid "Annotated[T1, T2, T3, ..., Ann1]" -msgstr "" +msgstr "Annotated[T1, T2, T3, ..., Ann1]" #: ../Doc/library/typing.rst:1433 msgid "" @@ -2487,6 +3081,13 @@ msgid "" ">>> get_type_hints(func, include_extras=True)\n" "{'x': typing.Annotated[int, 'metadata'], 'return': }" msgstr "" +">>> from typing import Annotated, get_type_hints\n" +">>> def func(x: Annotated[int, \"metadata\"]) -> None: pass\n" +"...\n" +">>> get_type_hints(func)\n" +"{'x': , 'return': }\n" +">>> get_type_hints(func, include_extras=True)\n" +"{'x': typing.Annotated[int, 'metadata'], 'return': }" #: ../Doc/library/typing.rst:1449 msgid "" @@ -2505,12 +3106,20 @@ msgid "" ">>> X.__metadata__\n" "('very', 'important', 'metadata')" msgstr "" +">>> from typing import Annotated\n" +">>> X = Annotated[int, \"very\", \"important\", \"metadata\"]\n" +">>> X\n" +"typing.Annotated[int, 'very', 'important', 'metadata']\n" +">>> X.__metadata__\n" +"('very', 'important', 'metadata')" #: ../Doc/library/typing.rst:1461 msgid "" "At runtime, if you want to retrieve the original type wrapped by " "``Annotated``, use the :attr:`!__origin__` attribute:" msgstr "" +"En tiempo de ejecución, si desea recuperar el tipo original envuelto por " +"``Annotated``, utilice el atributo :attr:`!__origin__`:" #: ../Doc/library/typing.rst:1464 msgid "" @@ -2519,16 +3128,24 @@ msgid "" ">>> Password.__origin__\n" "" msgstr "" +">>> from typing import Annotated, get_origin\n" +">>> Password = Annotated[str, \"secret\"]\n" +">>> Password.__origin__\n" +"" #: ../Doc/library/typing.rst:1471 msgid "Note that using :func:`get_origin` will return ``Annotated`` itself:" msgstr "" +"Tenga en cuenta que el uso de :func:`get_origin` devolverá el mismo " +"``Annotated``:" #: ../Doc/library/typing.rst:1473 msgid "" ">>> get_origin(Password)\n" "typing.Annotated" msgstr "" +">>> get_origin(Password)\n" +"typing.Annotated" #: ../Doc/library/typing.rst:1480 msgid ":pep:`593` - Flexible function and variable annotations" @@ -2539,28 +3156,26 @@ msgid "The PEP introducing ``Annotated`` to the standard library." msgstr "El PEP introduce ``Annotated`` en la biblioteca estándar." #: ../Doc/library/typing.rst:1488 ../Doc/library/typing.rst:1572 -#, fuzzy msgid "" "Special typing construct for marking user-defined type predicate functions." msgstr "" -"Construcción de tipado especial para marcar funciones de protección de tipo " -"definidas por el usuario." +"Construcción de tipificación especial para marcar funciones de predicado de " +"tipo definido por el usuario." #: ../Doc/library/typing.rst:1490 -#, fuzzy msgid "" "``TypeIs`` can be used to annotate the return type of a user-defined type " "predicate function. ``TypeIs`` only accepts a single type argument. At " "runtime, functions marked this way should return a boolean and take at least " "one positional argument." msgstr "" -"``TypeGuard`` se puede utilizar para anotar el tipo de retorno de una " -"función de protección de tipo definida por el usuario. ``TypeGuard`` solo " -"acepta un único argumento de tipo. En tiempo de ejecución, las funciones " -"marcadas de esta manera deben devolver un valor booleano." +"``TypeIs`` se puede utilizar para anotar el tipo de retorno de una función " +"de predicado de tipo definida por el usuario. ``TypeIs`` solo acepta un " +"único argumento de tipo. En tiempo de ejecución, las funciones marcadas de " +"esta manera deben devolver un valor booleano y tomar al menos un argumento " +"posicional." #: ../Doc/library/typing.rst:1495 -#, fuzzy msgid "" "``TypeIs`` aims to benefit *type narrowing* -- a technique used by static " "type checkers to determine a more precise type of an expression within a " @@ -2569,12 +3184,12 @@ msgid "" "conditional expression here is sometimes referred to as a \"type " "predicate\"::" msgstr "" -"``TypeGuard`` tiene como objetivo beneficiar a *type narrowing*, una técnica " -"utilizada por los validadores de tipo estático para determinar un tipo más " -"preciso de una expresión dentro del flujo de código de un programa. Por lo " -"general, el estrechamiento de tipos se realiza analizando el flujo de código " -"condicional y aplicando el estrechamiento a un bloque de código. La " -"expresión condicional aquí a veces se denomina \"protección de tipo\":" +"``TypeIs`` tiene como objetivo beneficiar a *type narrowing*, una técnica " +"utilizada por los verificadores de tipos estáticos para determinar un tipo " +"más preciso de una expresión dentro del flujo de código de un programa. Por " +"lo general, la restricción de tipos se realiza analizando el flujo de código " +"condicional y aplicando la restricción a un bloque de código. La expresión " +"condicional aquí a veces se denomina \"predicado de tipo\":" #: ../Doc/library/typing.rst:1501 msgid "" @@ -2587,48 +3202,61 @@ msgid "" " # Else, type of ``val`` is narrowed to ``float``.\n" " ..." msgstr "" +"def is_str(val: str | float):\n" +" # \"isinstance\" predicado de tipo\n" +" if isinstance(val, str):\n" +" # Tipo de ``val`` se reduce a ``str``\n" +" ...\n" +" else:\n" +" # De lo contrario, el tipo de ``val`` se limita a ``float``.\n" +" ..." #: ../Doc/library/typing.rst:1510 msgid "" "Sometimes it would be convenient to use a user-defined boolean function as a " -"type predicate. Such a function should use ``TypeIs[...]`` or :data:" -"`TypeGuard` as its return type to alert static type checkers to this " -"intention. ``TypeIs`` usually has more intuitive behavior than " +"type predicate. Such a function should use ``TypeIs[...]`` " +"or :data:`TypeGuard` as its return type to alert static type checkers to " +"this intention. ``TypeIs`` usually has more intuitive behavior than " "``TypeGuard``, but it cannot be used when the input and output types are " "incompatible (e.g., ``list[object]`` to ``list[int]``) or when the function " "does not return ``True`` for all instances of the narrowed type." msgstr "" +"A veces sería conveniente utilizar una función booleana definida por el " +"usuario como predicado de tipo. Dicha función debería utilizar " +"``TypeIs[...]`` o :data:`TypeGuard` como su tipo de retorno para alertar a " +"los verificadores de tipos estáticos sobre esta intención. ``TypeIs`` suele " +"tener un comportamiento más intuitivo que ``TypeGuard``, pero no se puede " +"utilizar cuando los tipos de entrada y salida son incompatibles (por " +"ejemplo, ``list[object]`` a ``list[int]``) o cuando la función no devuelve " +"``True`` para todas las instancias del tipo restringido." #: ../Doc/library/typing.rst:1518 -#, fuzzy msgid "" "Using ``-> TypeIs[NarrowedType]`` tells the static type checker that for a " "given function:" msgstr "" -"El uso de ``-> TypeGuard`` le dice al validador de tipo estático que para " -"una función determinada:" +"El uso de ``-> TypeIs[NarrowedType]`` le indica al verificador de tipo " +"estático que para una función determinada:" #: ../Doc/library/typing.rst:1521 ../Doc/library/typing.rst:1582 msgid "The return value is a boolean." msgstr "El valor de retorno es un booleano." #: ../Doc/library/typing.rst:1522 -#, fuzzy msgid "" "If the return value is ``True``, the type of its argument is the " "intersection of the argument's original type and ``NarrowedType``." msgstr "" -"Si el valor de retorno es ``True``, el tipo de su argumento es el tipo " -"dentro de ``TypeGuard``." +"Si el valor de retorno es ``True``, el tipo de su argumento es la " +"intersección del tipo original del argumento y ``NarrowedType``." #: ../Doc/library/typing.rst:1524 -#, fuzzy msgid "" "If the return value is ``False``, the type of its argument is narrowed to " "exclude ``NarrowedType``." msgstr "" -"Si el valor de retorno es ``True``, el tipo de su argumento es el tipo " -"dentro de ``TypeGuard``." +"Si el valor de retorno es ``False``, el tipo de su argumento se limita para " +"excluir ``NarrowedType``." #: ../Doc/library/typing.rst:1529 msgid "" @@ -2653,6 +3281,26 @@ msgid "" " # so only ``Unrelated`` is left.\n" " assert_type(arg, Unrelated)" msgstr "" +"from typing import assert_type, final, TypeIs\n" +"\n" +"class Parent: pass\n" +"class Child(Parent): pass\n" +"@final\n" +"class Unrelated: pass\n" +"\n" +"def is_parent(val: object) -> TypeIs[Parent]:\n" +" return isinstance(val, Parent)\n" +"\n" +"def run(arg: Child | Unrelated):\n" +" if is_parent(arg):\n" +" # El tipo de ``arg`` es reducido a la intersección\n" +" # de ``Parent`` y ``Child``, lo cual es equivalente a\n" +" # ``Child``.\n" +" assert_type(arg, Child)\n" +" else:\n" +" # El tipo de ``arg`` es reducido para excluir ``Parent``,\n" +" # para que solo quede ``Unrelated``.\n" +" assert_type(arg, Unrelated)" #: ../Doc/library/typing.rst:1550 msgid "" @@ -2662,37 +3310,40 @@ msgid "" "behavior in the type system; it is the user's responsibility to write such " "functions in a type-safe manner." msgstr "" +"El tipo dentro de ``TypeIs`` debe ser coherente con el tipo del argumento de " +"la función; si no lo es, los comprobadores de tipos estáticos generarán un " +"error. Una función ``TypeIs`` escrita incorrectamente puede provocar un " +"comportamiento incorrecto en el sistema de tipos; es responsabilidad del " +"usuario escribir dichas funciones de manera segura." #: ../Doc/library/typing.rst:1556 -#, fuzzy msgid "" "If a ``TypeIs`` function is a class or instance method, then the type in " "``TypeIs`` maps to the type of the second parameter (after ``cls`` or " "``self``)." msgstr "" -"Si ``is_str_list`` es un método de clase o instancia, entonces el tipo en " -"``TypeGuard`` se asigna al tipo del segundo parámetro después de ``cls`` o " -"``self``." +"Si una función ``TypeIs`` es un método de clase o instancia, entonces el " +"tipo en ``TypeIs`` se asigna al tipo del segundo parámetro (después de " +"``cls`` o ``self``)." #: ../Doc/library/typing.rst:1560 -#, fuzzy msgid "" "In short, the form ``def foo(arg: TypeA) -> TypeIs[TypeB]: ...``, means that " "if ``foo(arg)`` returns ``True``, then ``arg`` is an instance of ``TypeB``, " "and if it returns ``False``, it is not an instance of ``TypeB``." msgstr "" -"En resumen, la forma ``def foo(arg: TypeA) -> TypeGuard[TypeB]: ...`` " -"significa que si ``foo(arg)`` retorna ``True``, entonces ``arg`` se estrecha " -"de ``TypeA`` a ``TypeB``." +"En resumen, la forma ``def foo(arg: TypeA) -> TypeIs[TypeB]: ...``, " +"significa que si ``foo(arg)`` devuelve ``True``, entonces ``arg`` es una " +"instancia de ``TypeB``, y si devuelve ``False``, no es una instancia de " +"``TypeB``." #: ../Doc/library/typing.rst:1564 -#, fuzzy msgid "" -"``TypeIs`` also works with type variables. For more information, see :pep:" -"`742` (Narrowing types with ``TypeIs``)." +"``TypeIs`` also works with type variables. For more information, " +"see :pep:`742` (Narrowing types with ``TypeIs``)." msgstr "" -"``TypeGuard`` también funciona con variables de tipo. Véase :pep:`647` para " -"más detalles." +"``TypeIs`` también funciona con variables de tipo. Para obtener más " +"información, consulte :pep:`742` (Restringir tipos con ``TypeIs``)." #: ../Doc/library/typing.rst:1574 msgid "" @@ -2701,6 +3352,11 @@ msgid "" "similarly to :data:`TypeIs`, but has subtly different effects on type " "checking behavior (see below)." msgstr "" +"Las funciones de predicado de tipo son funciones definidas por el usuario " +"que indican si su argumento es una instancia de un tipo en particular. " +"``TypeGuard`` funciona de manera similar a :data:`TypeIs`, pero tiene " +"efectos ligeramente diferentes en el comportamiento de verificación de tipo " +"(ver a continuación)." #: ../Doc/library/typing.rst:1579 msgid "" @@ -2740,24 +3396,33 @@ msgid "" " # Type of ``val`` remains as ``list[object]``.\n" " print(\"Not a list of strings!\")" msgstr "" +"def is_str_list(val: list[object]) -> TypeGuard[list[str]]:\n" +" '''Determines whether all objects in the list are strings'''\n" +" return all(isinstance(x, str) for x in val)\n" +"\n" +"def func1(val: list[object]):\n" +" if is_str_list(val):\n" +" # El tipo de ``val`` es reducido a ``list[str]``.\n" +" print(\" \".join(val))\n" +" else:\n" +" # El tipo de ``val`` se mantiene como ``list[object]``.\n" +" print(\"Not a list of strings!\")" #: ../Doc/library/typing.rst:1602 msgid "``TypeIs`` and ``TypeGuard`` differ in the following ways:" -msgstr "" +msgstr "``TypeIs`` y ``TypeGuard`` se diferencian en los siguientes aspectos:" #: ../Doc/library/typing.rst:1604 -#, fuzzy msgid "" "``TypeIs`` requires the narrowed type to be a subtype of the input type, " "while ``TypeGuard`` does not. The main reason is to allow for things like " "narrowing ``list[object]`` to ``list[str]`` even though the latter is not a " "subtype of the former, since ``list`` is invariant." msgstr "" -"No es necesario que ``TypeB`` sea una forma más estrecha de ``TypeA``; " -"incluso puede ser una forma más amplia. La razón principal es permitir cosas " -"como reducir ``List[object]`` a ``List[str]`` aunque este último no sea un " -"subtipo del primero, ya que ``List`` es invariante. La responsabilidad de " -"escribir protecciones de tipo seguras se deja al usuario." +"``TypeIs`` requiere que el tipo restringido sea un subtipo del tipo de " +"entrada, mientras que ``TypeGuard`` no lo requiere. La razón principal es " +"permitir cosas como restringir ``list[object]`` a ``list[str]``, aunque este " +"último no sea un subtipo del primero, ya que ``list`` es invariante." #: ../Doc/library/typing.rst:1608 msgid "" @@ -2767,6 +3432,12 @@ msgid "" "combining the previously known type of the variable with the ``TypeIs`` " "type. (Technically, this is known as an intersection type.)" msgstr "" +"Cuando una función ``TypeGuard`` devuelve ``True``, los verificadores de " +"tipo limitan el tipo de la variable exactamente al tipo ``TypeGuard``. " +"Cuando una función ``TypeIs`` devuelve ``True``, los verificadores de tipo " +"pueden inferir un tipo más preciso combinando el tipo conocido previamente " +"de la variable con el tipo ``TypeIs``. (Técnicamente, esto se conoce como un " +"tipo de intersección)." #: ../Doc/library/typing.rst:1612 msgid "" @@ -2775,6 +3446,10 @@ msgid "" "``False``, type checkers can narrow the type of the variable to exclude the " "``TypeIs`` type." msgstr "" +"Cuando una función ``TypeGuard`` devuelve ``False``, los verificadores de " +"tipo no pueden limitar el tipo de la variable en absoluto. Cuando una " +"función ``TypeIs`` devuelve ``False``, los verificadores de tipo pueden " +"limitar el tipo de la variable para excluir el tipo ``TypeIs``." #: ../Doc/library/typing.rst:1621 msgid "Typing operator to conceptually mark an object as having been unpacked." @@ -2783,15 +3458,14 @@ msgstr "" "desempaquetado." #: ../Doc/library/typing.rst:1623 -#, fuzzy msgid "" "For example, using the unpack operator ``*`` on a :ref:`type variable tuple " "` is equivalent to using ``Unpack`` to mark the type variable " "tuple as having been unpacked::" msgstr "" -"Por ejemplo, usar el operador de desempaquetamiento ``*`` en una :class:" -"`tupla de variable de tipo ` es equivalente a usar ``Unpack`` " -"para marcar la tupla de variable de tipo como desempaquetada::" +"Por ejemplo, usar el operador de descompresión ``*`` en un :ref:`type " +"variable tuple ` es equivalente a usar ``Unpack`` para marcar " +"la tupla de variable de tipo como descomprimida:" #: ../Doc/library/typing.rst:1627 msgid "" @@ -2800,6 +3474,10 @@ msgid "" "# Effectively does:\n" "tup: tuple[Unpack[Ts]]" msgstr "" +"Ts = TypeVarTuple('Ts')\n" +"tup: tuple[*Ts]\n" +"# Effectively does:\n" +"tup: tuple[Unpack[Ts]]" #: ../Doc/library/typing.rst:1632 msgid "" @@ -2809,10 +3487,10 @@ msgid "" "versions of Python, where ``*`` couldn't be used in certain places::" msgstr "" "De hecho, ``Unpack`` se puede usar indistintamente con ``*`` en el contexto " -"de los tipos :class:`typing.TypeVarTuple ` y :class:`builtins." -"tuple `. Es posible que veas que ``Unpack`` se usa explícitamente en " -"versiones anteriores de Python, donde ``*`` no se podía usar en ciertos " -"lugares::" +"de los tipos :class:`typing.TypeVarTuple ` " +"y :class:`builtins.tuple `. Es posible que veas que ``Unpack`` se usa " +"explícitamente en versiones anteriores de Python, donde ``*`` no se podía " +"usar en ciertos lugares::" #: ../Doc/library/typing.rst:1638 msgid "" @@ -2824,6 +3502,14 @@ msgid "" "tup: tuple[*Ts] # Syntax error on Python <= 3.10!\n" "tup: tuple[Unpack[Ts]] # Semantically equivalent, and backwards-compatible" msgstr "" +"# En versiones anteriores de Python, TypeVarTuple y Unpack\n" +"# se encuentran en el paquete de retroadaptación `typing_extensions`.\n" +"from typing_extensions import TypeVarTuple, Unpack\n" +"\n" +"Ts = TypeVarTuple('Ts')\n" +"tup: tuple[*Ts] # Error de sintaxis en Python <= 3.10!\n" +"tup: tuple[Unpack[Ts]] # Equivalente semánticamente, y compatible con " +"versiones anteriores" #: ../Doc/library/typing.rst:1646 msgid "" @@ -2845,6 +3531,16 @@ msgid "" "# and `year` of type `int`.\n" "def foo(**kwargs: Unpack[Movie]): ..." msgstr "" +"from typing import TypedDict, Unpack\n" +"\n" +"class Movie(TypedDict):\n" +" name: str\n" +" year: int\n" +"\n" +"# Esta función espera dos argumentos de palabras clave: `name` de tipo " +"`str`\n" +"# y `year` de tipo `int`.\n" +"def foo(**kwargs: Unpack[Movie]): ..." #: ../Doc/library/typing.rst:1659 msgid "" @@ -2898,6 +3594,10 @@ msgid "" " ...\n" " # Etc." msgstr "" +"class Mapping[KT, VT]:\n" +" def __getitem__(self, key: KT) -> VT:\n" +" ...\n" +" # Etc." #: ../Doc/library/typing.rst:1687 msgid "" @@ -2920,14 +3620,19 @@ msgid "" " except KeyError:\n" " return default" msgstr "" +"def lookup_name[X, Y](mapping: Mapping[X, Y], key: X, default: Y) -> Y:\n" +" try:\n" +" return mapping[key]\n" +" except KeyError:\n" +" return default" #: ../Doc/library/typing.rst:1699 msgid "" "Here the brackets after the function name indicate a :ref:`generic function " "`." msgstr "" -"Aquí los corchetes después del nombre de la función indican una :ref:" -"`función genérica `." +"Aquí los corchetes después del nombre de la función indican " +"una :ref:`función genérica `." #: ../Doc/library/typing.rst:1702 msgid "" @@ -2949,6 +3654,13 @@ msgid "" " ...\n" " # Etc." msgstr "" +"KT = TypeVar('KT')\n" +"VT = TypeVar('VT')\n" +"\n" +"class Mapping(Generic[KT, VT]):\n" +" def __getitem__(self, key: KT) -> VT:\n" +" ...\n" +" # Etc." #: ../Doc/library/typing.rst:1719 msgid "Type variable." @@ -2961,15 +3673,17 @@ msgid "" "`, and :ref:`generic type aliases `::" msgstr "" "La forma preferida de construir una variable de tipo es a través de la " -"sintaxis dedicada para :ref:`funciones genéricas `, :ref:" -"`clases genéricas ` y :ref:`alias de tipo genérico `::" +"sintaxis dedicada para :ref:`funciones genéricas `, :ref:`clases genéricas ` y :ref:`alias de tipo " +"genérico `::" #: ../Doc/library/typing.rst:1726 msgid "" "class Sequence[T]: # T is a TypeVar\n" " ..." msgstr "" +"class Sequence[T]: # T is a TypeVar\n" +" ..." #: ../Doc/library/typing.rst:1729 msgid "" @@ -2988,6 +3702,13 @@ msgid "" "str or bytes\n" " ..." msgstr "" +"class StrSequence[S: str]: # S es un TypeVar ligado a str\n" +" ...\n" +"\n" +"\n" +"class StrOrBytesSequence[A: (str, bytes)]: # A es un TypeVar limitado a str " +"o bytes\n" +" ..." #: ../Doc/library/typing.rst:1739 msgid "" @@ -3003,6 +3724,9 @@ msgid "" "S = TypeVar('S', bound=str) # Can be any subtype of str\n" "A = TypeVar('A', str, bytes) # Must be exactly str or bytes" msgstr "" +"T = TypeVar('T') # Puede ser cualquier cosa\n" +"S = TypeVar('S', bound=str) # Puede ser cualquier subtipo de str\n" +"A = TypeVar('A', str, bytes) # Tiene que ser exactamente str o bytes" #: ../Doc/library/typing.rst:1745 msgid "" @@ -3013,9 +3737,9 @@ msgid "" msgstr "" "Las variables de tipo existen principalmente para el beneficio de los " "validadores de tipos estáticos. Sirven como parámetros para tipos genéricos, " -"así como para definiciones de alias de tipo y funciones genéricas. Consulte :" -"class:`Generic` para obtener más información sobre tipos genéricos. Las " -"funciones genéricas funcionan de la siguiente manera::" +"así como para definiciones de alias de tipo y funciones genéricas. " +"Consulte :class:`Generic` para obtener más información sobre tipos " +"genéricos. Las funciones genéricas funcionan de la siguiente manera::" #: ../Doc/library/typing.rst:1751 msgid "" @@ -3034,6 +3758,20 @@ msgid "" " \"\"\"Add two strings or bytes objects together.\"\"\"\n" " return x + y" msgstr "" +"def repeat[T](x: T, n: int) -> Sequence[T]:\n" +" \"\"\"Return a list containing n references to x.\"\"\"\n" +" return [x]*n\n" +"\n" +"\n" +"def print_capitalized[S: str](x: S) -> S:\n" +" \"\"\"Print x capitalized, and return x.\"\"\"\n" +" print(x.capitalize())\n" +" return x\n" +"\n" +"\n" +"def concatenate[A: (str, bytes)](x: A, y: A) -> A:\n" +" \"\"\"Add two strings or bytes objects together.\"\"\"\n" +" return x + y" #: ../Doc/library/typing.rst:1766 msgid "" @@ -3085,6 +3823,16 @@ msgid "" "\n" "z = print_capitalized(45) # error: int is not a subtype of str" msgstr "" +"x = print_capitalized('a string')\n" +"reveal_type(x) # el tipo revelado es str\n" +"\n" +"class StringSubclass(str):\n" +" pass\n" +"\n" +"y = print_capitalized(StringSubclass('another string'))\n" +"reveal_type(y) # revealed type is StringSubclass\n" +"\n" +"z = print_capitalized(45) # error: int no es un subtipo de str" #: ../Doc/library/typing.rst:1792 msgid "" @@ -3104,6 +3852,14 @@ msgid "" "bytes\n" "V = TypeVar('V', bound=SupportsAbs) # Can be anything with an __abs__ method" msgstr "" +"# Puede ser cualquier cosa con un método __abs__\n" +"def print_abs[T: SupportsAbs](arg: T) -> None:\n" +" print(\"Absolute value:\", abs(arg))\n" +"\n" +"U = TypeVar('U', bound=str|bytes) # Puede ser cualquier subtipo de la unión " +"str|bytes\n" +"V = TypeVar('V', bound=SupportsAbs) # Puede ser cualquier cosa con un " +"método __abs__" #: ../Doc/library/typing.rst:1804 msgid "" @@ -3126,6 +3882,14 @@ msgid "" "c = concatenate('one', b'two') # error: type variable 'A' can be either str " "or bytes in a function call, but not both" msgstr "" +"a = concatenate('one', 'two')\n" +"reveal_type(a) # tipo revelado es str\n" +"\n" +"b = concatenate(StringSubclass('one'), StringSubclass('two'))\n" +"reveal_type(b) # tipo revelado es str, a pesar que se pasa StringSubclass\n" +"\n" +"c = concatenate('one', b'two') # error: la variable de tipo 'A' puede ser " +"str o bytes en una llamada a función, pero no ambas" #: ../Doc/library/typing.rst:1815 msgid "At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`." @@ -3177,22 +3941,28 @@ msgid "" msgstr "" "Para las variables de tipo creadas a través de la :ref:`sintáxis de " "parámetros de tipo `, las restricciones se evalúan solo cuando " -"se accede al atributo, no cuando se crea la variable de tipo (consulte :ref:" -"`lazy-evaluation`)." +"se accede al atributo, no cuando se crea la variable de tipo " +"(consulte :ref:`lazy-evaluation`)." #: ../Doc/library/typing.rst:1857 msgid "" "The default value of the type variable, or :data:`typing.NoDefault` if it " "has no default." msgstr "" +"El valor predeterminado de la variable de tipo, o :data:`typing.NoDefault` " +"si no tiene valor predeterminado." #: ../Doc/library/typing.rst:1864 msgid "" "Return whether or not the type variable has a default value. This is " -"equivalent to checking whether :attr:`__default__` is not the :data:`typing." -"NoDefault` singleton, except that it does not force evaluation of the :ref:" -"`lazily evaluated ` default value." +"equivalent to checking whether :attr:`__default__` is not " +"the :data:`typing.NoDefault` singleton, except that it does not force " +"evaluation of the :ref:`lazily evaluated ` default value." msgstr "" +"Devuelve si la variable de tipo tiene o no un valor predeterminado. Esto es " +"equivalente a verificar si :attr:`__default__` no es el " +"singleton :data:`typing.NoDefault`, excepto que no fuerza la evaluación del " +"valor predeterminado :ref:`lazily evaluated `." #: ../Doc/library/typing.rst:1873 msgid "" @@ -3200,24 +3970,22 @@ msgid "" "params>` syntax introduced by :pep:`695`. The ``infer_variance`` parameter " "was added." msgstr "" -"Ahora es posible declarar variables de tipo utilizando la sintaxis de :ref:" -"`parámetros de tipo ` introducida por :pep:`695`. Se agregó el " -"parámetro ``infer_variance``." +"Ahora es posible declarar variables de tipo utilizando la sintaxis " +"de :ref:`parámetros de tipo ` introducida por :pep:`695`. Se " +"agregó el parámetro ``infer_variance``." #: ../Doc/library/typing.rst:1879 ../Doc/library/typing.rst:2018 #: ../Doc/library/typing.rst:2120 -#, fuzzy msgid "Support for default values was added." -msgstr "Soporte añadido para valores por defecto, métodos y *docstrings*." +msgstr "Se agregó soporte para valores predeterminados." #: ../Doc/library/typing.rst:1885 -#, fuzzy msgid "" "Type variable tuple. A specialized form of :ref:`type variable ` " "that enables *variadic* generics." msgstr "" -"Tupla de variables de tipo. Una versión especializada de :class:`type " -"variables ` que permite genéricos *variádicos*." +"Tupla de variable de tipo. Forma especializada de :ref:`type variable " +"` que habilita genéricos de *variadic*." #: ../Doc/library/typing.rst:1888 msgid "" @@ -3234,6 +4002,9 @@ msgid "" "T]:\n" " return (*tup[1:], tup[0])" msgstr "" +"def move_first_element_to_last[T, *Ts](tup: tuple[T, *Ts]) -> tuple[*Ts, " +"T]:\n" +" return (*tup[1:], tup[0])" #: ../Doc/library/typing.rst:1894 msgid "Or by explicitly invoking the ``TypeVarTuple`` constructor::" @@ -3247,6 +4018,11 @@ msgid "" "def move_first_element_to_last(tup: tuple[T, *Ts]) -> tuple[*Ts, T]:\n" " return (*tup[1:], tup[0])" msgstr "" +"T = TypeVar(\"T\")\n" +"Ts = TypeVarTuple(\"Ts\")\n" +"\n" +"def move_first_element_to_last(tup: tuple[T, *Ts]) -> tuple[*Ts, T]:\n" +" return (*tup[1:], tup[0])" #: ../Doc/library/typing.rst:1902 msgid "" @@ -3279,6 +4055,23 @@ msgid "" "# (at least one element is required)\n" "move_first_element_to_last(tup=())" msgstr "" +"# T está ligado a int, Ts está ligado a ()\n" +"# El valor de retorno es (1,), que tiene tipo tuple[int]\n" +"move_first_element_to_last(tup=(1,))\n" +"\n" +"# T está ligado a int, Ts está ligado a (str,)\n" +"# El valor de retorno es ('spam', 1), que tiene tipo tuple[str, int]\n" +"move_first_element_to_last(tup=(1, 'spam'))\n" +"\n" +"# T está ligado a int, Ts está ligado a (str, float)\n" +"# El valor de retorno es ('spam', 3.0, 1), que tiene tipo tuple[str, float, " +"int]\n" +"move_first_element_to_last(tup=(1, 'spam', 3.0))\n" +"\n" +"# Esto falla al verificar el tipo (y falla en tiempo de ejecución)\n" +"# porque tuple[()] no es compatible con tuple[T, *Ts]\n" +"# (se requiere al menos un elemento)\n" +"move_first_element_to_last(tup=())" #: ../Doc/library/typing.rst:1924 msgid "" @@ -3311,6 +4104,9 @@ msgid "" "x: tuple[Ts] # Not valid\n" "x: tuple[*Ts] # The correct way to do it" msgstr "" +"x: Ts # No válido\n" +"x: tuple[Ts] # No válido\n" +"x: tuple[*Ts] # La forma correcta de hacerlo" #: ../Doc/library/typing.rst:1939 msgid "" @@ -3328,6 +4124,10 @@ msgid "" " def __abs__(self) -> \"Array[*Shape]\": ...\n" " def get_shape(self) -> tuple[*Shape]: ..." msgstr "" +"class Array[*Shape]:\n" +" def __getitem__(self, key: tuple[*Shape]) -> float: ...\n" +" def __abs__(self) -> \"Array[*Shape]\": ...\n" +" def get_shape(self) -> tuple[*Shape]: ..." #: ../Doc/library/typing.rst:1947 msgid "" @@ -3350,6 +4150,17 @@ msgid "" "float_array_1d: Array[float, Height] = Array() # Totally fine\n" "int_array_2d: Array[int, Height, Width] = Array() # Yup, fine too" msgstr "" +"class Array[DType, *Shape]: # Esto está bien\n" +" pass\n" +"\n" +"class Array2[*Shape, DType]: # Esto también está bien\n" +" pass\n" +"\n" +"class Height: ...\n" +"class Width: ...\n" +"\n" +"float_array_1d: Array[float, Height] = Array() # Totalmente bien\n" +"int_array_2d: Array[int, Height, Width] = Array() # Sip, también está bien" #: ../Doc/library/typing.rst:1963 msgid "" @@ -3365,6 +4176,9 @@ msgid "" "class Array[*Shape, *Shape]: # Not valid\n" " pass" msgstr "" +"x: tuple[*Ts, *Ts] # Not valid\n" +"class Array[*Shape, *Shape]: # Not valid\n" +" pass" #: ../Doc/library/typing.rst:1970 msgid "" @@ -3383,6 +4197,12 @@ msgid "" " ...\n" " callback(*args)" msgstr "" +"def call_soon[*Ts](\n" +" callback: Callable[[*Ts], None],\n" +" *args: *Ts\n" +") -> None:\n" +" ...\n" +" callback(*args)" #: ../Doc/library/typing.rst:1980 msgid "" @@ -3414,14 +4234,20 @@ msgid "" "The default value of the type variable tuple, or :data:`typing.NoDefault` if " "it has no default." msgstr "" +"El valor predeterminado de la variable de tipo tupla, " +"o :data:`typing.NoDefault` si no tiene valor predeterminado." #: ../Doc/library/typing.rst:2002 msgid "" "Return whether or not the type variable tuple has a default value. This is " -"equivalent to checking whether :attr:`__default__` is not the :data:`typing." -"NoDefault` singleton, except that it does not force evaluation of the :ref:" -"`lazily evaluated ` default value." +"equivalent to checking whether :attr:`__default__` is not " +"the :data:`typing.NoDefault` singleton, except that it does not force " +"evaluation of the :ref:`lazily evaluated ` default value." msgstr "" +"Devuelve si la variable de tipo tupla tiene o no un valor predeterminado. " +"Esto es equivalente a verificar si :attr:`__default__` no es el " +"singleton :data:`typing.NoDefault`, excepto que no fuerza la evaluación del " +"valor predeterminado :ref:`lazily evaluated `." #: ../Doc/library/typing.rst:2013 msgid "" @@ -3432,13 +4258,12 @@ msgstr "" "de :ref:`parámetros de tipo ` introducida por :pep:`695`." #: ../Doc/library/typing.rst:2022 -#, fuzzy msgid "" "Parameter specification variable. A specialized version of :ref:`type " "variables `." msgstr "" -"Variable de especificación de parámetros. Una versión especializada de :" -"class:`type variables `." +"Variable de especificación de parámetros. Versión especializada " +"de :ref:`type variables `." #: ../Doc/library/typing.rst:2025 msgid "" @@ -3451,7 +4276,7 @@ msgstr "" #: ../Doc/library/typing.rst:2028 msgid "type IntFunc[**P] = Callable[P, int]" -msgstr "" +msgstr "type IntFunc[**P] = Callable[P, int]" #: ../Doc/library/typing.rst:2030 msgid "" @@ -3463,7 +4288,7 @@ msgstr "" #: ../Doc/library/typing.rst:2033 msgid "P = ParamSpec('P')" -msgstr "" +msgstr "P = ParamSpec('P')" #: ../Doc/library/typing.rst:2035 msgid "" @@ -3512,6 +4337,20 @@ msgid "" " '''Add two numbers together.'''\n" " return x + y" msgstr "" +"from collections.abc import Callable\n" +"import logging\n" +"\n" +"def add_logging[T, **P](f: Callable[P, T]) -> Callable[P, T]:\n" +" '''A type-safe decorator to add logging to a function.'''\n" +" def inner(*args: P.args, **kwargs: P.kwargs) -> T:\n" +" logging.info(f'{f.__name__} was called')\n" +" return f(*args, **kwargs)\n" +" return inner\n" +"\n" +"@add_logging\n" +"def add_two(x: float, y: float) -> float:\n" +" '''Add two numbers together.'''\n" +" return x + y" #: ../Doc/library/typing.rst:2062 msgid "" @@ -3543,15 +4382,15 @@ msgstr "" #: ../Doc/library/typing.rst:2075 msgid "" -"Since ``ParamSpec`` captures both positional and keyword parameters, ``P." -"args`` and ``P.kwargs`` can be used to split a ``ParamSpec`` into its " +"Since ``ParamSpec`` captures both positional and keyword parameters, " +"``P.args`` and ``P.kwargs`` can be used to split a ``ParamSpec`` into its " "components. ``P.args`` represents the tuple of positional parameters in a " "given call and should only be used to annotate ``*args``. ``P.kwargs`` " "represents the mapping of keyword parameters to their values in a given " "call, and should be only be used to annotate ``**kwargs``. Both attributes " "require the annotated parameter to be in scope. At runtime, ``P.args`` and " -"``P.kwargs`` are instances respectively of :class:`ParamSpecArgs` and :class:" -"`ParamSpecKwargs`." +"``P.kwargs`` are instances respectively of :class:`ParamSpecArgs` " +"and :class:`ParamSpecKwargs`." msgstr "" "Dado que ``ParamSpec`` captura tanto parámetros posicionales como de " "palabras clave, ``P.args`` y ``P.kwargs`` se pueden utilizar para dividir un " @@ -3561,8 +4400,8 @@ msgstr "" "palabras clave a sus valores en una llamada determinada y solo debe usarse " "para anotar ``**kwargs``. Ambos atributos requieren que el parámetro anotado " "esté dentro del alcance. En tiempo de ejecución, ``P.args`` y ``P.kwargs`` " -"son instancias respectivamente de :class:`ParamSpecArgs` y :class:" -"`ParamSpecKwargs`." +"son instancias respectivamente de :class:`ParamSpecArgs` " +"y :class:`ParamSpecKwargs`." #: ../Doc/library/typing.rst:2087 msgid "The name of the parameter specification." @@ -3570,25 +4409,31 @@ msgstr "El nombre de la especificación del parámetro." #: ../Doc/library/typing.rst:2091 msgid "" -"The default value of the parameter specification, or :data:`typing." -"NoDefault` if it has no default." +"The default value of the parameter specification, " +"or :data:`typing.NoDefault` if it has no default." msgstr "" +"El valor predeterminado de la especificación del parámetro, " +"o :data:`typing.NoDefault` si no tiene valor predeterminado." #: ../Doc/library/typing.rst:2098 msgid "" "Return whether or not the parameter specification has a default value. This " -"is equivalent to checking whether :attr:`__default__` is not the :data:" -"`typing.NoDefault` singleton, except that it does not force evaluation of " -"the :ref:`lazily evaluated ` default value." +"is equivalent to checking whether :attr:`__default__` is not " +"the :data:`typing.NoDefault` singleton, except that it does not force " +"evaluation of the :ref:`lazily evaluated ` default value." msgstr "" +"Devuelve si la especificación del parámetro tiene o no un valor " +"predeterminado. Esto es equivalente a verificar si :attr:`__default__` no es " +"el singleton :data:`typing.NoDefault`, excepto que no fuerza la evaluación " +"del valor predeterminado :ref:`lazily evaluated `." #: ../Doc/library/typing.rst:2105 msgid "" "Parameter specification variables created with ``covariant=True`` or " "``contravariant=True`` can be used to declare covariant or contravariant " -"generic types. The ``bound`` argument is also accepted, similar to :class:" -"`TypeVar`. However the actual semantics of these keywords are yet to be " -"decided." +"generic types. The ``bound`` argument is also accepted, similar " +"to :class:`TypeVar`. However the actual semantics of these keywords are yet " +"to be decided." msgstr "" "Las variables de especificación de parámetros creadas con ``covariant=True`` " "o ``contravariant=True`` se pueden utilizar para declarar tipos genéricos " @@ -3602,8 +4447,8 @@ msgid "" "` syntax introduced by :pep:`695`." msgstr "" "Las especificaciones de parámetros ahora se pueden declarar utilizando la " -"sintaxis de :ref:`parámetros de tipo ` introducida por :pep:" -"`695`." +"sintaxis de :ref:`parámetros de tipo ` introducida " +"por :pep:`695`." #: ../Doc/library/typing.rst:2123 msgid "" @@ -3619,16 +4464,18 @@ msgstr ":data:`Concatenate`" #: ../Doc/library/typing.rst:2135 msgid "" -"Arguments and keyword arguments attributes of a :class:`ParamSpec`. The ``P." -"args`` attribute of a ``ParamSpec`` is an instance of ``ParamSpecArgs``, and " -"``P.kwargs`` is an instance of ``ParamSpecKwargs``. They are intended for " -"runtime introspection and have no special meaning to static type checkers." +"Arguments and keyword arguments attributes of a :class:`ParamSpec`. The " +"``P.args`` attribute of a ``ParamSpec`` is an instance of ``ParamSpecArgs``, " +"and ``P.kwargs`` is an instance of ``ParamSpecKwargs``. They are intended " +"for runtime introspection and have no special meaning to static type " +"checkers." msgstr "" -"Argumentos y atributos de argumentos de palabras clave de un :class:" -"`ParamSpec`. El atributo ``P.args`` de un ``ParamSpec`` es una instancia de " -"``ParamSpecArgs`` y ``P.kwargs`` es una instancia de ``ParamSpecKwargs``. " -"Están pensados para la introspección en tiempo de ejecución y no tienen un " -"significado especial para los validadores de tipo estático." +"Argumentos y atributos de argumentos de palabras clave de " +"un :class:`ParamSpec`. El atributo ``P.args`` de un ``ParamSpec`` es una " +"instancia de ``ParamSpecArgs`` y ``P.kwargs`` es una instancia de " +"``ParamSpecKwargs``. Están pensados para la introspección en tiempo de " +"ejecución y no tienen un significado especial para los validadores de tipo " +"estático." #: ../Doc/library/typing.rst:2140 msgid "" @@ -3647,6 +4494,12 @@ msgid "" ">>> get_origin(P.kwargs) is P\n" "True" msgstr "" +">>> from typing import ParamSpec, get_origin\n" +">>> P = ParamSpec(\"P\")\n" +">>> get_origin(P.args) is P\n" +"True\n" +">>> get_origin(P.kwargs) is P\n" +"True" #: ../Doc/library/typing.rst:2157 msgid "The type of type aliases created through the :keyword:`type` statement." @@ -3659,6 +4512,9 @@ msgid "" ">>> type(Alias)\n" "" msgstr "" +">>> type Alias = int\n" +">>> type(Alias)\n" +"" #: ../Doc/library/typing.rst:2171 msgid "The name of the type alias:" @@ -3670,6 +4526,9 @@ msgid "" ">>> Alias.__name__\n" "'Alias'" msgstr "" +">>> type Alias = int\n" +">>> Alias.__name__\n" +"'Alias'" #: ../Doc/library/typing.rst:2181 msgid "The module in which the type alias was defined::" @@ -3681,6 +4540,9 @@ msgid "" ">>> Alias.__module__\n" "'__main__'" msgstr "" +">>> type Alias = int\n" +">>> Alias.__module__\n" +"'__main__'" #: ../Doc/library/typing.rst:2189 msgid "" @@ -3699,6 +4561,12 @@ msgid "" ">>> NotGeneric.__type_params__\n" "()" msgstr "" +">>> type ListOrSet[T] = list[T] | set[T]\n" +">>> ListOrSet.__type_params__\n" +"(T,)\n" +">>> type NotGeneric = int\n" +">>> NotGeneric.__type_params__\n" +"()" #: ../Doc/library/typing.rst:2203 msgid "" @@ -3723,6 +4591,16 @@ msgid "" ">>> Recursive.__value__\n" "Mutually" msgstr "" +">>> type Mutually = Recursive\n" +">>> type Recursive = Mutually\n" +">>> Mutually\n" +"Mutually\n" +">>> Recursive\n" +"Recursive\n" +">>> Mutually.__value__\n" +"Recursive\n" +">>> Recursive.__value__\n" +"Mutually" #: ../Doc/library/typing.rst:2221 msgid "Other special directives" @@ -3753,6 +4631,9 @@ msgid "" " name: str\n" " id: int" msgstr "" +"class Employee(NamedTuple):\n" +" name: str\n" +" id: int" #: ../Doc/library/typing.rst:2237 msgid "This is equivalent to::" @@ -3760,7 +4641,7 @@ msgstr "Esto es equivalente a::" #: ../Doc/library/typing.rst:2239 msgid "Employee = collections.namedtuple('Employee', ['name', 'id'])" -msgstr "" +msgstr "Employee = collections.namedtuple('Employee', ['name', 'id'])" #: ../Doc/library/typing.rst:2241 msgid "" @@ -3778,6 +4659,12 @@ msgid "" "employee = Employee('Guido')\n" "assert employee.id == 3" msgstr "" +"class Employee(NamedTuple):\n" +" name: str\n" +" id: int = 3\n" +"\n" +"employee = Employee('Guido')\n" +"assert employee.id == 3" #: ../Doc/library/typing.rst:2250 msgid "" @@ -3815,6 +4702,13 @@ msgid "" " def __repr__(self) -> str:\n" " return f''" msgstr "" +"class Employee(NamedTuple):\n" +" \"\"\"Represents an employee.\"\"\"\n" +" name: str\n" +" id: int = 3\n" +"\n" +" def __repr__(self) -> str:\n" +" return f''" #: ../Doc/library/typing.rst:2268 msgid "``NamedTuple`` subclasses can be generic::" @@ -3826,6 +4720,9 @@ msgid "" " key: T\n" " group: list[T]" msgstr "" +"class Group[T](NamedTuple):\n" +" key: T\n" +" group: list[T]" #: ../Doc/library/typing.rst:2274 msgid "Backward-compatible usage::" @@ -3843,12 +4740,21 @@ msgid "" "# A functional syntax is also supported\n" "Employee = NamedTuple('Employee', [('name', str), ('id', int)])" msgstr "" +"# Para crear un NamedTuple genérico en Python 3.11\n" +"T = TypeVar(\"T\")\n" +"\n" +"class Group(NamedTuple, Generic[T]):\n" +" key: T\n" +" group: list[T]\n" +"\n" +"# También se admite una sintaxis funcional\n" +"Employee = NamedTuple('Employee', [('name', str), ('id', int)])" #: ../Doc/library/typing.rst:2286 msgid "Added support for :pep:`526` variable annotation syntax." msgstr "" -"Soporte añadido para la sintaxis de anotación de variables propuesto en :pep:" -"`526`." +"Soporte añadido para la sintaxis de anotación de variables propuesto " +"en :pep:`526`." #: ../Doc/library/typing.rst:2289 msgid "Added support for default values, methods, and docstrings." @@ -3880,6 +4786,10 @@ msgid "" "(``NT = NamedTuple(\"NT\", x=int)``) is deprecated, and will be disallowed " "in 3.15. Use the class-based syntax or the functional syntax instead." msgstr "" +"La sintaxis de argumentos de palabras clave no documentada para crear clases " +"NamedTuple (``NT = NamedTuple(\"NT\", x=int)``) está obsoleta y no se " +"permitirá en la versión 3.15. En su lugar, utilice la sintaxis basada en " +"clases o la sintaxis funcional." #: ../Doc/library/typing.rst:2308 msgid "" @@ -3890,6 +4800,12 @@ msgid "" "Python 3.15. To create a NamedTuple class with 0 fields, use ``class " "NT(NamedTuple): pass`` or ``NT = NamedTuple(\"NT\", [])``." msgstr "" +"Al utilizar la sintaxis funcional para crear una clase NamedTuple, no se " +"permite pasar un valor al parámetro 'campos' (``NT = NamedTuple(\"NT\")``). " +"También se permite pasar ``None`` al parámetro 'campos' (``NT = " +"NamedTuple(\"NT\", None)``). Ambos métodos no estarán permitidos en Python " +"3.15. Para crear una clase NamedTuple con 0 campos, utilice ``class " +"NT(NamedTuple): pass`` o ``NT = NamedTuple(\"NT\", [])``." #: ../Doc/library/typing.rst:2318 msgid "Helper class to create low-overhead :ref:`distinct types `." @@ -3912,6 +4828,9 @@ msgid "" "first_user = UserId(1) # \"UserId\" returns the argument unchanged at " "runtime" msgstr "" +"UserId = NewType('UserId', int) # Declara el NewType \"UserId\"\n" +"first_user = UserId(1) # \"UserId\" retorna el argumento sin cambios en " +"runtime" #: ../Doc/library/typing.rst:2330 msgid "The module in which the new type is defined." @@ -3943,6 +4862,9 @@ msgid "" " def meth(self) -> int:\n" " ..." msgstr "" +"class Proto(Protocol):\n" +" def meth(self) -> int:\n" +" ..." #: ../Doc/library/typing.rst:2355 msgid "" @@ -3963,18 +4885,26 @@ msgid "" "\n" "func(C()) # Passes static type check" msgstr "" +"class C:\n" +" def meth(self) -> int:\n" +" return 0\n" +"\n" +"def func(x: Proto) -> int:\n" +" return x.meth()\n" +"\n" +"func(C()) # Pasa la verificación de tipos estática" #: ../Doc/library/typing.rst:2367 msgid "" -"See :pep:`544` for more details. Protocol classes decorated with :func:" -"`runtime_checkable` (described later) act as simple-minded runtime protocols " -"that check only the presence of given attributes, ignoring their type " -"signatures." +"See :pep:`544` for more details. Protocol classes decorated " +"with :func:`runtime_checkable` (described later) act as simple-minded " +"runtime protocols that check only the presence of given attributes, ignoring " +"their type signatures." msgstr "" -"Véase :pep:`544` para más detalles. Las clases protocolo decoradas con :func:" -"`runtime_checkable` (descrito más adelante) se comportan como protocolos " -"simplistas en tiempo de ejecución que solo comprueban la presencia de " -"atributos dados, ignorando su firma de tipo." +"Véase :pep:`544` para más detalles. Las clases protocolo decoradas " +"con :func:`runtime_checkable` (descrito más adelante) se comportan como " +"protocolos simplistas en tiempo de ejecución que solo comprueban la " +"presencia de atributos dados, ignorando su firma de tipo." #: ../Doc/library/typing.rst:2372 msgid "Protocol classes can be generic, for example::" @@ -3986,6 +4916,9 @@ msgid "" " def meth(self) -> T:\n" " ..." msgstr "" +"class GenProto[T](Protocol):\n" +" def meth(self) -> T:\n" +" ..." #: ../Doc/library/typing.rst:2378 msgid "" @@ -4003,6 +4936,11 @@ msgid "" " def meth(self) -> T:\n" " ..." msgstr "" +"T = TypeVar(\"T\")\n" +"\n" +"class GenProto(Protocol[T]):\n" +" def meth(self) -> T:\n" +" ..." #: ../Doc/library/typing.rst:2391 msgid "Mark a protocol class as a runtime protocol." @@ -4015,14 +4953,14 @@ msgid "" "Such a protocol can be used with :func:`isinstance` and :func:`issubclass`. " "This raises :exc:`TypeError` when applied to a non-protocol class. This " "allows a simple-minded structural check, very similar to \"one trick " -"ponies\" in :mod:`collections.abc` such as :class:`~collections.abc." -"Iterable`. For example::" +"ponies\" in :mod:`collections.abc` such " +"as :class:`~collections.abc.Iterable`. For example::" msgstr "" "Tal protocolo se puede usar con :func:`isinstance` y :func:`issubclass`. " "Esto lanzará una excepción :exc:`TypeError` cuando se aplique a una clase " "que no es un protocolo. Esto permite una comprobación estructural simple, " -"muy semejante a \"one trick ponies\" en :mod:`collections.abc` con :class:" -"`Iterable`. Por ejemplo::" +"muy semejante a \"one trick ponies\" en :mod:`collections.abc` " +"con :class:`Iterable`. Por ejemplo::" #: ../Doc/library/typing.rst:2398 msgid "" @@ -4039,24 +4977,36 @@ msgid "" "import threading\n" "assert isinstance(threading.Thread(name='Bob'), Named)" msgstr "" +"@runtime_checkable\n" +"class Closable(Protocol):\n" +" def close(self): ...\n" +"\n" +"assert isinstance(open('/some/file'), Closable)\n" +"\n" +"@runtime_checkable\n" +"class Named(Protocol):\n" +" name: str\n" +"\n" +"import threading\n" +"assert isinstance(threading.Thread(name='Bob'), Named)" #: ../Doc/library/typing.rst:2413 msgid "" ":func:`!runtime_checkable` will check only the presence of the required " -"methods or attributes, not their type signatures or types. For example, :" -"class:`ssl.SSLObject` is a class, therefore it passes an :func:`issubclass` " -"check against :ref:`Callable `. However, the ``ssl." -"SSLObject.__init__`` method exists only to raise a :exc:`TypeError` with a " -"more informative message, therefore making it impossible to call " -"(instantiate) :class:`ssl.SSLObject`." +"methods or attributes, not their type signatures or types. For " +"example, :class:`ssl.SSLObject` is a class, therefore it passes " +"an :func:`issubclass` check against :ref:`Callable `. " +"However, the ``ssl.SSLObject.__init__`` method exists only to raise " +"a :exc:`TypeError` with a more informative message, therefore making it " +"impossible to call (instantiate) :class:`ssl.SSLObject`." msgstr "" ":func:`!runtime_checkable` comprobará únicamente la presencia de los métodos " -"o atributos requeridos, no sus firmas de tipo o tipos. Por ejemplo, :class:" -"`ssl.SSLObject` es una clase, por lo tanto, pasa una comprobación :func:" -"`issubclass` contra :ref:`Callable `. Sin embargo, el " -"método ``ssl.SSLObject.__init__`` existe únicamente para generar un :exc:" -"`TypeError` con un mensaje más informativo, por lo que es imposible llamar " -"(instanciar) :class:`ssl.SSLObject`." +"o atributos requeridos, no sus firmas de tipo o tipos. Por " +"ejemplo, :class:`ssl.SSLObject` es una clase, por lo tanto, pasa una " +"comprobación :func:`issubclass` contra :ref:`Callable `. Sin embargo, el método ``ssl.SSLObject.__init__`` existe " +"únicamente para generar un :exc:`TypeError` con un mensaje más informativo, " +"por lo que es imposible llamar (instanciar) :class:`ssl.SSLObject`." #: ../Doc/library/typing.rst:2424 msgid "" @@ -4081,9 +5031,9 @@ msgid "" "versa. Most users are unlikely to be affected by this change." msgstr "" "La implementación interna de las comprobaciones de :func:`isinstance` con " -"protocolos que se pueden comprobar en tiempo de ejecución ahora utiliza :" -"func:`inspect.getattr_static` para buscar atributos (anteriormente, se " -"utilizaba :func:`hasattr`). Como resultado, algunos objetos que solían " +"protocolos que se pueden comprobar en tiempo de ejecución ahora " +"utiliza :func:`inspect.getattr_static` para buscar atributos (anteriormente, " +"se utilizaba :func:`hasattr`). Como resultado, algunos objetos que solían " "considerarse instancias de un protocolo que se podía comprobar en tiempo de " "ejecución ya no se consideran instancias de ese protocolo en Python 3.12+, y " "viceversa. Es poco probable que la mayoría de los usuarios se vean afectados " @@ -4094,8 +5044,9 @@ msgid "" "The members of a runtime-checkable protocol are now considered \"frozen\" at " "runtime as soon as the class has been created. Monkey-patching attributes " "onto a runtime-checkable protocol will still work, but will have no impact " -"on :func:`isinstance` checks comparing objects to the protocol. See :ref:" -"`\"What's new in Python 3.12\" ` for more details." +"on :func:`isinstance` checks comparing objects to the protocol. " +"See :ref:`\"What's new in Python 3.12\" ` for more " +"details." msgstr "" "Los miembros de un protocolo que se pueden comprobar en tiempo de ejecución " "ahora se consideran \"congelados\" en tiempo de ejecución tan pronto como se " @@ -4138,27 +5089,38 @@ msgid "" "\n" "assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')" msgstr "" +"class Point2D(TypedDict):\n" +" x: int\n" +" y: int\n" +" label: str\n" +"\n" +"a: Point2D = {'x': 1, 'y': 2, 'label': 'good'} # OK\n" +"b: Point2D = {'z': 3, 'label': 'bad'} # Falla la verificación de " +"tipos\n" +"\n" +"assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')" #: ../Doc/library/typing.rst:2471 msgid "" "An alternative way to create a ``TypedDict`` is by using function-call " "syntax. The second argument must be a literal :class:`dict`::" msgstr "" +"Una forma alternativa de crear un ``TypedDict`` es mediante la sintaxis de " +"llamada de función. El segundo argumento debe ser un :class:`dict` literal::" #: ../Doc/library/typing.rst:2474 msgid "Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})" -msgstr "" +msgstr "Punto2D = TypedDict('Punto2D', {'x': int, 'y': int, 'etiqueta': str})" #: ../Doc/library/typing.rst:2476 -#, fuzzy msgid "" -"This functional syntax allows defining keys which are not valid :ref:" -"`identifiers `, for example because they are keywords or " -"contain hyphens::" +"This functional syntax allows defining keys which are not " +"valid :ref:`identifiers `, for example because they are " +"keywords or contain hyphens::" msgstr "" -"También es preferible el uso de la sintaxis funcional cuando cualquiera de " -"las llaves no sean :ref:`identifiers` válidos, por ejemplo " -"porque son palabras clave o contienen guiones. Ejemplo::" +"Esta sintaxis funcional permite definir claves que no son " +"válidas :ref:`identifiers `, por ejemplo porque son palabras " +"clave o contienen guiones:" #: ../Doc/library/typing.rst:2480 msgid "" @@ -4170,6 +5132,13 @@ msgid "" "# OK, functional syntax\n" "Point2D = TypedDict('Point2D', {'in': int, 'x-y': int})" msgstr "" +"# lanza SyntaxError\n" +"class Point2D(TypedDict):\n" +" in: int # 'in' es una palabra clave\n" +" x-y: int # nombre con guiones\n" +"\n" +"# OK, sintaxis funcional\n" +"Point2D = TypedDict('Point2D', {'in': int, 'x-y': int})" #: ../Doc/library/typing.rst:2488 msgid "" @@ -4187,10 +5156,18 @@ msgid "" " y: int\n" " label: NotRequired[str]\n" "\n" -"# Alternative syntax\n" +"# Alternative syntax\n" +"Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': " +"NotRequired[str]})" +msgstr "" +"class Point2D(TypedDict):\n" +" x: int\n" +" y: int\n" +" label: NotRequired[str]\n" +"\n" +"# Sintaxis alternativa\n" "Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': " "NotRequired[str]})" -msgstr "" #: ../Doc/library/typing.rst:2499 msgid "" @@ -4217,6 +5194,12 @@ msgid "" "# Alternative syntax\n" "Point2D = TypedDict('Point2D', {'x': int, 'y': int}, total=False)" msgstr "" +"class Point2D(TypedDict, total=False):\n" +" x: int\n" +" y: int\n" +"\n" +"# Sintaxis alternativa\n" +"Point2D = TypedDict('Point2D', {'x': int, 'y': int}, total=False)" #: ../Doc/library/typing.rst:2512 msgid "" @@ -4253,6 +5236,17 @@ msgid "" " 'label': str\n" "}, total=False)" msgstr "" +"class Point2D(TypedDict, total=False):\n" +" x: Required[int]\n" +" y: Required[int]\n" +" label: str\n" +"\n" +"# Sintaxis alternativa\n" +"Point2D = TypedDict('Point2D', {\n" +" 'x': Required[int],\n" +" 'y': Required[int],\n" +" 'label': str\n" +"}, total=False)" #: ../Doc/library/typing.rst:2532 msgid "" @@ -4267,6 +5261,8 @@ msgid "" "class Point3D(Point2D):\n" " z: int" msgstr "" +"class Point3D(Point2D):\n" +" z: int" #: ../Doc/library/typing.rst:2539 msgid "" @@ -4283,6 +5279,10 @@ msgid "" " y: int\n" " z: int" msgstr "" +"class Point3D(TypedDict):\n" +" x: int\n" +" y: int\n" +" z: int" #: ../Doc/library/typing.rst:2547 msgid "" @@ -4306,6 +5306,17 @@ msgid "" "\n" "class XZ(X, Z): pass # raises TypeError" msgstr "" +"class X(TypedDict):\n" +" x: int\n" +"\n" +"class Y(TypedDict):\n" +" y: int\n" +"\n" +"class Z(object): pass # Una clase no-TypedDict\n" +"\n" +"class XY(X, Y): pass # OK\n" +"\n" +"class XZ(X, Z): pass # lanza TypeError" #: ../Doc/library/typing.rst:2562 msgid "A ``TypedDict`` can be generic::" @@ -4317,6 +5328,9 @@ msgid "" " key: T\n" " group: list[T]" msgstr "" +"class Group[T](TypedDict):\n" +" key: T\n" +" group: list[T]" #: ../Doc/library/typing.rst:2568 msgid "" @@ -4334,18 +5348,24 @@ msgid "" " key: T\n" " group: list[T]" msgstr "" +"T = TypeVar(\"T\")\n" +"\n" +"class Group(TypedDict, Generic[T]):\n" +" key: T\n" +" group: list[T]" #: ../Doc/library/typing.rst:2579 msgid "" -"A ``TypedDict`` can be introspected via annotations dicts (see :ref:" -"`annotations-howto` for more information on annotations best practices), :" -"attr:`__total__`, :attr:`__required_keys__`, and :attr:`__optional_keys__`." +"A ``TypedDict`` can be introspected via annotations dicts " +"(see :ref:`annotations-howto` for more information on annotations best " +"practices), :attr:`__total__`, :attr:`__required_keys__`, " +"and :attr:`__optional_keys__`." msgstr "" "Es posible introspectar un ``TypedDict`` a través de diccionarios de " "anotaciones (véase\n" " :ref:`annotations-howto` para más información acerca de mejores prácticas " -"de anotaciones), :attr:`__total__`, :attr:`__required_keys__`, y :attr:" -"`__optional_keys__`." +"de anotaciones), :attr:`__total__`, :attr:`__required_keys__`, " +"y :attr:`__optional_keys__`." #: ../Doc/library/typing.rst:2585 msgid "" @@ -4366,6 +5386,16 @@ msgid "" ">>> Point3D.__total__\n" "True" msgstr "" +">>> from typing import TypedDict\n" +">>> class Point2D(TypedDict): pass\n" +">>> Point2D.__total__\n" +"True\n" +">>> class Point2D(TypedDict, total=False): pass\n" +">>> Point2D.__total__\n" +"False\n" +">>> class Point3D(Point2D): pass\n" +">>> Point3D.__total__\n" +"True" #: ../Doc/library/typing.rst:2601 msgid "" @@ -4377,11 +5407,18 @@ msgid "" "use :attr:`__required_keys__` and :attr:`__optional_keys__` for " "introspection." msgstr "" +"Este atributo refleja el valor del argumento ``total`` de la clase " +"``TypedDict`` actual, no si la clase es semánticamente total. Por ejemplo, " +"una ``TypedDict`` con ``__total__`` establecida en ``True`` puede tener " +"claves marcadas con :data:`NotRequired`, o puede heredar de otra " +"``TypedDict`` con ``total=False``. Por lo tanto, generalmente es mejor " +"usar :attr:`__required_keys__` y :attr:`__optional_keys__` para la " +"introspección." #: ../Doc/library/typing.rst:2614 msgid "" -"``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` return :" -"class:`frozenset` objects containing required and non-required keys, " +"``Point2D.__required_keys__`` and ``Point2D.__optional_keys__`` " +"return :class:`frozenset` objects containing required and non-required keys, " "respectively." msgstr "" "``Point2D.__required_keys__`` y ``Point2D.__optional_keys__`` retornan " @@ -4426,6 +5463,17 @@ msgid "" ">>> Point3D.__optional_keys__ == frozenset({'x', 'y'})\n" "True" msgstr "" +">>> class Point2D(TypedDict, total=False):\n" +"... x: int\n" +"... y: int\n" +"...\n" +">>> class Point3D(Point2D):\n" +"... z: int\n" +"...\n" +">>> Point3D.__required_keys__ == frozenset({'z'})\n" +"True\n" +">>> Point3D.__optional_keys__ == frozenset({'x', 'y'})\n" +"True" #: ../Doc/library/typing.rst:2645 msgid "" @@ -4435,22 +5483,35 @@ msgid "" "``__optional_keys__`` rely on may not work properly, and the values of the " "attributes may be incorrect." msgstr "" +"Si se utiliza ``from __future__ import annotations`` o si las anotaciones se " +"proporcionan como cadenas, las anotaciones no se evalúan cuando se define " +"``TypedDict``. Por lo tanto, la introspección en tiempo de ejecución de la " +"que dependen ``__required_keys__`` y ``__optional_keys__`` puede no " +"funcionar correctamente y los valores de los atributos pueden ser " +"incorrectos." #: ../Doc/library/typing.rst:2651 msgid "Support for :data:`ReadOnly` is reflected in the following attributes:" msgstr "" +"La compatibilidad con :data:`ReadOnly` se refleja en los siguientes " +"atributos:" #: ../Doc/library/typing.rst:2655 msgid "" "A :class:`frozenset` containing the names of all read-only keys. Keys are " "read-only if they carry the :data:`ReadOnly` qualifier." msgstr "" +"Un :class:`frozenset` que contiene los nombres de todas las claves de solo " +"lectura. Las claves son de solo lectura si llevan el " +"calificador :data:`ReadOnly`." #: ../Doc/library/typing.rst:2662 msgid "" "A :class:`frozenset` containing the names of all mutable keys. Keys are " "mutable if they do not carry the :data:`ReadOnly` qualifier." msgstr "" +"Un :class:`frozenset` que contiene los nombres de todas las claves mutables. " +"Las claves son mutables si no llevan el calificador :data:`ReadOnly`." #: ../Doc/library/typing.rst:2667 msgid "" @@ -4461,26 +5522,27 @@ msgstr "" #: ../Doc/library/typing.rst:2671 msgid "" -"Added support for marking individual keys as :data:`Required` or :data:" -"`NotRequired`. See :pep:`655`." +"Added support for marking individual keys as :data:`Required` " +"or :data:`NotRequired`. See :pep:`655`." msgstr "" -"Se agrega soporte para marcar llaves individuales como :data:`Required` o :" -"data:`NotRequired`. Véase :pep:`655`." +"Se agrega soporte para marcar llaves individuales como :data:`Required` " +"o :data:`NotRequired`. Véase :pep:`655`." #: ../Doc/library/typing.rst:2675 msgid "Added support for generic ``TypedDict``\\ s." msgstr "Se agrega soporte para ``TypedDict`` genéricos." #: ../Doc/library/typing.rst:2678 -#, fuzzy msgid "" "Removed support for the keyword-argument method of creating ``TypedDict``\\ " "s." -msgstr "Se agrega soporte para ``TypedDict`` genéricos." +msgstr "" +"Se eliminó la compatibilidad con el método de argumento de palabra clave " +"para crear ``TypedDict``\\ s." #: ../Doc/library/typing.rst:2681 msgid "Support for the :data:`ReadOnly` qualifier was added." -msgstr "" +msgstr "Se agregó soporte para el calificador :data:`ReadOnly`." #: ../Doc/library/typing.rst:2684 msgid "" @@ -4491,6 +5553,12 @@ msgid "" "Python 3.15. To create a TypedDict class with 0 fields, use ``class " "TD(TypedDict): pass`` or ``TD = TypedDict(\"TD\", {})``." msgstr "" +"Al utilizar la sintaxis funcional para crear una clase TypedDict, no se " +"permite pasar un valor al parámetro 'campos' (``TD = TypedDict(\"TD\")``). " +"También se permite pasar ``None`` al parámetro 'campos' (``TD = " +"TypedDict(\"TD\", None)``). Ambos métodos no estarán permitidos en Python " +"3.15. Para crear una clase TypedDict con 0 campos, utilice ``class " +"TD(TypedDict): pass`` o ``TD = TypedDict(\"TD\", {})``." #: ../Doc/library/typing.rst:2693 msgid "Protocols" @@ -4603,6 +5671,9 @@ msgid "" " assert_type(name, str) # OK, inferred type of `name` is `str`\n" " assert_type(name, int) # type checker error" msgstr "" +"def greet(name: str) -> None:\n" +" assert_type(name, str) # OK, tipo inferido de `name` es `str`\n" +" assert_type(name, int) # error del verificador de tipos" #: ../Doc/library/typing.rst:2768 msgid "" @@ -4622,6 +5693,13 @@ msgid "" " # Test whether the type checker correctly understands our function\n" " assert_type(arg, int)" msgstr "" +"def complex_function(arg: object):\n" +" # Haz alguna lógica compleja de reducción de tipo,\n" +" # despues de la cual esperamos que el tipo inferido sea `int`\n" +" ...\n" +" # Probar si el verificador de tipos entiende correctamente nuestra " +"función\n" +" assert_type(arg, int)" #: ../Doc/library/typing.rst:2782 msgid "" @@ -4645,6 +5723,14 @@ msgid "" " case _ as unreachable:\n" " assert_never(unreachable)" msgstr "" +"def int_or_str(arg: int | str) -> None:\n" +" match arg:\n" +" case int():\n" +" print(\"It's an int\")\n" +" case str():\n" +" print(\"It's a str\")\n" +" case _ as unreachable:\n" +" assert_never(unreachable)" #: ../Doc/library/typing.rst:2795 msgid "" @@ -4653,8 +5739,8 @@ msgid "" "and both options are covered by earlier cases." msgstr "" "Aquí, las anotaciones permiten al validador de tipos inferir que el último " -"caso nunca puede ejecutarse, porque ``arg`` es un :class:`int` o un :class:" -"`str`, y ambas opciones están cubiertas por los casos anteriores." +"caso nunca puede ejecutarse, porque ``arg`` es un :class:`int` o " +"un :class:`str`, y ambas opciones están cubiertas por los casos anteriores." #: ../Doc/library/typing.rst:2800 msgid "" @@ -4668,47 +5754,47 @@ msgstr "" "Si un validador de tipos encuentra que una llamada a ``assert_never()`` es " "alcanzable, emitirá un error. Por ejemplo, si la anotación de tipo para " "``arg`` fuese en cambio ``int | str | float``, el validador de tipos " -"emitiría un error que indicaría que ``unreachable`` es de tipo :class:" -"`float`. Para que una llamada a ``assert_never`` pase la verificación de " -"tipos, el tipo inferido del argumento pasado debe ser el tipo inferior, :" -"data:`Never`, y nada más." +"emitiría un error que indicaría que ``unreachable`` es de " +"tipo :class:`float`. Para que una llamada a ``assert_never`` pase la " +"verificación de tipos, el tipo inferido del argumento pasado debe ser el " +"tipo inferior, :data:`Never`, y nada más." #: ../Doc/library/typing.rst:2808 msgid "At runtime, this throws an exception when called." msgstr "En tiempo de ejecución, ésto lanza una excepción cuando es llamado." #: ../Doc/library/typing.rst:2811 -#, fuzzy msgid "" "`Unreachable Code and Exhaustiveness Checking `__ has more information about " "exhaustiveness checking with static typing." msgstr "" "`Unreachable Code and Exhaustiveness Checking `__ contiene más información acerca de la " -"verificación de exhaustividad con tipado estático." +"en/latest/guides/unreachable.html>`__ tiene más información sobre la " +"comprobación de exhaustividad con tipado estático." #: ../Doc/library/typing.rst:2819 -#, fuzzy msgid "Ask a static type checker to reveal the inferred type of an expression." msgstr "" -"Solicitar a un validador de tipos que confirme que *val* tiene *typ* por " -"tipo inferido." +"Pídale a un verificador de tipos estáticos que revele el tipo inferido de " +"una expresión." #: ../Doc/library/typing.rst:2821 -#, fuzzy msgid "" "When a static type checker encounters a call to this function, it emits a " "diagnostic with the inferred type of the argument. For example::" msgstr "" -"Cuando un validador estático de tipos se encuentra con una invocación a esta " -"función, emite un diagnostico con el tipo del argumento. Por ejemplo::" +"Cuando un verificador de tipos estáticos encuentra una llamada a esta " +"función, emite un diagnóstico con el tipo inferido del argumento. Por " +"ejemplo:" #: ../Doc/library/typing.rst:2824 msgid "" "x: int = 1\n" "reveal_type(x) # Revealed type is \"builtins.int\"" msgstr "" +"x: int = 1\n" +"reveal_type(x) # Tipo revelado es \"builtins.int\"" #: ../Doc/library/typing.rst:2827 msgid "" @@ -4719,44 +5805,49 @@ msgstr "" "tipos maneja una pieza particular de código." #: ../Doc/library/typing.rst:2830 -#, fuzzy msgid "" -"At runtime, this function prints the runtime type of its argument to :data:" -"`sys.stderr` and returns the argument unchanged (allowing the call to be " -"used within an expression)::" +"At runtime, this function prints the runtime type of its argument " +"to :data:`sys.stderr` and returns the argument unchanged (allowing the call " +"to be used within an expression)::" msgstr "" -"En tiempo de ejecución, esta función imprime al *stderr* el tipo en tiempo " -"de ejecución de su argumento y lo retorna in cambios::" +"En tiempo de ejecución, esta función imprime el tipo de tiempo de ejecución " +"de su argumento en :data:`sys.stderr` y devuelve el argumento sin cambios " +"(lo que permite que la llamada se use dentro de una expresión):" #: ../Doc/library/typing.rst:2834 msgid "" "x = reveal_type(1) # prints \"Runtime type is int\"\n" "print(x) # prints \"1\"" msgstr "" +"x = reveal_type(1) # imprime \"Runtime type is int\"\n" +"print(x) # prints \"1\"" #: ../Doc/library/typing.rst:2837 msgid "" "Note that the runtime type may be different from (more or less specific " "than) the type statically inferred by a type checker." msgstr "" +"Tenga en cuenta que el tipo de tiempo de ejecución puede ser diferente (más " +"o menos específico) del tipo inferido estáticamente por un verificador de " +"tipos." #: ../Doc/library/typing.rst:2840 -#, fuzzy msgid "" "Most type checkers support ``reveal_type()`` anywhere, even if the name is " "not imported from ``typing``. Importing the name from ``typing``, however, " "allows your code to run without runtime errors and communicates intent more " "clearly." msgstr "" -"La mayoría de los validadores de tipos soportan ``reveal_type()`` en " -"cualquier lugar, incluso si el nombre no ha sido importado desde ``typing``. " -"Importar el nombre desde ``typing`` permite que el código corra sin errores " -"en tiempo de ejecución y comunica la intención de forma más clara." +"La mayoría de los verificadores de tipos admiten ``reveal_type()`` en " +"cualquier lugar, incluso si el nombre no se importa desde ``typing``. Sin " +"embargo, importar el nombre desde ``typing`` permite que el código se " +"ejecute sin errores de tiempo de ejecución y comunica la intención con mayor " +"claridad." #: ../Doc/library/typing.rst:2851 msgid "" -"Decorator to mark an object as providing :func:`dataclass `-like behavior." +"Decorator to mark an object as providing :func:`dataclass " +"`-like behavior." msgstr "" "Decorador para marcar un objeto como si proporcionara un comportamiento " "similar a :func:`dataclass `." @@ -4773,8 +5864,8 @@ msgstr "" "o una función que sea en sí misma un decorador. La presencia de " "``@dataclass_transform()`` le indica al validador de tipos estáticos que el " "objeto decorado realiza una \"magia\" en tiempo de ejecución que transforma " -"una clase de manera similar a :func:`@dataclasses.dataclass `." +"una clase de manera similar a :func:`@dataclasses.dataclass " +"`." #: ../Doc/library/typing.rst:2861 msgid "Example usage with a decorator function:" @@ -4792,6 +5883,15 @@ msgid "" " id: int\n" " name: str" msgstr "" +"@dataclass_transform()\n" +"def create_model[T](cls: type[T]) -> type[T]:\n" +" ...\n" +" return cls\n" +"\n" +"@create_model\n" +"class CustomerModel:\n" +" id: int\n" +" name: str" #: ../Doc/library/typing.rst:2875 msgid "On a base class::" @@ -4806,6 +5906,12 @@ msgid "" " id: int\n" " name: str" msgstr "" +"@dataclass_transform()\n" +"class ModelBase: ...\n" +"\n" +"class CustomerModel(ModelBase):\n" +" id: int\n" +" name: str" #: ../Doc/library/typing.rst:2884 msgid "On a metaclass::" @@ -4822,19 +5928,27 @@ msgid "" " id: int\n" " name: str" msgstr "" +"@dataclass_transform()\n" +"class ModelMeta(type): ...\n" +"\n" +"class ModelBase(metaclass=ModelMeta): ...\n" +"\n" +"class CustomerModel(ModelBase):\n" +" id: int\n" +" name: str" #: ../Doc/library/typing.rst:2895 msgid "" "The ``CustomerModel`` classes defined above will be treated by type checkers " -"similarly to classes created with :func:`@dataclasses.dataclass `. For example, type checkers will assume these classes have " -"``__init__`` methods that accept ``id`` and ``name``." +"similarly to classes created with :func:`@dataclasses.dataclass " +"`. For example, type checkers will assume these " +"classes have ``__init__`` methods that accept ``id`` and ``name``." msgstr "" "Las clases ``CustomerModel`` definidas arribe serán tratadas por los " -"validadores de tipo de forma similar a las clases que sean creadas con :" -"func:`@dataclasses.dataclass `. Por ejemplo, los " -"validadores de tipo asumirán que estas clases tienen métodos ``__init__`` " -"que aceptan ``id`` y ``name``." +"validadores de tipo de forma similar a las clases que sean creadas " +"con :func:`@dataclasses.dataclass `. Por ejemplo, " +"los validadores de tipo asumirán que estas clases tienen métodos " +"``__init__`` que aceptan ``id`` y ``name``." #: ../Doc/library/typing.rst:2901 msgid "" @@ -4847,11 +5961,11 @@ msgid "" msgstr "" "La clase, metaclase o función decorada puede aceptar los siguientes " "argumentos booleanos, de los cuales los validadores de tipos asumirán que " -"tienen el mismo efecto que tendrían en el decorador :func:`@dataclasses." -"dataclass`: ``init``, ``eq``, ``order``, " -"``unsafe_hash``, ``frozen``, ``match_args``, ``kw_only``, y ``slots``. Debe " -"ser posible evaluar estáticamente el valor de estos argumentos (``True`` o " -"``False``)." +"tienen el mismo efecto que tendrían en el " +"decorador :func:`@dataclasses.dataclass`: ``init``, " +"``eq``, ``order``, ``unsafe_hash``, ``frozen``, ``match_args``, ``kw_only``, " +"y ``slots``. Debe ser posible evaluar estáticamente el valor de estos " +"argumentos (``True`` o ``False``)." #: ../Doc/library/typing.rst:2909 msgid "" @@ -5064,8 +6178,8 @@ msgid "" "only, since they will be overwritten by the non-``@overload``-decorated " "definition. The non-``@overload``-decorated definition, meanwhile, will be " "used at runtime but should be ignored by a type checker. At runtime, " -"calling an ``@overload``-decorated function directly will raise :exc:" -"`NotImplementedError`." +"calling an ``@overload``-decorated function directly will " +"raise :exc:`NotImplementedError`." msgstr "" "Las definiciones decoradas con ``@overload`` son solo para beneficio del " "validador de tipos, ya que serán sobrescritas por la definición no decorada " @@ -5096,6 +6210,17 @@ msgid "" "def process(response):\n" " ... # actual implementation goes here" msgstr "" +"@overload\n" +"def process(response: None) -> None:\n" +" ...\n" +"@overload\n" +"def process(response: int) -> tuple[int, str]:\n" +" ...\n" +"@overload\n" +"def process(response: bytes) -> str:\n" +" ...\n" +"def process(response):\n" +" ... # actual implementation goes here" #: ../Doc/library/typing.rst:3023 msgid "" @@ -5106,8 +6231,8 @@ msgstr "" #: ../Doc/library/typing.rst:3025 msgid "" -"Overloaded functions can now be introspected at runtime using :func:" -"`get_overloads`." +"Overloaded functions can now be introspected at runtime " +"using :func:`get_overloads`." msgstr "" "Ahora es posible introspectar en tiempo de ejecución las funciones " "sobrecargadas utilizando :func:`get_overloads`." @@ -5183,6 +6308,19 @@ msgid "" "class Other(Leaf): # Error reported by type checker\n" " ..." msgstr "" +"class Base:\n" +" @final\n" +" def done(self) -> None:\n" +" ...\n" +"class Sub(Base):\n" +" def done(self) -> None: # Error informado por el verificador de tipos\n" +" ...\n" +"\n" +"@final\n" +"class Leaf:\n" +" ...\n" +"class Other(Leaf): # Error informado por el verificador de tipos\n" +" ..." #: ../Doc/library/typing.rst:3086 msgid "" @@ -5243,6 +6381,9 @@ msgid "" "No type checker ever added support for ``@no_type_check_decorator``. It is " "therefore deprecated, and will be removed in Python 3.15." msgstr "" +"Ningún verificador de tipos agregó compatibilidad con " +"``@no_type_check_decorator``. Por lo tanto, está obsoleto y se eliminará en " +"Python 3.15." #: ../Doc/library/typing.rst:3120 msgid "" @@ -5278,6 +6419,18 @@ msgid "" " def done(self) -> None: # Error reported by type checker\n" " ..." msgstr "" +"class Base:\n" +" def log_status(self) -> None:\n" +" ...\n" +"\n" +"class Sub(Base):\n" +" @override\n" +" def log_status(self) -> None: # Okay: sobreescribe Base.log_status\n" +" ...\n" +"\n" +" @override\n" +" def done(self) -> None: # Error reportado por el verificador de tipos\n" +" ..." #: ../Doc/library/typing.rst:3145 msgid "There is no runtime checking of this property." @@ -5328,6 +6481,12 @@ msgid "" "\n" "def fetch_response() -> Response: ..." msgstr "" +"@type_check_only\n" +"class Response: # privado o no disponible en tiempo de ejecución\n" +" code: int\n" +" def get_header(self, name: str) -> str: ...\n" +"\n" +"def fetch_response() -> Response: ..." #: ../Doc/library/typing.rst:3174 msgid "" @@ -5354,6 +6513,8 @@ msgid "" "This is often the same as ``obj.__annotations__``, but this function makes " "the following changes to the annotations dictionary:" msgstr "" +"A menudo es lo mismo que ``obj.__annotations__``, pero esta función realiza " +"los siguientes cambios en el diccionario de anotaciones:" #: ../Doc/library/typing.rst:3188 msgid "" @@ -5363,16 +6524,23 @@ msgid "" "*globalns* or *localns* is not given, appropriate namespace dictionaries are " "inferred from *obj*." msgstr "" +"Las referencias futuras codificadas como literales de cadena u " +"objetos :class:`ForwardRef` se manejan evaluándolas en el espacio de nombres " +"*globalns*, *localns* y (cuando corresponda) el espacio de nombre :ref:`type " +"parameter ` *obj*. Si no se proporciona *globalns* o *localns*, " +"los diccionarios de espacios de nombres apropiados se infieren de *obj*." #: ../Doc/library/typing.rst:3193 msgid "``None`` is replaced with :class:`types.NoneType`." -msgstr "" +msgstr "``None`` se reemplaza por :class:`types.NoneType`." #: ../Doc/library/typing.rst:3194 msgid "" "If :func:`@no_type_check ` has been applied to *obj*, an " "empty dictionary is returned." msgstr "" +"Si se ha aplicado :func:`@no_type_check ` a *obj*, se " +"devuelve un diccionario vacío." #: ../Doc/library/typing.rst:3196 msgid "" @@ -5383,32 +6551,45 @@ msgid "" "earlier in the :term:`method resolution order` always take precedence over " "annotations on classes appearing later in the method resolution order." msgstr "" +"Si *obj* es una clase ``C``, la función devuelve un diccionario que fusiona " +"las anotaciones de las clases base de ``C`` con las de ``C`` directamente. " +"Esto se hace recorriendo :attr:`C.__mro__ ` y combinando " +"iterativamente los diccionarios ``__annotations__``. Las anotaciones sobre " +"las clases que aparecen antes en :term:`method resolution order` siempre " +"tienen prioridad sobre las anotaciones sobre las clases que aparecen después " +"en el orden de resolución del método." #: ../Doc/library/typing.rst:3203 -#, fuzzy msgid "" "The function recursively replaces all occurrences of ``Annotated[T, ...]`` " -"with ``T``, unless *include_extras* is set to ``True`` (see :class:" -"`Annotated` for more information)." +"with ``T``, unless *include_extras* is set to ``True`` " +"(see :class:`Annotated` for more information)." msgstr "" -"La función reemplaza recursivamente todos los ``Annotated[T, ...]`` con " -"``T``, a menos que ``include_extras`` esté configurado como ``True`` " -"(consulte :class:`Annotated` para obtener más información). Por ejemplo:" +"La función reemplaza recursivamente todas las apariciones de " +"``Annotated[T, ...]`` con ``T``, a menos que *include_extras* se configure " +"en ``True`` (consulte :class:`Annotated` para obtener más información)." #: ../Doc/library/typing.rst:3207 msgid "" "See also :func:`inspect.get_annotations`, a lower-level function that " "returns annotations more directly." msgstr "" +"Consulte también :func:`inspect.get_annotations`, una función de nivel " +"inferior que devuelve anotaciones de forma más directa." #: ../Doc/library/typing.rst:3212 msgid "" "If any forward references in the annotations of *obj* are not resolvable or " -"are not valid Python code, this function will raise an exception such as :" -"exc:`NameError`. For example, this can happen with imported :ref:`type " +"are not valid Python code, this function will raise an exception such " +"as :exc:`NameError`. For example, this can happen with imported :ref:`type " "aliases ` that include forward references, or with names " "imported under :data:`if TYPE_CHECKING `." msgstr "" +"Si alguna referencia hacia adelante en las anotaciones de *obj* no se puede " +"resolver o no es código Python válido, esta función generará una excepción " +"como :exc:`NameError`. Por ejemplo, esto puede suceder con :ref:`type " +"aliases ` importado que incluye referencias hacia adelante o " +"con nombres importados bajo :data:`if TYPE_CHECKING `." #: ../Doc/library/typing.rst:3218 msgid "" @@ -5439,14 +6620,15 @@ msgstr "" #: ../Doc/library/typing.rst:3232 msgid "" "If ``X`` is a typing-module alias for a builtin or :mod:`collections` class, " -"it will be normalized to the original class. If ``X`` is an instance of :" -"class:`ParamSpecArgs` or :class:`ParamSpecKwargs`, return the underlying :" -"class:`ParamSpec`. Return ``None`` for unsupported objects." +"it will be normalized to the original class. If ``X`` is an instance " +"of :class:`ParamSpecArgs` or :class:`ParamSpecKwargs`, return the " +"underlying :class:`ParamSpec`. Return ``None`` for unsupported objects." msgstr "" -"Si ``X`` es un alias de módulo de tipado para una clase incorporada o :mod:" -"`collections`, se normalizará a la clase original. Si ``X`` es una instancia " -"de :class:`ParamSpecArgs` o :class:`ParamSpecKwargs`, devuelve la :class:" -"`ParamSpec` subyacente. Devuelve ``None`` para objetos no soportados." +"Si ``X`` es un alias de módulo de tipado para una clase incorporada " +"o :mod:`collections`, se normalizará a la clase original. Si ``X`` es una " +"instancia de :class:`ParamSpecArgs` o :class:`ParamSpecKwargs`, devuelve " +"la :class:`ParamSpec` subyacente. Devuelve ``None`` para objetos no " +"soportados." #: ../Doc/library/typing.rst:3238 ../Doc/library/typing.rst:3262 msgid "Examples:" @@ -5462,6 +6644,13 @@ msgid "" "assert get_origin(P.args) is P\n" "assert get_origin(P.kwargs) is P" msgstr "" +"assert get_origin(str) is None\n" +"assert get_origin(Dict[str, int]) is dict\n" +"assert get_origin(Union[int, str]) is Union\n" +"assert get_origin(Annotated[str, \"metadata\"]) is Annotated\n" +"P = ParamSpec('P')\n" +"assert get_origin(P.args) is P\n" +"assert get_origin(P.kwargs) is P" #: ../Doc/library/typing.rst:3254 msgid "" @@ -5489,10 +6678,13 @@ msgid "" "assert get_args(Dict[int, str]) == (int, str)\n" "assert get_args(Union[int, str]) == (int, str)" msgstr "" +"assert get_args(int) == ()\n" +"assert get_args(Dict[int, str]) == (int, str)\n" +"assert get_args(Union[int, str]) == (int, str)" #: ../Doc/library/typing.rst:3274 msgid "Return the set of members defined in a :class:`Protocol`." -msgstr "" +msgstr "Devuelve el conjunto de miembros definidos en un :class:`Protocol`." #: ../Doc/library/typing.rst:3276 msgid "" @@ -5503,13 +6695,18 @@ msgid "" ">>> get_protocol_members(P) == frozenset({'a', 'b'})\n" "True" msgstr "" +">>> from typing import Protocol, get_protocol_members\n" +">>> class P(Protocol):\n" +"... def a(self) -> str: ...\n" +"... b: int\n" +">>> get_protocol_members(P) == frozenset({'a', 'b'})\n" +"True" #: ../Doc/library/typing.rst:3285 msgid "Raise :exc:`TypeError` for arguments that are not Protocols." -msgstr "" +msgstr "Genera :exc:`TypeError` para argumentos que no sean protocolos." #: ../Doc/library/typing.rst:3291 -#, fuzzy msgid "Determine if a type is a :class:`Protocol`." msgstr "Compruebe si un tipo es :class:`TypedDict`." @@ -5522,6 +6719,12 @@ msgid "" "is_protocol(P) # => True\n" "is_protocol(int) # => False" msgstr "" +"class P(Protocol):\n" +" def a(self) -> str: ...\n" +" b: int\n" +"\n" +"is_protocol(P) # => True\n" +"is_protocol(int) # => False" #: ../Doc/library/typing.rst:3306 msgid "Check if a type is a :class:`TypedDict`." @@ -5540,6 +6743,16 @@ msgid "" "# not a typed dict itself\n" "assert not is_typeddict(TypedDict)" msgstr "" +"class Film(TypedDict):\n" +" title: str\n" +" year: int\n" +"\n" +"assert is_typeddict(Film)\n" +"assert not is_typeddict(list | str)\n" +"\n" +"# TypedDict es una fábrica para crear diccionarios tipados,\n" +"# no un diccionario tipado en si mismo\n" +"assert not is_typeddict(TypedDict)" #: ../Doc/library/typing.rst:3327 msgid "" @@ -5573,6 +6786,8 @@ msgid "" "A sentinel object used to indicate that a type parameter has no default " "value. For example:" msgstr "" +"Un objeto centinela que se utiliza para indicar que un parámetro de tipo no " +"tiene un valor predeterminado. Por ejemplo:" #: ../Doc/library/typing.rst:3345 msgid "" @@ -5583,6 +6798,12 @@ msgid "" ">>> S.__default__ is None\n" "True" msgstr "" +">>> T = TypeVar(\"T\")\n" +">>> T.__default__ is typing.NoDefault\n" +"True\n" +">>> S = TypeVar(\"S\", default=None)\n" +">>> S.__default__ is None\n" +"True" #: ../Doc/library/typing.rst:3357 msgid "Constant" @@ -5604,6 +6825,11 @@ msgid "" "def fun(arg: 'expensive_mod.SomeType') -> None:\n" " local_var: expensive_mod.AnotherType = other_fun()" msgstr "" +"if TYPE_CHECKING:\n" +" import expensive_mod\n" +"\n" +"def fun(arg: 'expensive_mod.SomeType') -> None:\n" +" local_var: expensive_mod.AnotherType = other_fun()" #: ../Doc/library/typing.rst:3372 msgid "" @@ -5646,8 +6872,8 @@ msgstr "" "preexistentes. Originalmente, se incluyeron en el módulo de tipado para " "admitir la parametrización de estas clases genéricas mediante ``[]``. Sin " "embargo, los alias se volvieron redundantes en Python 3.9 cuando las clases " -"preexistentes correspondientes se mejoraron para admitir ``[]`` (vea :pep:" -"`585`)." +"preexistentes correspondientes se mejoraron para admitir ``[]`` " +"(vea :pep:`585`)." #: ../Doc/library/typing.rst:3400 msgid "" @@ -5691,70 +6917,68 @@ msgid "Deprecated alias to :class:`dict`." msgstr "Alias obsoleto de :class:`dict`." #: ../Doc/library/typing.rst:3422 -#, fuzzy msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`~collections.abc.Mapping` rather than to " "use :class:`dict` or :class:`!typing.Dict`." msgstr "" -"Tenga en cuenta que para anotar argumentos, es preferible utilizar un tipo " -"de colección abstracto como :class:`Mapping` en lugar de utilizar :class:" -"`dict` o :class:`!typing.Dict`." +"Tenga en cuenta que para anotar argumentos, se prefiere utilizar un tipo de " +"colección abstracto como :class:`~collections.abc.Mapping` en lugar de " +"utilizar :class:`dict` o :class:`!typing.Dict`." #: ../Doc/library/typing.rst:3426 msgid "" -":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`builtins.dict ` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.dict ` ahora soporta subíndices (``[]``). Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`builtins.dict ` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3432 msgid "Deprecated alias to :class:`list`." msgstr "Alias obsoleto de :class:`list`." #: ../Doc/library/typing.rst:3434 -#, fuzzy msgid "" "Note that to annotate arguments, it is preferred to use an abstract " -"collection type such as :class:`~collections.abc.Sequence` or :class:" -"`~collections.abc.Iterable` rather than to use :class:`list` or :class:`!" -"typing.List`." +"collection type such as :class:`~collections.abc.Sequence` " +"or :class:`~collections.abc.Iterable` rather than to use :class:`list` " +"or :class:`!typing.List`." msgstr "" -"Tenga en cuenta que para anotar argumentos, es preferible utilizar un tipo " -"de colección abstracto como :class:`Sequence` o :class:`Iterable` en lugar " -"de utilizar :class:`list` o :class:`!typing.List`." +"Tenga en cuenta que para anotar argumentos, se prefiere utilizar un tipo de " +"colección abstracto como :class:`~collections.abc.Sequence` " +"o :class:`~collections.abc.Iterable` en lugar de utilizar :class:`list` " +"o :class:`!typing.List`." #: ../Doc/library/typing.rst:3439 msgid "" -":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`builtins.list ` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.list ` ahora soporta subíndices (``[]``). Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`builtins.list ` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3445 msgid "Deprecated alias to :class:`builtins.set `." msgstr "Alias obsoleto de :class:`builtins.set `." #: ../Doc/library/typing.rst:3447 -#, fuzzy msgid "" "Note that to annotate arguments, it is preferred to use an abstract " -"collection type such as :class:`collections.abc.Set` rather than to use :" -"class:`set` or :class:`typing.Set`." +"collection type such as :class:`collections.abc.Set` rather than to " +"use :class:`set` or :class:`typing.Set`." msgstr "" -"Tenga en cuenta que para anotar argumentos, es preferible utilizar un tipo " -"de colección abstracto como :class:`AbstractSet` en lugar de utilizar :class:" -"`set` o :class:`!typing.Set`." +"Tenga en cuenta que para anotar argumentos, se prefiere utilizar un tipo de " +"colección abstracto como :class:`collections.abc.Set` en lugar de " +"utilizar :class:`set` o :class:`typing.Set`." #: ../Doc/library/typing.rst:3451 msgid "" -":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`builtins.set ` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.set ` ahora soporta subíndices (``[]``). Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`builtins.set ` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3457 msgid "Deprecated alias to :class:`builtins.frozenset `." @@ -5774,16 +6998,16 @@ msgstr "Alias obsoleto de :class:`tuple`." #: ../Doc/library/typing.rst:3468 msgid "" -":class:`tuple` and ``Tuple`` are special-cased in the type system; see :ref:" -"`annotating-tuples` for more details." +":class:`tuple` and ``Tuple`` are special-cased in the type system; " +"see :ref:`annotating-tuples` for more details." msgstr "" ":class:`tuple` y ``Tuple`` son casos especiales en el sistema de tipos; " "consulte :ref:`annotating-tuples` para más detalles." #: ../Doc/library/typing.rst:3471 msgid "" -":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`builtins.tuple ` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" ":class:`builtins.tuple ` ahora soporta el uso de subíndices (``[]``). " "Véase :pep:`585` y :ref:`types-genericalias`." @@ -5797,13 +7021,13 @@ msgid "" "See :ref:`type-of-class-objects` for details on using :class:`type` or " "``typing.Type`` in type annotations." msgstr "" -"Vea :ref:`type-of-class-objects` para obtener detalles sobre el uso de :" -"class:`type` o ``typing.Type`` en anotaciones de tipo." +"Vea :ref:`type-of-class-objects` para obtener detalles sobre el uso " +"de :class:`type` o ``typing.Type`` en anotaciones de tipo." #: ../Doc/library/typing.rst:3484 msgid "" -":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`builtins.type ` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" ":class:`builtins.type ` ahora soporta el uso de subíndices (``[]``). " "Véase :pep:`585` y :ref:`types-genericalias`." @@ -5818,11 +7042,11 @@ msgstr "Alias obsoleto de :class:`collections.defaultdict`." #: ../Doc/library/typing.rst:3499 msgid "" -":class:`collections.defaultdict` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.defaultdict` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.defaultdict` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.defaultdict` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3505 msgid "Deprecated alias to :class:`collections.OrderedDict`." @@ -5830,11 +7054,11 @@ msgstr "Alias obsoleto de :class:`collections.OrderedDict`." #: ../Doc/library/typing.rst:3509 msgid "" -":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.OrderedDict` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.OrderedDict` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.OrderedDict` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3515 msgid "Deprecated alias to :class:`collections.ChainMap`." @@ -5842,11 +7066,11 @@ msgstr "Alias obsoleto de :class:`collections.ChainMap`." #: ../Doc/library/typing.rst:3519 msgid "" -":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`collections.ChainMap` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.ChainMap` ahora soporta subíndices (``[]``). Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.ChainMap` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3525 msgid "Deprecated alias to :class:`collections.Counter`." @@ -5854,11 +7078,11 @@ msgstr "Alias obsoleto de :class:`collections.Counter`." #: ../Doc/library/typing.rst:3529 msgid "" -":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`collections.Counter` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.Counter` ahora soporta subíndices (``[]``)`. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.Counter` ahora soporta subíndices (``[]``)`. " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3535 msgid "Deprecated alias to :class:`collections.deque`." @@ -5866,11 +7090,11 @@ msgstr "Alias obsoleto de :class:`collections.deque`." #: ../Doc/library/typing.rst:3539 msgid "" -":class:`collections.deque` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`collections.deque` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.deque` ahora soporta subíndices (``[]``). Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.deque` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3546 msgid "Aliases to other concrete types" @@ -5886,20 +7110,20 @@ msgstr "" #: ../Doc/library/typing.rst:3554 msgid "" -"These types (and the corresponding functions) are generic over :data:" -"`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or " +"These types (and the corresponding functions) are generic " +"over :data:`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or " "``Pattern[bytes]``; ``Match`` can be specialised as ``Match[str]`` or " "``Match[bytes]``." msgstr "" -"Estos tipos (y las funciones correspondientes) son genéricos sobre :data:" -"`AnyStr`. ``Pattern`` se puede especializar como ``Pattern[str]`` o " -"``Pattern[bytes]``; ``Match`` se puede especializar como ``Match[str]`` o " -"``Match[bytes]``." +"Estos tipos (y las funciones correspondientes) son genéricos " +"sobre :data:`AnyStr`. ``Pattern`` se puede especializar como " +"``Pattern[str]`` o ``Pattern[bytes]``; ``Match`` se puede especializar como " +"``Match[str]`` o ``Match[bytes]``." #: ../Doc/library/typing.rst:3559 msgid "" -"Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" -"pep:`585` and :ref:`types-genericalias`." +"Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" "Las clases ``Pattern`` y ``Match`` de :mod:`re` ahora soportan ``[]``. " "Véase :pep:`585` y :ref:`types-genericalias`." @@ -5929,6 +7153,8 @@ msgid "" "def add_unicode_checkmark(text: Text) -> Text:\n" " return text + u' \\u2713'" msgstr "" +"def add_unicode_checkmark(text: Text) -> Text:\n" +" return text + u' \\u2713'" #: ../Doc/library/typing.rst:3579 msgid "" @@ -5951,19 +7177,19 @@ msgstr "Alias obsoleto de :class:`collections.abc.Set`." #: ../Doc/library/typing.rst:3595 msgid "" -":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" -"`585` and :ref:`types-genericalias`." +":class:`collections.abc.Set` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Set` ahora soporta subíndices (``[]``). Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.abc.Set` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3601 msgid "" -"This type represents the types :class:`bytes`, :class:`bytearray`, and :" -"class:`memoryview` of byte sequences." +"This type represents the types :class:`bytes`, :class:`bytearray`, " +"and :class:`memoryview` of byte sequences." msgstr "" -"Este tipo representa a los tipos :class:`bytes`, :class:`bytearray`, y :" -"class:`memoryview` de secuencias de bytes." +"Este tipo representa a los tipos :class:`bytes`, :class:`bytearray`, " +"y :class:`memoryview` de secuencias de bytes." #: ../Doc/library/typing.rst:3604 msgid "" @@ -5979,8 +7205,8 @@ msgstr "Alias obsoleto de :class:`collections.abc.Collection`." #: ../Doc/library/typing.rst:3613 msgid "" -":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Collection` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" ":class:`collections.abc.Collection` ahora soporta la sintaxis de subíndice " "(``[]``). Véase :pep:`585` y :ref:`types-genericalias`." @@ -5991,11 +7217,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.Container`." #: ../Doc/library/typing.rst:3621 msgid "" -":class:`collections.abc.Container` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Container` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Container` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Container` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3627 msgid "Deprecated alias to :class:`collections.abc.ItemsView`." @@ -6003,11 +7229,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.ItemsView`." #: ../Doc/library/typing.rst:3629 msgid "" -":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.ItemsView` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.ItemsView` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.ItemsView` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3635 msgid "Deprecated alias to :class:`collections.abc.KeysView`." @@ -6015,11 +7241,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.KeysView`." #: ../Doc/library/typing.rst:3637 msgid "" -":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.KeysView` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.KeysView` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.KeysView` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3643 msgid "Deprecated alias to :class:`collections.abc.Mapping`." @@ -6027,11 +7253,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.Mapping`." #: ../Doc/library/typing.rst:3645 msgid "" -":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Mapping` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Mapping` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Mapping` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3651 msgid "Deprecated alias to :class:`collections.abc.MappingView`." @@ -6075,8 +7301,8 @@ msgstr "Alias obsoleto de :class:`collections.abc.MutableSet`." #: ../Doc/library/typing.rst:3679 msgid "" -":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.MutableSet` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" ":class:`collections.abc.MutableSet` ahora soporta subíndices (``[]``). " "Véase :pep:`585` y :ref:`types-genericalias`." @@ -6087,11 +7313,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.Sequence`." #: ../Doc/library/typing.rst:3687 msgid "" -":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Sequence` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Sequence` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Sequence` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3693 msgid "Deprecated alias to :class:`collections.abc.ValuesView`." @@ -6099,8 +7325,8 @@ msgstr "Alias obsoleto de :class:`collections.abc.ValuesView`." #: ../Doc/library/typing.rst:3695 msgid "" -":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.ValuesView` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" ":class:`collections.abc.ValuesView` ahora soporta subíndices (``[]``). " "Véase :pep:`585` y :ref:`types-genericalias`." @@ -6114,37 +7340,36 @@ msgid "Deprecated alias to :class:`collections.abc.Coroutine`." msgstr "Alias obsoleto de :class:`collections.abc.Coroutine`." #: ../Doc/library/typing.rst:3708 -#, fuzzy msgid "" -"See :ref:`annotating-generators-and-coroutines` for details on using :class:" -"`collections.abc.Coroutine` and ``typing.Coroutine`` in type annotations." +"See :ref:`annotating-generators-and-coroutines` for details on " +"using :class:`collections.abc.Coroutine` and ``typing.Coroutine`` in type " +"annotations." msgstr "" -"Vea :ref:`annotating-callables` para información detallada de cómo usar :" -"class:`collections.abc.Callable` y ``typing.Callable`` en anotaciones de " -"tipo." +"Consulte :ref:`annotating-generators-and-coroutines` para obtener detalles " +"sobre el uso de :class:`collections.abc.Coroutine` y ``typing.Coroutine`` en " +"anotaciones de tipo." #: ../Doc/library/typing.rst:3714 msgid "" -":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Coroutine` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Coroutine` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Coroutine` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3720 msgid "Deprecated alias to :class:`collections.abc.AsyncGenerator`." msgstr "Alias obsoleto de :class:`collections.abc.AsyncGenerator`." #: ../Doc/library/typing.rst:3722 -#, fuzzy msgid "" -"See :ref:`annotating-generators-and-coroutines` for details on using :class:" -"`collections.abc.AsyncGenerator` and ``typing.AsyncGenerator`` in type " -"annotations." +"See :ref:`annotating-generators-and-coroutines` for details on " +"using :class:`collections.abc.AsyncGenerator` and ``typing.AsyncGenerator`` " +"in type annotations." msgstr "" -"Vea :ref:`annotating-callables` para información detallada de cómo usar :" -"class:`collections.abc.Callable` y ``typing.Callable`` en anotaciones de " -"tipo." +"Consulte :ref:`annotating-generators-and-coroutines` para obtener detalles " +"sobre el uso de :class:`collections.abc.AsyncGenerator` y " +"``typing.AsyncGenerator`` en anotaciones de tipo." #: ../Doc/library/typing.rst:3728 msgid "" @@ -6156,7 +7381,7 @@ msgstr "" #: ../Doc/library/typing.rst:3733 msgid "The ``SendType`` parameter now has a default." -msgstr "" +msgstr "El parámetro ``SendType`` ahora tiene un valor predeterminado." #: ../Doc/library/typing.rst:3738 msgid "Deprecated alias to :class:`collections.abc.AsyncIterable`." @@ -6188,11 +7413,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.Awaitable`." #: ../Doc/library/typing.rst:3762 msgid "" -":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Awaitable` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Awaitable` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Awaitable` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3769 msgid "Aliases to other ABCs in :mod:`collections.abc`" @@ -6204,11 +7429,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.Iterable`." #: ../Doc/library/typing.rst:3775 msgid "" -":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Iterable` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Iterable` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Iterable` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3781 msgid "Deprecated alias to :class:`collections.abc.Iterator`." @@ -6216,11 +7441,11 @@ msgstr "Alias obsoleto de :class:`collections.abc.Iterator`." #: ../Doc/library/typing.rst:3783 msgid "" -":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Iterator` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Iterator` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Iterator` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3789 msgid "Deprecated alias to :class:`collections.abc.Callable`." @@ -6228,46 +7453,47 @@ msgstr "Alias obsoleto de :class:`collections.abc.Callable`." #: ../Doc/library/typing.rst:3791 msgid "" -"See :ref:`annotating-callables` for details on how to use :class:" -"`collections.abc.Callable` and ``typing.Callable`` in type annotations." +"See :ref:`annotating-callables` for details on how to " +"use :class:`collections.abc.Callable` and ``typing.Callable`` in type " +"annotations." msgstr "" -"Vea :ref:`annotating-callables` para información detallada de cómo usar :" -"class:`collections.abc.Callable` y ``typing.Callable`` en anotaciones de " -"tipo." +"Vea :ref:`annotating-callables` para información detallada de cómo " +"usar :class:`collections.abc.Callable` y ``typing.Callable`` en anotaciones " +"de tipo." #: ../Doc/library/typing.rst:3794 msgid "" -":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Callable` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Callable` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Callable` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3804 msgid "Deprecated alias to :class:`collections.abc.Generator`." msgstr "Alias obsoleto de :class:`collections.abc.Generator`." #: ../Doc/library/typing.rst:3806 -#, fuzzy msgid "" -"See :ref:`annotating-generators-and-coroutines` for details on using :class:" -"`collections.abc.Generator` and ``typing.Generator`` in type annotations." +"See :ref:`annotating-generators-and-coroutines` for details on " +"using :class:`collections.abc.Generator` and ``typing.Generator`` in type " +"annotations." msgstr "" -"Vea :ref:`annotating-callables` para información detallada de cómo usar :" -"class:`collections.abc.Callable` y ``typing.Callable`` en anotaciones de " -"tipo." +"Consulte :ref:`annotating-generators-and-coroutines` para obtener detalles " +"sobre el uso de :class:`collections.abc.Generator` y ``typing.Generator`` en " +"anotaciones de tipo." #: ../Doc/library/typing.rst:3810 msgid "" -":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Generator` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Generator` ahora soporta subíndices (``[]``). Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`collections.abc.Generator` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:3814 msgid "Default values for the send and return types were added." -msgstr "" +msgstr "Valores por defecto para los tipos send y return fueron agregados." #: ../Doc/library/typing.rst:3819 msgid "Deprecated alias to :class:`collections.abc.Hashable`." @@ -6283,8 +7509,8 @@ msgstr "Alias obsoleto de :class:`collections.abc.Reversible`." #: ../Doc/library/typing.rst:3828 msgid "" -":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" -"pep:`585` and :ref:`types-genericalias`." +":class:`collections.abc.Reversible` now supports subscripting (``[]``). " +"See :pep:`585` and :ref:`types-genericalias`." msgstr "" ":class:`collections.abc.Reversible` ahora soporta subíndices (``[]``). " "Véase :pep:`585` y :ref:`types-genericalias`." @@ -6307,11 +7533,15 @@ msgstr "Alias obsoleto de :class:`contextlib.AbstractContextManager`." #: ../Doc/library/typing.rst:3848 msgid "" -"The first type parameter, ``T_co``, represents the type returned by the :" -"meth:`~object.__enter__` method. The optional second type parameter, " +"The first type parameter, ``T_co``, represents the type returned by " +"the :meth:`~object.__enter__` method. The optional second type parameter, " "``ExitT_co``, which defaults to ``bool | None``, represents the type " "returned by the :meth:`~object.__exit__` method." msgstr "" +"El primer parámetro de tipo, ``T_co``, representa el tipo devuelto por el " +"método :meth:`~object.__enter__`. El segundo parámetro de tipo opcional, " +"``ExitT_co``, cuyo valor predeterminado es ``bool | None``, representa el " +"tipo devuelto por el método :meth:`~object.__exit__`." #: ../Doc/library/typing.rst:3855 msgid "" @@ -6323,7 +7553,7 @@ msgstr "" #: ../Doc/library/typing.rst:3860 msgid "Added the optional second type parameter, ``ExitT_co``." -msgstr "" +msgstr "Se agregó el segundo parámetro de tipo opcional, ``ExitT_co``." #: ../Doc/library/typing.rst:3865 msgid "Deprecated alias to :class:`contextlib.AbstractAsyncContextManager`." @@ -6331,11 +7561,15 @@ msgstr "Alias obsoleto de :class:`contextlib.AbstractAsyncContextManager`." #: ../Doc/library/typing.rst:3867 msgid "" -"The first type parameter, ``T_co``, represents the type returned by the :" -"meth:`~object.__aenter__` method. The optional second type parameter, " +"The first type parameter, ``T_co``, represents the type returned by " +"the :meth:`~object.__aenter__` method. The optional second type parameter, " "``AExitT_co``, which defaults to ``bool | None``, represents the type " "returned by the :meth:`~object.__aexit__` method." msgstr "" +"El primer parámetro de tipo, ``T_co``, representa el tipo devuelto por el " +"método :meth:`~object.__aenter__`. El segundo parámetro de tipo opcional, " +"``AExitT_co``, cuyo valor predeterminado es ``bool | None``, representa el " +"tipo devuelto por el método :meth:`~object.__aexit__`." #: ../Doc/library/typing.rst:3874 msgid "" @@ -6347,7 +7581,7 @@ msgstr "" #: ../Doc/library/typing.rst:3879 msgid "Added the optional second type parameter, ``AExitT_co``." -msgstr "" +msgstr "Se agregó el segundo parámetro de tipo opcional, ``AExitT_co``." #: ../Doc/library/typing.rst:3883 msgid "Deprecation Timeline of Major Features" @@ -6448,33 +7682,28 @@ msgstr ":pep:`695`" #: ../Doc/library/typing.rst:3916 msgid ":func:`@typing.no_type_check_decorator `" -msgstr "" +msgstr ":func:`@typing.no_type_check_decorator `" #: ../Doc/library/typing.rst:3917 ../Doc/library/typing.rst:3921 msgid "3.13" msgstr "3.13" #: ../Doc/library/typing.rst:3918 -#, fuzzy msgid "3.15" -msgstr "3.14" +msgstr "3.15" #: ../Doc/library/typing.rst:3919 -#, fuzzy msgid ":gh:`106309`" -msgstr ":gh:`94309`" +msgstr ":gh:`106309`" #: ../Doc/library/typing.rst:3920 -#, fuzzy msgid ":data:`typing.AnyStr`" -msgstr ":data:`typing.Text`" +msgstr ":data:`typing.AnyStr`" #: ../Doc/library/typing.rst:3922 -#, fuzzy msgid "3.18" -msgstr "3.8" +msgstr "3.18" #: ../Doc/library/typing.rst:3923 -#, fuzzy msgid ":gh:`105578`" -msgstr ":gh:`91896`" +msgstr ":gh:`105578`" From 589239ed07bef3838bd1b142a3641c941045d1f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Tue, 14 Oct 2025 13:21:25 +0200 Subject: [PATCH 30/40] Translate c-api/init (#3331) Closes #3242 --- c-api/init.po | 1854 +++++++++++++++++++---------------- dictionaries/c-api_init.txt | 7 +- 2 files changed, 1028 insertions(+), 833 deletions(-) diff --git a/c-api/init.po b/c-api/init.po index 49129398b0..297d52deb6 100644 --- a/c-api/init.po +++ b/c-api/init.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: 2023-01-14 14:22-0500\n" -"Last-Translator: CatalinaArrey \n" -"Language: es\n" +"PO-Revision-Date: 2025-10-14 13:14+0200\n" +"Last-Translator: Cristián Maureira-Fredes \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/init.rst:8 msgid "Initialization, Finalization, and Threads" @@ -42,10 +43,10 @@ msgid "" "exception of a few functions and the :ref:`global configuration variables " "`." msgstr "" -"En una aplicación que incorpora Python, se debe llamar a la función :c:func:" -"`Py_Initialize` antes de usar cualquier otra función de API Python/C; con la " -"excepción de algunas funciones y :ref:`variables de configuración global " -"`." +"En una aplicación que incorpora Python, se debe llamar a la " +"función :c:func:`Py_Initialize` antes de usar cualquier otra función de API " +"Python/C; con la excepción de algunas funciones y :ref:`variables de " +"configuración global `." #: ../Doc/c-api/init.rst:22 msgid "" @@ -67,9 +68,8 @@ msgid ":c:func:`PyImport_ExtendInittab`" msgstr ":c:func:`PyImport_ExtendInittab`" #: ../Doc/c-api/init.rst:28 -#, fuzzy msgid ":c:func:`!PyInitFrozenExtensions`" -msgstr ":c:func:`PyInitFrozenExtensions`" +msgstr ":c:func:`!PyInitFrozenExtensions`" #: ../Doc/c-api/init.rst:29 msgid ":c:func:`PyMem_SetAllocator`" @@ -160,33 +160,26 @@ msgid ":c:func:`PyMem_RawFree`" msgstr ":c:func:`PyMem_RawFree`" #: ../Doc/c-api/init.rst:58 -#, fuzzy msgid "Synchronization:" -msgstr "Notificaciones asincrónicas" +msgstr "Sincronización:" #: ../Doc/c-api/init.rst:60 -#, fuzzy msgid ":c:func:`PyMutex_Lock`" -msgstr ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMutex_Lock`" #: ../Doc/c-api/init.rst:61 -#, fuzzy msgid ":c:func:`PyMutex_Unlock`" -msgstr ":c:func:`PyMem_RawMalloc`" +msgstr ":c:func:`PyMutex_Unlock`" #: ../Doc/c-api/init.rst:65 msgid "" -"The following functions **should not be called** before :c:func:" -"`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" -"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" -"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" -"`Py_GetProgramName` and :c:func:`PyEval_InitThreads`." +"The following functions **should not be called** " +"before :c:func:`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:`Py_GetProgramName` " +"and :c:func:`PyEval_InitThreads`." msgstr "" -"Las siguientes funciones **no deben llamarse** antes de :c:func:" -"`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" -"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" -"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" -"`Py_GetProgramName` y :c:func:`PyEval_InitThreads`." +"Las siguientes funciones **no deben llamarse** antes " +"de :c:func:`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:`Py_GetProgramName` " +"y :c:func:`PyEval_InitThreads`." #: ../Doc/c-api/init.rst:75 msgid "Global configuration variables" @@ -195,8 +188,8 @@ msgstr "Variables de configuración global" #: ../Doc/c-api/init.rst:77 msgid "" "Python has variables for the global configuration to control different " -"features and options. By default, these flags are controlled by :ref:" -"`command line options `." +"features and options. By default, these flags are controlled " +"by :ref:`command line options `." msgstr "" "Python tiene variables para la configuración global para controlar " "diferentes características y opciones. De forma predeterminada, estos " @@ -206,50 +199,48 @@ msgstr "" #: ../Doc/c-api/init.rst:81 msgid "" "When a flag is set by an option, the value of the flag is the number of " -"times that the option was set. For example, ``-b`` sets :c:data:" -"`Py_BytesWarningFlag` to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to " -"2." +"times that the option was set. For example, ``-b`` " +"sets :c:data:`Py_BytesWarningFlag` to 1 and ``-bb`` " +"sets :c:data:`Py_BytesWarningFlag` to 2." msgstr "" "Cuando una opción establece un indicador, el valor del indicador es la " -"cantidad de veces que se configuró la opción. Por ejemplo, ``-b`` establece :" -"c:data:`Py_BytesWarningFlag` en 1 y ``-bb`` establece :c:data:" -"`Py_BytesWarningFlag` en 2." +"cantidad de veces que se configuró la opción. Por ejemplo, ``-b`` " +"establece :c:data:`Py_BytesWarningFlag` en 1 y ``-bb`` " +"establece :c:data:`Py_BytesWarningFlag` en 2." #: ../Doc/c-api/init.rst:87 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"bytes_warning` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.bytes_warning` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.bytes_warning` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:91 msgid "" -"Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :" -"class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater " -"or equal to ``2``." +"Issue a warning when comparing :class:`bytes` or :class:`bytearray` " +"with :class:`str` or :class:`bytes` with :class:`int`. Issue an error if " +"greater or equal to ``2``." msgstr "" -"Emite una advertencia al comparar :class:`bytes` o :class:`bytearray` con :" -"class:`str` o :class:`bytes` con :class:`int`. Emite un error si es mayor o " -"igual a ``2``." +"Emite una advertencia al comparar :class:`bytes` o :class:`bytearray` " +"con :class:`str` o :class:`bytes` con :class:`int`. Emite un error si es " +"mayor o igual a ``2``." #: ../Doc/c-api/init.rst:95 msgid "Set by the :option:`-b` option." msgstr "Establecido por la opción :option:`-b`." #: ../Doc/c-api/init.rst:101 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"parser_debug` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.parser_debug` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.parser_debug` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:105 msgid "" @@ -264,19 +255,18 @@ msgid "" "Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " "variable." msgstr "" -"Establecido por la opción :option:`-d` y la variable de entorno :envvar:" -"`PYTHONDEBUG`." +"Establecido por la opción :option:`-d` y la variable de " +"entorno :envvar:`PYTHONDEBUG`." #: ../Doc/c-api/init.rst:115 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"write_bytecode` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.write_bytecode` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.write_bytecode` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:119 msgid "" @@ -291,27 +281,26 @@ msgid "" "Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " "environment variable." msgstr "" -"Establecido por la opción :option:`-B` y la variable de entorno :envvar:" -"`PYTHONDONTWRITEBYTECODE`." +"Establecido por la opción :option:`-B` y la variable de " +"entorno :envvar:`PYTHONDONTWRITEBYTECODE`." #: ../Doc/c-api/init.rst:129 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"pathconfig_warnings` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.pathconfig_warnings` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.pathconfig_warnings` en su " +"lugar, consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:133 msgid "" -"Suppress error messages when calculating the module search path in :c:func:" -"`Py_GetPath`." +"Suppress error messages when calculating the module search path " +"in :c:func:`Py_GetPath`." msgstr "" -"Suprime los mensajes de error al calcular la ruta de búsqueda del módulo en :" -"c:func:`Py_GetPath`." +"Suprime los mensajes de error al calcular la ruta de búsqueda del módulo " +"en :c:func:`Py_GetPath`." #: ../Doc/c-api/init.rst:136 msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." @@ -320,16 +309,16 @@ msgstr "" "``frozenmain``." #: ../Doc/c-api/init.rst:142 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"hash_seed` and :c:member:`PyConfig.use_hash_seed` should be used instead, " +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.hash_seed` " +"and :c:member:`PyConfig.use_hash_seed` should be used instead, " "see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.argv` y :c:" -"member:`PyConfig.parse_argv`, consulta :ref:`Configuración de inicialización " -"de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se deben " +"utilizar las configuraciones :c:member:`PyConfig.hash_seed` " +"y :c:member:`PyConfig.use_hash_seed` en su lugar, consulte :ref:`Python " +"Initialization Configuration `." #: ../Doc/c-api/init.rst:147 msgid "" @@ -344,43 +333,42 @@ msgid "" "If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " "variable to initialize the secret hash seed." msgstr "" -"Si el indicador no es cero, lee la variable de entorno :envvar:" -"`PYTHONHASHSEED` para inicializar la semilla de *hash* secreta." +"Si el indicador no es cero, lee la variable de " +"entorno :envvar:`PYTHONHASHSEED` para inicializar la semilla de *hash* " +"secreta." #: ../Doc/c-api/init.rst:157 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"use_environment` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.use_environment` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.use_environment` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:161 -#, fuzzy msgid "" -"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:" -"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +"Ignore all :envvar:`!PYTHON*` environment variables, " +"e.g. :envvar:`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." msgstr "" -"Ignorar todas las variables de entorno :envvar:`PYTHON*`, por ejemplo :" -"envvar:`PYTHONPATH` y :envvar:`PYTHONHOME`, eso podría establecerse." +"Ignore todas las variables de entorno :envvar:`!PYTHON*`, por " +"ejemplo, :envvar:`PYTHONPATH` y :envvar:`PYTHONHOME`, que puedan estar " +"configuradas." #: ../Doc/c-api/init.rst:164 msgid "Set by the :option:`-E` and :option:`-I` options." msgstr "Establecido por las opciones :option:`-E` y :option:`-I`." #: ../Doc/c-api/init.rst:170 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"inspect` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.inspect` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.inspect` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:174 msgid "" @@ -390,42 +378,40 @@ msgid "" msgstr "" "Cuando se pasa una secuencia de comandos (*script*) como primer argumento o " "se usa la opción :option:`-c`, ingresa al modo interactivo después de " -"ejecutar la secuencia de comandos o el comando, incluso cuando :data:`sys." -"stdin` no parece ser un terminal." +"ejecutar la secuencia de comandos o el comando, incluso " +"cuando :data:`sys.stdin` no parece ser un terminal." #: ../Doc/c-api/init.rst:178 msgid "" "Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " "variable." msgstr "" -"Establecido por la opción :option:`-i` y la variable de entorno :envvar:" -"`PYTHONINSPECT`." +"Establecido por la opción :option:`-i` y la variable de " +"entorno :envvar:`PYTHONINSPECT`." #: ../Doc/c-api/init.rst:185 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"interactive` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.interactive` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.interactive` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:189 msgid "Set by the :option:`-i` option." msgstr "Establecido por la opción :option:`-i`." #: ../Doc/c-api/init.rst:195 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"isolated` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.isolated` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.isolated` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:199 msgid "" @@ -441,15 +427,15 @@ msgid "Set by the :option:`-I` option." msgstr "Establecido por la opción :option:`-I`." #: ../Doc/c-api/init.rst:210 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyPreConfig." -"legacy_windows_fs_encoding` should be used instead, see :ref:`Python " -"Initialization Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyPreConfig.legacy_windows_fs_encoding` should be used " +"instead, see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyPreConfig.legacy_windows_fs_encoding` " +"en su lugar, consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:214 msgid "" @@ -467,9 +453,9 @@ msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " "variable is set to a non-empty string." msgstr "" -"Establece en ``1`` si la variable de entorno :envvar:" -"`PYTHONLEGACYWINDOWSFSENCODING` está configurada en una cadena de caracteres " -"no vacía." +"Establece en ``1`` si la variable de " +"entorno :envvar:`PYTHONLEGACYWINDOWSFSENCODING` está configurada en una " +"cadena de caracteres no vacía." #: ../Doc/c-api/init.rst:221 msgid "See :pep:`529` for more details." @@ -480,55 +466,52 @@ msgid ":ref:`Availability `: Windows." msgstr ":ref:`Disponibilidad `: Windows." #: ../Doc/c-api/init.rst:229 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"legacy_windows_stdio` should be used instead, see :ref:`Python " -"Initialization Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.legacy_windows_stdio` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.legacy_windows_stdio` en su " +"lugar, consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:233 -#, fuzzy msgid "" -"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!io." -"_WindowsConsoleIO` for :mod:`sys` standard streams." +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!" +"io._WindowsConsoleIO` for :mod:`sys` standard streams." msgstr "" -"Si el indicador no es cero, use :class:`io.FileIO` en lugar de :class:" -"`WindowsConsoleIO` para secuencias estándar :mod:`sys`." +"Si el indicador no es cero, utilice :class:`io.FileIO` en lugar de :class:`!" +"io._WindowsConsoleIO` para las transmisiones estándar :mod:`sys`." #: ../Doc/c-api/init.rst:236 msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " "is set to a non-empty string." msgstr "" -"Establece en ``1`` si la variable de entorno :envvar:" -"`PYTHONLEGACYWINDOWSSTDIO` está configurada en una cadena de caracteres no " -"vacía." +"Establece en ``1`` si la variable de " +"entorno :envvar:`PYTHONLEGACYWINDOWSSTDIO` está configurada en una cadena de " +"caracteres no vacía." #: ../Doc/c-api/init.rst:239 msgid "See :pep:`528` for more details." msgstr "Ver :pep:`528` para más detalles." #: ../Doc/c-api/init.rst:247 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"site_import` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.site_import` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.site_import` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:251 msgid "" "Disable the import of the module :mod:`site` and the site-dependent " "manipulations of :data:`sys.path` that it entails. Also disable these " -"manipulations if :mod:`site` is explicitly imported later (call :func:`site." -"main` if you want them to be triggered)." +"manipulations if :mod:`site` is explicitly imported later " +"(call :func:`site.main` if you want them to be triggered)." msgstr "" "Deshabilita la importación del módulo :mod:`site` y las manipulaciones " "dependientes del sitio de :data:`sys.path` que conlleva. También deshabilita " @@ -540,61 +523,59 @@ msgid "Set by the :option:`-S` option." msgstr "Establecido por la opción :option:`-S`." #: ../Doc/c-api/init.rst:262 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"user_site_directory` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.user_site_directory` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.user_site_directory` en su " +"lugar, consulte :ref:`Configuración de inicialización de Python `." #: ../Doc/c-api/init.rst:266 msgid "" -"Don't add the :data:`user site-packages directory ` to :data:" -"`sys.path`." +"Don't add the :data:`user site-packages directory ` " +"to :data:`sys.path`." msgstr "" -"No agregue el :data:`directorio de paquetes de sitio del usuario ` (*site-packages*) a :data:`sys.path`." +"No agregue el :data:`directorio de paquetes de sitio del usuario " +"` (*site-packages*) a :data:`sys.path`." #: ../Doc/c-api/init.rst:269 msgid "" -"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" -"`PYTHONNOUSERSITE` environment variable." +"Set by the :option:`-s` and :option:`-I` options, and " +"the :envvar:`PYTHONNOUSERSITE` environment variable." msgstr "" "Establecido por las opciones :option:`-s` y :option:`-I`, y la variable de " "entorno :envvar:`PYTHONNOUSERSITE`." #: ../Doc/c-api/init.rst:276 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"optimization_level` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.optimization_level` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.optimization_level` en su " +"lugar, consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:280 msgid "" "Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " "variable." msgstr "" -"Establecido por la opción :option:`-O` y la variable de entorno :envvar:" -"`PYTHONOPTIMIZE`." +"Establecido por la opción :option:`-O` y la variable de " +"entorno :envvar:`PYTHONOPTIMIZE`." #: ../Doc/c-api/init.rst:287 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"quiet` should be used instead, see :ref:`Python Initialization Configuration " -"`." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.quiet` should be used instead, see :ref:`Python " +"Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.quiet` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:291 msgid "" @@ -608,15 +589,14 @@ msgid "Set by the :option:`-q` option." msgstr "Establecido por la opción :option:`-q`." #: ../Doc/c-api/init.rst:301 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"buffered_stdio` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.buffered_stdio` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.buffered_stdio` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:305 msgid "Force the stdout and stderr streams to be unbuffered." @@ -627,19 +607,18 @@ msgid "" "Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " "environment variable." msgstr "" -"Establecido por la opción :option:`-u` y la variable de entorno :envvar:" -"`PYTHONUNBUFFERED`." +"Establecido por la opción :option:`-u` y la variable de " +"entorno :envvar:`PYTHONUNBUFFERED`." #: ../Doc/c-api/init.rst:314 -#, fuzzy msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"verbose` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.verbose` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" -"Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"Esta API se mantiene por compatibilidad con versiones anteriores: se debe " +"utilizar la configuración :c:member:`PyConfig.verbose` en su lugar, " +"consulte :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:318 msgid "" @@ -659,8 +638,8 @@ msgid "" "Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " "variable." msgstr "" -"Establecido por la opción :option:`-v` y la variable de entorno :envvar:" -"`PYTHONVERBOSE`." +"Establecido por la opción :option:`-v` y la variable de " +"entorno :envvar:`PYTHONVERBOSE`." #: ../Doc/c-api/init.rst:330 msgid "Initializing and finalizing the interpreter" @@ -669,16 +648,16 @@ msgstr "Inicializando y finalizando el intérprete" #: ../Doc/c-api/init.rst:345 msgid "" "Initialize the Python interpreter. In an application embedding Python, " -"this should be called before using any other Python/C API functions; see :" -"ref:`Before Python Initialization ` for the few exceptions." +"this should be called before using any other Python/C API functions; " +"see :ref:`Before Python Initialization ` for the few " +"exceptions." msgstr "" "Inicializa el intérprete de Python. En una aplicación que incorpora Python, " -"se debe llamar antes de usar cualquier otra función de API Python/C; vea :" -"ref:`Antes de la inicialización de Python ` para ver algunas " -"excepciones." +"se debe llamar antes de usar cualquier otra función de API Python/C; " +"vea :ref:`Antes de la inicialización de Python ` para ver " +"algunas excepciones." #: ../Doc/c-api/init.rst:349 -#, fuzzy msgid "" "This initializes the table of loaded modules (``sys.modules``), and creates " "the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " @@ -690,19 +669,20 @@ msgid "" msgstr "" "Esto inicializa la tabla de módulos cargados (``sys.modules``) y crea los " "módulos fundamentales :mod:`builtins`, :mod:`__main__` y :mod:`sys`. También " -"inicializa la ruta de búsqueda del módulo (``sys.path``). No establece ``sys." -"argv``; use :c:func:`PySys_SetArgvEx` para eso. Este es un *no-op* cuando se " -"llama por segunda vez (sin llamar primero a :c:func:`Py_FinalizeEx`). No hay " -"valor de retorno; es un error fatal si falla la inicialización." +"inicializa la ruta de búsqueda de módulos (``sys.path``). No establece " +"``sys.argv``; utilice la nueva API :c:type:`PyConfig` de :ref:`Python " +"Initialization Configuration ` para ello. Esta es una operación " +"sin efecto cuando se llama por segunda vez (sin llamar primero " +"a :c:func:`Py_FinalizeEx`). No hay ningún valor de retorno; es un error " +"fatal si falla la inicialización." #: ../Doc/c-api/init.rst:359 ../Doc/c-api/init.rst:373 -#, fuzzy msgid "" -"Use the :c:func:`Py_InitializeFromConfig` function to customize the :ref:" -"`Python Initialization Configuration `." +"Use the :c:func:`Py_InitializeFromConfig` function to customize " +"the :ref:`Python Initialization Configuration `." msgstr "" -"Consulte también :ref:`Configuración de inicialización de Python `." +"Utilice la función :c:func:`Py_InitializeFromConfig` para " +"personalizar :ref:`Python Initialization Configuration `." #: ../Doc/c-api/init.rst:363 msgid "" @@ -730,49 +710,57 @@ msgid "" "false until :c:func:`Py_Initialize` is called again." msgstr "" "Retorna verdadero (distinto de cero) cuando el intérprete de Python se ha " -"inicializado, falso (cero) si no. Después de que se llama a :c:func:" -"`Py_FinalizeEx`, esto retorna falso hasta que :c:func:`Py_Initialize` se " -"llama de nuevo." +"inicializado, falso (cero) si no. Después de que se llama " +"a :c:func:`Py_FinalizeEx`, esto retorna falso hasta " +"que :c:func:`Py_Initialize` se llama de nuevo." #: ../Doc/c-api/init.rst:386 msgid "" "Return true (non-zero) if the main Python interpreter is :term:`shutting " "down `. Return false (zero) otherwise." msgstr "" +"Devuelve verdadero (distinto de cero) si el intérprete principal de Python " +"es :term:`shutting down `. Devuelve falso (cero) en " +"caso contrario." #: ../Doc/c-api/init.rst:394 -#, fuzzy msgid "" "Undo all initializations made by :c:func:`Py_Initialize` and subsequent use " -"of Python/C API functions, and destroy all sub-interpreters (see :c:func:" -"`Py_NewInterpreter` below) that were created and not yet destroyed since the " -"last call to :c:func:`Py_Initialize`. Ideally, this frees all memory " -"allocated by the Python interpreter. This is a no-op when called for a " -"second time (without calling :c:func:`Py_Initialize` again first)." -msgstr "" -"Deshace todas las inicializaciones realizadas por :c:func:`Py_Initialize` y " -"el uso posterior de las funciones de Python/C API, y destruye todos los sub-" -"intérpretes (ver :c:func:`Py_NewInterpreter` a continuación) que se crearon " -"y aún no se destruyeron desde el última llamada a :c:func:`Py_Initialize`. " -"Idealmente, esto libera toda la memoria asignada por el intérprete de " -"Python. Este es un *no-op* cuando se llama por segunda vez (sin llamar a :c:" -"func:`Py_Initialize` nuevamente primero). Normalmente el valor de retorno es " -"``0``. Si hubo errores durante la finalización (lavado de datos almacenados " -"en el búfer), se retorna ``-1``." +"of Python/C API functions, and destroy all sub-interpreters " +"(see :c:func:`Py_NewInterpreter` below) that were created and not yet " +"destroyed since the last call to :c:func:`Py_Initialize`. Ideally, this " +"frees all memory allocated by the Python interpreter. This is a no-op when " +"called for a second time (without calling :c:func:`Py_Initialize` again " +"first)." +msgstr "" +"Deshaga todas las inicializaciones realizadas por :c:func:`Py_Initialize` y " +"el uso posterior de las funciones de la API de Python/C, y destruya todos " +"los subintérpretes (consulte :c:func:`Py_NewInterpreter` a continuación) que " +"se crearon y aún no se destruyeron desde la última llamada " +"a :c:func:`Py_Initialize`. Idealmente, esto libera toda la memoria asignada " +"por el intérprete de Python. Esta es una operación sin efecto cuando se " +"llama por segunda vez (sin llamar a :c:func:`Py_Initialize` nuevamente " +"primero)." #: ../Doc/c-api/init.rst:401 msgid "" "Since this is the reverse of :c:func:`Py_Initialize`, it should be called in " "the same thread with the same interpreter active. That means the main " -"thread and the main interpreter. This should never be called while :c:func:" -"`Py_RunMain` is running." +"thread and the main interpreter. This should never be called " +"while :c:func:`Py_RunMain` is running." msgstr "" +"Dado que se trata del proceso inverso de :c:func:`Py_Initialize`, se debe " +"llamar en el mismo subproceso con el mismo intérprete activo, es decir, el " +"subproceso principal y el intérprete principal. Nunca se debe llamar " +"mientras se esté ejecutando :c:func:`Py_RunMain`." #: ../Doc/c-api/init.rst:406 msgid "" "Normally the return value is ``0``. If there were errors during finalization " "(flushing buffered data), ``-1`` is returned." msgstr "" +"Normalmente, el valor de retorno es ``0``. Si se produjeron errores durante " +"la finalización (limpieza de datos almacenados en búfer), se devuelve ``-1``." #: ../Doc/c-api/init.rst:410 msgid "" @@ -794,7 +782,6 @@ msgstr "" "aplicación." #: ../Doc/c-api/init.rst:418 -#, fuzzy msgid "" "**Bugs and caveats:** The destruction of modules and objects in modules is " "done in random order; this may cause destructors (:meth:`~object.__del__` " @@ -808,34 +795,34 @@ msgid "" "an application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` " "more than once." msgstr "" -"**Errores y advertencias:** La destrucción de módulos y objetos en módulos " -"se realiza en orden aleatorio; esto puede causar que los destructores " -"(métodos :meth:`__del__`) fallen cuando dependen de otros objetos (incluso " -"funciones) o módulos. Los módulos de extensión cargados dinámicamente " -"cargados por Python no se descargan. Es posible que no se liberen pequeñas " -"cantidades de memoria asignadas por el intérprete de Python (si encuentra " -"una fuga, informe por favor). La memoria atada en referencias circulares " -"entre objetos no se libera. Es posible que parte de la memoria asignada por " -"los módulos de extensión no se libere. Algunas extensiones pueden no " -"funcionar correctamente si su rutina de inicialización se llama más de una " -"vez; Esto puede suceder si una aplicación llama a :c:func:`Py_Initialize` y :" -"c:func:`Py_FinalizeEx` más de una vez." +"**Bugs and caveats:** La destrucción de módulos y objetos en módulos se " +"realiza en orden aleatorio; esto puede provocar que los destructores " +"(métodos :meth:`~object.__del__`) fallen cuando dependen de otros objetos " +"(incluso funciones) o módulos. Los módulos de extensión cargados " +"dinámicamente por Python no se descargan. Es posible que pequeñas cantidades " +"de memoria asignadas por el intérprete de Python no se liberen (si encuentra " +"una fuga, infórmelo). La memoria atada en referencias circulares entre " +"objetos no se libera. Es posible que no se libere parte de la memoria " +"asignada por los módulos de extensión. Es posible que algunas extensiones no " +"funcionen correctamente si su rutina de inicialización se llama más de una " +"vez; esto puede suceder si una aplicación llama a :c:func:`Py_Initialize` " +"y :c:func:`Py_FinalizeEx` más de una vez." #: ../Doc/c-api/init.rst:429 msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"_PySys_ClearAuditHooks`` with no arguments." +"Raises an :ref:`auditing event ` " +"``cpython._PySys_ClearAuditHooks`` with no arguments." msgstr "" -"Genera un :ref:`evento de auditoría ` ``cpython." -"_PySys_ClearAuditHooks`` sin argumentos." +"Genera un :ref:`evento de auditoría ` " +"``cpython._PySys_ClearAuditHooks`` sin argumentos." #: ../Doc/c-api/init.rst:435 msgid "" "This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " "disregards the return value." msgstr "" -"Esta es una versión compatible con versiones anteriores de :c:func:" -"`Py_FinalizeEx` que ignora el valor de retorno." +"Esta es una versión compatible con versiones anteriores " +"de :c:func:`Py_FinalizeEx` que ignora el valor de retorno." #: ../Doc/c-api/init.rst:440 msgid "Process-wide parameters" @@ -843,9 +830,9 @@ msgstr "Parámetros de todo el proceso" #: ../Doc/c-api/init.rst:450 msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"program_name` should be used instead, see :ref:`Python Initialization " -"Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.program_name` should be used instead, " +"see :ref:`Python Initialization Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " "lugar, se debe usar la configuración de :c:member:`PyConfig.program_name`, " @@ -878,22 +865,22 @@ msgstr "" #: ../Doc/c-api/init.rst:465 ../Doc/c-api/init.rst:704 #: ../Doc/c-api/init.rst:740 ../Doc/c-api/init.rst:766 msgid "" -"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" -"`wchar_*` string." +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get " +"a :c:expr:`wchar_*` string." msgstr "" "Utilice :c:func:`Py_DecodeLocale` para decodificar una cadena de bytes para " "obtener una cadena de tipo :c:expr:`wchar_*`." #: ../Doc/c-api/init.rst:473 -#, fuzzy msgid "" "Return the program name set with :c:member:`PyConfig.program_name`, or the " "default. The returned string points into static storage; the caller should " "not modify its value." msgstr "" -"Retorna el nombre del programa establecido con :c:func:`Py_SetProgramName`, " -"o el valor predeterminado. La cadena de caracteres retornada apunta al " -"almacenamiento estático; la persona que llama no debe modificar su valor." +"Devuelve el nombre del programa establecido " +"con :c:member:`PyConfig.program_name` o el valor predeterminado. La cadena " +"devuelta apunta a un almacenamiento estático; el llamador no debe modificar " +"su valor." #: ../Doc/c-api/init.rst:477 ../Doc/c-api/init.rst:499 #: ../Doc/c-api/init.rst:543 ../Doc/c-api/init.rst:564 @@ -910,15 +897,14 @@ msgstr "" #: ../Doc/c-api/init.rst:595 ../Doc/c-api/init.rst:781 msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." msgstr "" -"Todas las siguientes funciones deben llamarse después de :c:func:" -"`Py_Initialize`, de lo contrario retornará ``NULL``." +"Todas las siguientes funciones deben llamarse después " +"de :c:func:`Py_Initialize`, de lo contrario retornará ``NULL``." #: ../Doc/c-api/init.rst:483 ../Doc/c-api/init.rst:570 msgid "Get :data:`sys.executable` instead." -msgstr "" +msgstr "Obtenga :data:`sys.executable` en su lugar." #: ../Doc/c-api/init.rst:489 -#, fuzzy msgid "" "Return the *prefix* for installed platform-independent files. This is " "derived through a number of complicated rules from the program name set " @@ -931,47 +917,46 @@ msgid "" "available to Python code as ``sys.prefix``. It is only useful on Unix. See " "also the next function." msgstr "" -"Retorna el prefijo *prefix* para los archivos instalados independientes de " -"la plataforma. Esto se deriva a través de una serie de reglas complicadas " -"del nombre del programa establecido con :c:func:`Py_SetProgramName` y " +"Devuelve el *prefix* para los archivos instalados independientes de la " +"plataforma. Esto se deriva a través de una serie de reglas complicadas del " +"nombre del programa establecido con :c:member:`PyConfig.program_name` y " "algunas variables de entorno; por ejemplo, si el nombre del programa es ``'/" -"usr/local/bin/python'``, el prefijo es ``'/usr/local'``. La cadena de " -"caracteres retornada apunta al almacenamiento estático; la persona que llama " -"no debe modificar su valor. Esto corresponde a la variable :makevar:`prefix` " -"en el archivo de nivel superior :file:`Makefile` y el argumento ``--prefix`` " -"a la secuencia de comandos (*script*) :program:`configure` en tiempo de " -"compilación. El valor está disponible para el código de Python como ``sys." -"prefix``. Solo es útil en Unix. Ver también la siguiente función." +"usr/local/bin/python'``, el prefijo es ``'/usr/local'``. La cadena devuelta " +"apunta a un almacenamiento estático; el llamador no debe modificar su valor. " +"Esto corresponde a la variable :makevar:`prefix` en el :file:`Makefile` de " +"nivel superior y al argumento :option:`--prefix` del " +"script :program:`configure` en el momento de la compilación. El valor está " +"disponible para el código Python como ``sys.prefix``. Solo es útil en Unix. " +"Consulte también la siguiente función." #: ../Doc/c-api/init.rst:505 msgid "Get :data:`sys.prefix` instead." -msgstr "" +msgstr "Obtenga :data:`sys.prefix` en su lugar." #: ../Doc/c-api/init.rst:511 -#, fuzzy msgid "" "Return the *exec-prefix* for installed platform-*dependent* files. This is " "derived through a number of complicated rules from the program name set " "with :c:member:`PyConfig.program_name` and some environment variables; for " "example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix " "is ``'/usr/local'``. The returned string points into static storage; the " -"caller should not modify its value. This corresponds to the :makevar:" -"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-" -"prefix`` argument to the :program:`configure` script at build time. The " -"value is available to Python code as ``sys.exec_prefix``. It is only useful " -"on Unix." -msgstr "" -"Retorna el *exec-prefix* para los archivos instalados *dependientes* de la " -"plataforma. Esto se deriva a través de una serie de reglas complicadas del " -"nombre del programa establecido con :c:func:`Py_SetProgramName` y algunas " -"variables de entorno; por ejemplo, si el nombre del programa es ``'/usr/" -"local/bin/python'``, el prefijo `exec` es ``'/usr/local'``. La cadena de " -"caracteres retornada apunta al almacenamiento estático; la persona que llama " -"no debe modificar su valor. Esto corresponde a la variable :makevar:" -"`exec_prefix` en el archivo de nivel superior :file:`Makefile` y el " -"argumento ``--exec-prefix`` a la secuencia de comandos (*script*) :program:" -"`configure` en tiempo de compilación. El valor está disponible para el " -"código de Python como ``sys.exec_prefix``. Solo es útil en Unix." +"caller should not modify its value. This corresponds to " +"the :makevar:`exec_prefix` variable in the top-level :file:`Makefile` and " +"the ``--exec-prefix`` argument to the :program:`configure` script at build " +"time. The value is available to Python code as ``sys.exec_prefix``. It is " +"only useful on Unix." +msgstr "" +"Devuelve el *exec-prefix* para los archivos instalados de la plataforma " +"*dependent*. Esto se deriva a través de una serie de reglas complicadas del " +"nombre del programa establecido con :c:member:`PyConfig.program_name` y " +"algunas variables de entorno; por ejemplo, si el nombre del programa es ``'/" +"usr/local/bin/python'``, el prefijo de ejecución es ``'/usr/local'``. La " +"cadena devuelta apunta a un almacenamiento estático; el llamador no debe " +"modificar su valor. Esto corresponde a la variable :makevar:`exec_prefix` en " +"el :file:`Makefile` de nivel superior y al argumento ``--exec-prefix`` del " +"script :program:`configure` en el momento de la compilación. El valor está " +"disponible para el código Python como ``sys.exec_prefix``. Solo es útil en " +"Unix." #: ../Doc/c-api/init.rst:521 msgid "" @@ -984,9 +969,9 @@ msgstr "" "Antecedentes: el prefijo *exec* difiere del prefijo cuando los archivos " "dependientes de la plataforma (como ejecutables y bibliotecas compartidas) " "se instalan en un árbol de directorios diferente. En una instalación típica, " -"los archivos dependientes de la plataforma pueden instalarse en el subárbol :" -"file:`/usr/local/plat` mientras que la plataforma independiente puede " -"instalarse en :file:`/usr/local`." +"los archivos dependientes de la plataforma pueden instalarse en el " +"subárbol :file:`/usr/local/plat` mientras que la plataforma independiente " +"puede instalarse en :file:`/usr/local`." #: ../Doc/c-api/init.rst:527 msgid "" @@ -1016,22 +1001,21 @@ msgstr "" #: ../Doc/c-api/init.rst:538 msgid "" -"System administrators will know how to configure the :program:`mount` or :" -"program:`automount` programs to share :file:`/usr/local` between platforms " -"while having :file:`/usr/local/plat` be a different filesystem for each " -"platform." +"System administrators will know how to configure the :program:`mount` " +"or :program:`automount` programs to share :file:`/usr/local` between " +"platforms while having :file:`/usr/local/plat` be a different filesystem for " +"each platform." msgstr "" -"Los administradores de sistemas sabrán cómo configurar los programas :" -"program:`mount` o :program:`automount` para compartir :file:`/usr/local` " -"entre plataformas mientras que :file:`/usr/local/plat` sea un sistema de " -"archivos diferente para cada plataforma." +"Los administradores de sistemas sabrán cómo configurar los " +"programas :program:`mount` o :program:`automount` para compartir :file:`/usr/" +"local` entre plataformas mientras que :file:`/usr/local/plat` sea un sistema " +"de archivos diferente para cada plataforma." #: ../Doc/c-api/init.rst:549 msgid "Get :data:`sys.exec_prefix` instead." -msgstr "" +msgstr "Obtenga :data:`sys.exec_prefix` en su lugar." #: ../Doc/c-api/init.rst:558 -#, fuzzy msgid "" "Return the full program name of the Python executable; this is computed as " "a side-effect of deriving the default module search path from the program " @@ -1039,15 +1023,14 @@ msgid "" "into static storage; the caller should not modify its value. The value is " "available to Python code as ``sys.executable``." msgstr "" -"Retorna el nombre completo del programa del ejecutable de Python; esto se " -"calcula como un efecto secundario de derivar la ruta de búsqueda " -"predeterminada del módulo del nombre del programa (establecido por :c:func:" -"`Py_SetProgramName` arriba). La cadena de caracteres retornada apunta al " -"almacenamiento estático; la persona que llama no debe modificar su valor. El " -"valor está disponible para el código de Python como ``sys.executable``." +"Devuelve el nombre completo del programa ejecutable de Python; esto se " +"calcula como un efecto secundario de derivar la ruta de búsqueda del módulo " +"predeterminado a partir del nombre del programa (establecido " +"por :c:member:`PyConfig.program_name`). La cadena devuelta apunta a un " +"almacenamiento estático; el llamador no debe modificar su valor. El valor " +"está disponible para el código Python como ``sys.executable``." #: ../Doc/c-api/init.rst:580 -#, fuzzy msgid "" "Return the default module search path; this is computed from the program " "name (set by :c:member:`PyConfig.program_name`) and some environment " @@ -1059,20 +1042,20 @@ msgid "" "startup; it can be (and usually is) modified later to change the search path " "for loading modules." msgstr "" -"Retorna la ruta de búsqueda del módulo predeterminado; esto se calcula a " -"partir del nombre del programa (establecido por :c:func:`Py_SetProgramName` " -"antes mencionado) y algunas variables de entorno. La cadena de caracteres " -"retornada consiste en una serie de nombres de directorio separados por un " -"carácter delimitador dependiente de la plataforma. El carácter delimitador " -"es ``':'`` en Unix y macOS, ``';'`` en Windows. La cadena de caracteres " -"retornada apunta al almacenamiento estático; la persona que llama no debe " -"modificar su valor. La lista :data:`sys.path` se inicializa con este valor " -"en el inicio del intérprete; se puede (y generalmente se realiza) modificar " -"más adelante para cambiar la ruta de búsqueda para cargar módulos." +"Devuelve la ruta de búsqueda del módulo predeterminada; esto se calcula a " +"partir del nombre del programa (establecido " +"por :c:member:`PyConfig.program_name`) y algunas variables de entorno. La " +"cadena devuelta consta de una serie de nombres de directorio separados por " +"un carácter delimitador dependiente de la plataforma. El carácter " +"delimitador es ``':'`` en Unix y macOS, ``';'`` en Windows. La cadena " +"devuelta apunta a un almacenamiento estático; el llamador no debe modificar " +"su valor. La lista :data:`sys.path` se inicializa con este valor al iniciar " +"el intérprete; se puede modificar (y generalmente se modifica) más tarde " +"para cambiar la ruta de búsqueda para cargar módulos." #: ../Doc/c-api/init.rst:598 msgid "Get :data:`sys.path` instead." -msgstr "" +msgstr "Obtenga :data:`sys.path` en su lugar." #: ../Doc/c-api/init.rst:604 msgid "" @@ -1084,15 +1067,15 @@ msgstr "" #: ../Doc/c-api/init.rst:607 msgid "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" -msgstr "" +msgstr "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" #: ../Doc/c-api/init.rst:611 msgid "" "The first word (up to the first space character) is the current Python " "version; the first characters are the major and minor version separated by a " "period. The returned string points into static storage; the caller should " -"not modify its value. The value is available to Python code as :data:`sys." -"version`." +"not modify its value. The value is available to Python code " +"as :data:`sys.version`." msgstr "" "La primera palabra (hasta el primer carácter de espacio) es la versión " "actual de Python; los primeros tres caracteres son la versión mayor y menor " @@ -1154,7 +1137,7 @@ msgstr "" #: ../Doc/c-api/init.rst:649 msgid "\"[GCC 2.7.2.2]\"" -msgstr "" +msgstr "\"[GCC 2.7.2.2]\"" #: ../Doc/c-api/init.rst:653 ../Doc/c-api/init.rst:667 msgid "" @@ -1176,19 +1159,20 @@ msgstr "" #: ../Doc/c-api/init.rst:663 msgid "\"#67, Aug 1 1997, 22:34:28\"" -msgstr "" +msgstr "\"#67, Aug 1 1997, 22:34:28\"" #: ../Doc/c-api/init.rst:679 msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` " -"should be used instead, see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` " +"and :c:member:`PyConfig.safe_path` should be used instead, see :ref:`Python " +"Initialization Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.argv`, :c:member:" -"`PyConfig.parse_argv` y :c:member:`PyConfig.safe_path`, consulta :ref:" -"`Configuración de inicialización de Python `." +"lugar, se debe usar la configuración " +"de :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` " +"y :c:member:`PyConfig.safe_path`, consulta :ref:`Configuración de " +"inicialización de Python `." #: ../Doc/c-api/init.rst:684 msgid "" @@ -1222,8 +1206,8 @@ msgstr "" #: ../Doc/c-api/init.rst:696 msgid "" "If the name of an existing script is passed in ``argv[0]``, the absolute " -"path of the directory where the script is located is prepended to :data:`sys." -"path`." +"path of the directory where the script is located is prepended " +"to :data:`sys.path`." msgstr "" "Si el nombre de una secuencia de comandos (*script*) existente se pasa en " "``argv[0]``, la ruta absoluta del directorio donde se encuentra el *script* " @@ -1236,8 +1220,8 @@ msgid "" "is the same as prepending the current working directory (``\".\"``)." msgstr "" "De lo contrario (es decir, si *argc* es ``0`` o ``argv[0]`` no apunta a un " -"nombre de archivo existente), una cadena de caracteres vacía se antepone a :" -"data:`sys.path`, que es lo mismo que anteponer el directorio de trabajo " +"nombre de archivo existente), una cadena de caracteres vacía se antepone " +"a :data:`sys.path`, que es lo mismo que anteponer el directorio de trabajo " "actual (``\".\"``)." #: ../Doc/c-api/init.rst:707 ../Doc/c-api/init.rst:743 @@ -1245,27 +1229,26 @@ msgid "" "See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " "members of the :ref:`Python Initialization Configuration `." msgstr "" -"Consulta también los miembros de :c:member:`PyConfig.orig_argv` y :c:member:" -"`PyConfig.argv` de :ref:`Python Initialization Configuration `." +"Consulta también los miembros de :c:member:`PyConfig.orig_argv` " +"y :c:member:`PyConfig.argv` de :ref:`Python Initialization Configuration " +"`." #: ../Doc/c-api/init.rst:711 -#, fuzzy msgid "" "It is recommended that applications embedding the Python interpreter for " "purposes other than executing a single script pass ``0`` as *updatepath*, " "and update :data:`sys.path` themselves if desired. See :cve:`2008-5983`." msgstr "" "Se recomienda que las aplicaciones que incorporan el intérprete de Python " -"para otros fines que no sean ejecutar una sola secuencia de comandos " -"(*script*) pasen ``0`` como *updatepath* y actualicen :data:`sys.path` si lo " -"desean. Ver `CVE-2008-5983 `_." +"para fines distintos a la ejecución de un único script pasen ``0`` como " +"*updatepath* y actualicen :data:`sys.path` por sí mismas si así lo desean. " +"Consulte :cve:`2008-5983`." #: ../Doc/c-api/init.rst:716 msgid "" "On versions before 3.1.3, you can achieve the same effect by manually " -"popping the first :data:`sys.path` element after having called :c:func:" -"`PySys_SetArgv`, for example using::" +"popping the first :data:`sys.path` element after having " +"called :c:func:`PySys_SetArgv`, for example using::" msgstr "" "En las versiones anteriores a 3.1.3, puede lograr el mismo efecto quitando " "manualmente el primer elemento (*popping*) :data:`sys.path` después de haber " @@ -1273,24 +1256,25 @@ msgstr "" #: ../Doc/c-api/init.rst:720 msgid "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" -msgstr "" +msgstr "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" #: ../Doc/c-api/init.rst:732 msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"argv` and :c:member:`PyConfig.parse_argv` should be used instead, see :ref:" -"`Python Initialization Configuration `." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` should " +"be used instead, see :ref:`Python Initialization Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.argv` y :c:" -"member:`PyConfig.parse_argv`, consulta :ref:`Configuración de inicialización " -"de Python `." +"lugar, se debe usar la configuración de :c:member:`PyConfig.argv` " +"y :c:member:`PyConfig.parse_argv`, consulta :ref:`Configuración de " +"inicialización de Python `." #: ../Doc/c-api/init.rst:736 msgid "" "This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " -"``1`` unless the :program:`python` interpreter was started with the :option:" -"`-I`." +"``1`` unless the :program:`python` interpreter was started with " +"the :option:`-I`." msgstr "" "Esta función funciona como :c:func:`PySys_SetArgvEx` con *updatepath* " "establecido en ``1`` a menos que el intérprete :program:`python` se haya " @@ -1302,13 +1286,13 @@ msgstr "El valor *updatepath* depende de la opción :option:`-I`." #: ../Doc/c-api/init.rst:753 msgid "" -"This API is kept for backward compatibility: setting :c:member:`PyConfig." -"home` should be used instead, see :ref:`Python Initialization Configuration " -"`." +"This API is kept for backward compatibility: " +"setting :c:member:`PyConfig.home` should be used instead, see :ref:`Python " +"Initialization Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" -"ref:`Configuración de inicialización de Python `." +"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, " +"consulta :ref:`Configuración de inicialización de Python `." #: ../Doc/c-api/init.rst:757 msgid "" @@ -1333,24 +1317,22 @@ msgstr "" "contenido de este almacenamiento." #: ../Doc/c-api/init.rst:774 -#, fuzzy msgid "" -"Return the default \"home\", that is, the value set by :c:member:`PyConfig." -"home`, or the value of the :envvar:`PYTHONHOME` environment variable if it " -"is set." +"Return the default \"home\", that is, the value set " +"by :c:member:`PyConfig.home`, or the value of the :envvar:`PYTHONHOME` " +"environment variable if it is set." msgstr "" -"Retorna el \"inicio\" (*home*) predeterminado, es decir, el valor " -"establecido por una llamada anterior a :c:func:`Py_SetPythonHome`, o el " -"valor de la variable de entorno :envvar:`PYTHONHOME` si está configurado." +"Devuelve el \"inicio\" predeterminado, es decir, el valor establecido " +"por :c:member:`PyConfig.home`, o el valor de la variable de " +"entorno :envvar:`PYTHONHOME` si está establecida." #: ../Doc/c-api/init.rst:784 -#, fuzzy msgid "" "Get :c:member:`PyConfig.home` or :envvar:`PYTHONHOME` environment variable " "instead." msgstr "" -"Establecido por la opción :option:`-O` y la variable de entorno :envvar:" -"`PYTHONOPTIMIZE`." +"Obtenga la variable de entorno :c:member:`PyConfig.home` " +"o :envvar:`PYTHONHOME` en su lugar." #: ../Doc/c-api/init.rst:792 msgid "Thread State and the Global Interpreter Lock" @@ -1379,20 +1361,21 @@ msgstr "" #: ../Doc/c-api/init.rst:809 msgid "" -"Therefore, the rule exists that only the thread that has acquired the :term:" -"`GIL` may operate on Python objects or call Python/C API functions. In order " -"to emulate concurrency of execution, the interpreter regularly tries to " -"switch threads (see :func:`sys.setswitchinterval`). The lock is also " -"released around potentially blocking I/O operations like reading or writing " -"a file, so that other Python threads can run in the meantime." -msgstr "" -"Por lo tanto, existe la regla de que solo el hilo que ha adquirido :term:" -"`GIL` puede operar en objetos Python o llamar a funciones API Python/C. Para " -"emular la concurrencia de ejecución, el intérprete regularmente intenta " -"cambiar los hilos (ver :func:`sys.setswitchinterval`). El bloqueo también se " -"libera para bloquear potencialmente las operaciones de E/S, como leer o " -"escribir un archivo, para que otros hilos de Python puedan ejecutarse " -"mientras tanto." +"Therefore, the rule exists that only the thread that has acquired " +"the :term:`GIL` may operate on Python objects or call Python/C API " +"functions. In order to emulate concurrency of execution, the interpreter " +"regularly tries to switch threads (see :func:`sys.setswitchinterval`). The " +"lock is also released around potentially blocking I/O operations like " +"reading or writing a file, so that other Python threads can run in the " +"meantime." +msgstr "" +"Por lo tanto, existe la regla de que solo el hilo que ha " +"adquirido :term:`GIL` puede operar en objetos Python o llamar a funciones " +"API Python/C. Para emular la concurrencia de ejecución, el intérprete " +"regularmente intenta cambiar los hilos (ver :func:`sys.setswitchinterval`). " +"El bloqueo también se libera para bloquear potencialmente las operaciones de " +"E/S, como leer o escribir un archivo, para que otros hilos de Python puedan " +"ejecutarse mientras tanto." #: ../Doc/c-api/init.rst:819 msgid "" @@ -1402,9 +1385,10 @@ msgid "" "retrieved using :c:func:`PyThreadState_Get`." msgstr "" "El intérprete de Python mantiene cierta información de contabilidad " -"específica de hilos dentro de una estructura de datos llamada :c:type:" -"`PyThreadState`. También hay una variable global que apunta a la actual :c:" -"type:`PyThreadState`: se puede recuperar usando :c:func:`PyThreadState_Get`." +"específica de hilos dentro de una estructura de datos " +"llamada :c:type:`PyThreadState`. También hay una variable global que apunta " +"a la actual :c:type:`PyThreadState`: se puede recuperar " +"usando :c:func:`PyThreadState_Get`." #: ../Doc/c-api/init.rst:825 msgid "Releasing the GIL from extension code" @@ -1426,6 +1410,11 @@ msgid "" "Reacquire the global interpreter lock.\n" "Restore the thread state from the local variable." msgstr "" +"Guarde el estado del subproceso en una variable local.\n" +"Libere el bloqueo del intérprete global.\n" +"... Realice alguna operación de E/S de bloqueo...\n" +"Recupere el bloqueo del intérprete global.\n" +"Restaure el estado del subproceso desde la variable local." #: ../Doc/c-api/init.rst:836 msgid "This is so common that a pair of macros exists to simplify it::" @@ -1437,6 +1426,9 @@ msgid "" "... Do some blocking I/O operation ...\n" "Py_END_ALLOW_THREADS" msgstr "" +"Py_BEGIN_ALLOW_THREADS\n" +"... Hace alguna operación bloqueante en I/O ...\n" +"Py_END_ALLOW_THREADS" #: ../Doc/c-api/init.rst:846 msgid "" @@ -1460,6 +1452,11 @@ msgid "" "... Do some blocking I/O operation ...\n" "PyEval_RestoreThread(_save);" msgstr "" +"PyThreadState *_save;\n" +"\n" +"_save = PyEval_SaveThread();\n" +"... Realizar alguna operación de bloqueo de E/S...\n" +"PyEval_RestoreThread(_save);" #: ../Doc/c-api/init.rst:862 msgid "" @@ -1502,10 +1499,10 @@ msgstr "Hilos creados sin Python" #: ../Doc/c-api/init.rst:884 msgid "" -"When threads are created using the dedicated Python APIs (such as the :mod:" -"`threading` module), a thread state is automatically associated to them and " -"the code showed above is therefore correct. However, when threads are " -"created from C (for example by a third-party library with its own thread " +"When threads are created using the dedicated Python APIs (such as " +"the :mod:`threading` module), a thread state is automatically associated to " +"them and the code showed above is therefore correct. However, when threads " +"are created from C (for example by a third-party library with its own thread " "management), they don't hold the GIL, nor is there a thread state structure " "for them." msgstr "" @@ -1558,20 +1555,30 @@ msgid "" "/* Release the thread. No Python API allowed beyond this point. */\n" "PyGILState_Release(gstate);" msgstr "" +"PyGILState_STATE gstate;\n" +"gstate = PyGILState_Ensure();\n" +"\n" +"/* Realizar acciones de Python aquí. */\n" +"result = CallSomeFunction();\n" +"/* evaluar el resultado o manejar la excepción */\n" +"\n" +"/* Liberar el hilo. No se permite ninguna API de Python más allá de este " +"punto. */\n" +"PyGILState_Release(gstate);" #: ../Doc/c-api/init.rst:913 msgid "" "Note that the ``PyGILState_*`` functions assume there is only one global " "interpreter (created automatically by :c:func:`Py_Initialize`). Python " -"supports the creation of additional interpreters (using :c:func:" -"`Py_NewInterpreter`), but mixing multiple interpreters and the " -"``PyGILState_*`` API is unsupported." +"supports the creation of additional interpreters " +"(using :c:func:`Py_NewInterpreter`), but mixing multiple interpreters and " +"the ``PyGILState_*`` API is unsupported." msgstr "" "Tenga en cuenta que las funciones ``PyGILState_*`` asumen que solo hay un " "intérprete global (creado automáticamente por :c:func:`Py_Initialize`). " -"Python admite la creación de intérpretes adicionales (usando :c:func:" -"`Py_NewInterpreter`), pero la mezcla de varios intérpretes y la API " -"``PyGILState_*`` no está soportada." +"Python admite la creación de intérpretes adicionales " +"(usando :c:func:`Py_NewInterpreter`), pero la mezcla de varios intérpretes y " +"la API ``PyGILState_*`` no está soportada." #: ../Doc/c-api/init.rst:923 msgid "Cautions about fork()" @@ -1586,14 +1593,13 @@ msgid "" "CPython's runtime." msgstr "" "Otra cosa importante a tener en cuenta sobre los hilos es su comportamiento " -"frente a la llamada C :c:func:`fork`. En la mayoría de los sistemas con :c:" -"func:`fork`, después de que un proceso se bifurca, solo existirá el hilo que " -"emitió el *fork*. Esto tiene un impacto concreto tanto en cómo se deben " -"manejar las cerraduras como en todo el estado almacenado en el tiempo de " -"ejecución de CPython." +"frente a la llamada C :c:func:`fork`. En la mayoría de los sistemas " +"con :c:func:`fork`, después de que un proceso se bifurca, solo existirá el " +"hilo que emitió el *fork*. Esto tiene un impacto concreto tanto en cómo se " +"deben manejar las cerraduras como en todo el estado almacenado en el tiempo " +"de ejecución de CPython." #: ../Doc/c-api/init.rst:931 -#, fuzzy msgid "" "The fact that only the \"current\" thread remains means any locks held by " "other threads will never be released. Python solves this for :func:`os.fork` " @@ -1603,27 +1609,27 @@ msgid "" "of additional (non-Python) locks that need to be acquired before or reset " "after a fork. OS facilities such as :c:func:`!pthread_atfork` would need to " "be used to accomplish the same thing. Additionally, when extending or " -"embedding Python, calling :c:func:`fork` directly rather than through :func:" -"`os.fork` (and returning to or calling into Python) may result in a deadlock " -"by one of Python's internal locks being held by a thread that is defunct " -"after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the necessary " -"locks, but is not always able to." -msgstr "" -"El hecho de que solo permanezca al hilo \"actual\" significa que ningún " -"bloqueo retenido por otros hilos nunca se liberará. Python resuelve esto " +"embedding Python, calling :c:func:`fork` directly rather than " +"through :func:`os.fork` (and returning to or calling into Python) may result " +"in a deadlock by one of Python's internal locks being held by a thread that " +"is defunct after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the " +"necessary locks, but is not always able to." +msgstr "" +"El hecho de que solo permanezca el hilo \"actual\" significa que los " +"bloqueos mantenidos por otros hilos nunca se liberarán. Python resuelve esto " "para :func:`os.fork` adquiriendo los bloqueos que usa internamente antes de " -"la bifurcación (*fork*) y soltándolos después. Además, restablece cualquier :" -"ref:`lock-objects` en el elemento secundario. Al extender o incrustar " -"Python, no hay forma de informar a Python de bloqueos adicionales (que no " -"sean Python) que deben adquirirse antes o restablecerse después de una " -"bifurcación. Las instalaciones del sistema operativo como :c:func:" -"`pthread_atfork` tendrían que usarse para lograr lo mismo. Además, al " -"extender o incrustar Python, llamando :c:func:`fork` directamente en lugar " -"de a través de :func:`os.fork` (y retornar o llamar a Python) puede resultar " -"en un punto muerto (*deadlock*) por uno de los bloqueos internos de Python. " -"sostenido por un hilo que no funciona después del *fork*. :c:func:" -"`PyOS_AfterFork_Child` intenta restablecer los bloqueos necesarios, pero no " -"siempre puede hacerlo." +"la bifurcación y liberándolos después. Además, restablece " +"cualquier :ref:`lock-objects` en el hijo. Al extender o incrustar Python, no " +"hay forma de informar a Python de bloqueos adicionales (que no sean de " +"Python) que deben adquirirse antes o restablecerse después de una " +"bifurcación. Se necesitarían usar recursos del sistema operativo " +"como :c:func:`!pthread_atfork` para lograr lo mismo. Además, al extender o " +"incrustar Python, llamar a :c:func:`fork` directamente en lugar de a través " +"de :func:`os.fork` (y regresar a Python o llamar a Python) puede resultar en " +"un bloqueo por uno de los bloqueos internos de Python que está retenido por " +"un hilo que está inactivo después de la " +"bifurcación. :c:func:`PyOS_AfterFork_Child` intenta restablecer los bloqueos " +"necesarios, pero no siempre puede hacerlo." #: ../Doc/c-api/init.rst:946 msgid "" @@ -1638,13 +1644,13 @@ msgid "" "called immediately after." msgstr "" "El hecho de que todos los otros hilos desaparezcan también significa que el " -"estado de ejecución de CPython debe limpiarse correctamente, lo que :func:" -"`os.fork` lo hace. Esto significa finalizar todos los demás objetos :c:type:" -"`PyThreadState` que pertenecen al intérprete actual y todos los demás " -"objetos :c:type:`PyInterpreterState`. Debido a esto y a la naturaleza " -"especial del :ref:`intérprete \"principal\" `, :c:" -"func:`fork` solo debería llamarse en el hilo \"principal\" de ese " -"intérprete, donde el CPython global el tiempo de ejecución se inicializó " +"estado de ejecución de CPython debe limpiarse correctamente, lo " +"que :func:`os.fork` lo hace. Esto significa finalizar todos los demás " +"objetos :c:type:`PyThreadState` que pertenecen al intérprete actual y todos " +"los demás objetos :c:type:`PyInterpreterState`. Debido a esto y a la " +"naturaleza especial del :ref:`intérprete \"principal\" `, :c:func:`fork` solo debería llamarse en el hilo \"principal\" de " +"ese intérprete, donde el CPython global el tiempo de ejecución se inicializó " "originalmente. La única excepción es si :c:func:`exec` se llamará " "inmediatamente después." @@ -1686,19 +1692,16 @@ msgstr "" "pertenezcan." #: ../Doc/c-api/init.rst:979 -#, fuzzy msgid "" "This data structure represents the state of a single thread. The only " "public data member is:" msgstr "" -"Esta estructura de datos representa el estado de un solo hilo. El único " -"miembro de datos públicos es :attr:`interp` (:c:expr:`PyInterpreterState " -"*`), que apunta al estado del intérprete de este hilo." +"Esta estructura de datos representa el estado de un único subproceso. El " +"único miembro de datos público es:" #: ../Doc/c-api/init.rst:984 -#, fuzzy msgid "This thread's interpreter state." -msgstr "Retorna el objeto de estado del intérprete principal." +msgstr "Estado del intérprete de este hilo." #: ../Doc/c-api/init.rst:995 msgid "Deprecated function which does nothing." @@ -1754,7 +1757,6 @@ msgstr "" #: ../Doc/c-api/init.rst:1030 ../Doc/c-api/init.rst:1089 #: ../Doc/c-api/init.rst:1371 -#, fuzzy msgid "" "Calling this function from a thread when the runtime is finalizing will " "terminate the thread, even if the thread was not created by Python. You can " @@ -1762,11 +1764,11 @@ msgid "" "interpreter is in process of being finalized before calling this function to " "avoid unwanted termination." msgstr "" -"Llamar a esta función desde un hilo cuando finalice el tiempo de ejecución " -"terminará el hilo, incluso si Python no creó el hilo. Puede usar :c:func:" -"`_Py_IsFinalizing` o :func:`sys.is_finalizing` para verificar si el " -"intérprete está en proceso de finalización antes de llamar a esta función " -"para evitar una terminación no deseada." +"Si se llama a esta función desde un subproceso cuando el entorno de " +"ejecución está finalizando, se terminará el subproceso, incluso si Python no " +"lo creó. Puede usar :c:func:`Py_IsFinalizing` o :func:`sys.is_finalizing` " +"para verificar si el intérprete está en proceso de finalización antes de " +"llamar a esta función para evitar una finalización no deseada." #: ../Doc/c-api/init.rst:1038 msgid "" @@ -1779,9 +1781,8 @@ msgstr "" "error fatal (por lo que la persona que llama no necesita verificar ``NULL``)." #: ../Doc/c-api/init.rst:1042 -#, fuzzy msgid "See also :c:func:`PyThreadState_GetUnchecked`." -msgstr "Vea también :c:func:`PyEval_GetFrame`." +msgstr "Véase también :c:func:`PyThreadState_GetUnchecked`." #: ../Doc/c-api/init.rst:1047 msgid "" @@ -1789,12 +1790,17 @@ msgid "" "fatal error if it is NULL. The caller is responsible to check if the result " "is NULL." msgstr "" +"Similar a :c:func:`PyThreadState_Get`, pero no mata el proceso con un error " +"fatal si es NULL. El llamador es responsable de verificar si el resultado es " +"NULL." #: ../Doc/c-api/init.rst:1051 msgid "" "In Python 3.5 to 3.12, the function was private and known as " "``_PyThreadState_UncheckedGet()``." msgstr "" +"En Python 3.5 a 3.12, la función era privada y se conocía como " +"``_PyThreadState_UncheckedGet()``." #: ../Doc/c-api/init.rst:1058 msgid "" @@ -1820,38 +1826,39 @@ msgid "" "of the current state of Python, or of the global interpreter lock. This may " "be called as many times as desired by a thread as long as each call is " "matched with a call to :c:func:`PyGILState_Release`. In general, other " -"thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:" -"func:`PyGILState_Release` calls as long as the thread state is restored to " -"its previous state before the Release(). For example, normal usage of the :" -"c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros " -"is acceptable." +"thread-related APIs may be used between :c:func:`PyGILState_Ensure` " +"and :c:func:`PyGILState_Release` calls as long as the thread state is " +"restored to its previous state before the Release(). For example, normal " +"usage of the :c:macro:`Py_BEGIN_ALLOW_THREADS` " +"and :c:macro:`Py_END_ALLOW_THREADS` macros is acceptable." msgstr "" "Asegúrese de que el subproceso actual esté listo para llamar a la API de " "Python C, independientemente del estado actual de Python o del bloqueo " "global del intérprete. Esto se puede invocar tantas veces como lo desee un " -"subproceso siempre que cada llamada coincida con una llamada a :c:func:" -"`PyGILState_Release`. En general, se pueden usar otras API relacionadas con " -"subprocesos entre :c:func:`PyGILState_Ensure` y :c:func:`PyGILState_Release` " -"invoca siempre que el estado del subproceso se restablezca a su estado " -"anterior antes del *Release()*. Por ejemplo, el uso normal de las macros :c:" -"macro:`Py_BEGIN_ALLOW_THREADS` y :c:macro:`Py_END_ALLOW_THREADS` es " -"aceptable." +"subproceso siempre que cada llamada coincida con una llamada " +"a :c:func:`PyGILState_Release`. En general, se pueden usar otras API " +"relacionadas con subprocesos entre :c:func:`PyGILState_Ensure` " +"y :c:func:`PyGILState_Release` invoca siempre que el estado del subproceso " +"se restablezca a su estado anterior antes del *Release()*. Por ejemplo, el " +"uso normal de las macros :c:macro:`Py_BEGIN_ALLOW_THREADS` " +"y :c:macro:`Py_END_ALLOW_THREADS` es aceptable." #: ../Doc/c-api/init.rst:1078 msgid "" -"The return value is an opaque \"handle\" to the thread state when :c:func:" -"`PyGILState_Ensure` was called, and must be passed to :c:func:" -"`PyGILState_Release` to ensure Python is left in the same state. Even though " -"recursive calls are allowed, these handles *cannot* be shared - each unique " -"call to :c:func:`PyGILState_Ensure` must save the handle for its call to :c:" -"func:`PyGILState_Release`." -msgstr "" -"El valor de retorno es un \"identificador\" opaco al estado del hilo cuando :" -"c:func:`PyGILState_Ensure` fue llamado, y debe pasarse a :c:func:" -"`PyGILState_Release` para asegurar que Python se deje en el mismo estado. " -"Aunque las llamadas recursivas están permitidas, estos identificadores *no* " -"pueden compartirse; cada llamada única a :c:func:`PyGILState_Ensure` debe " -"guardar el identificador para su llamada a :c:func:`PyGILState_Release`." +"The return value is an opaque \"handle\" to the thread state " +"when :c:func:`PyGILState_Ensure` was called, and must be passed " +"to :c:func:`PyGILState_Release` to ensure Python is left in the same state. " +"Even though recursive calls are allowed, these handles *cannot* be shared - " +"each unique call to :c:func:`PyGILState_Ensure` must save the handle for its " +"call to :c:func:`PyGILState_Release`." +msgstr "" +"El valor de retorno es un \"identificador\" opaco al estado del hilo " +"cuando :c:func:`PyGILState_Ensure` fue llamado, y debe pasarse " +"a :c:func:`PyGILState_Release` para asegurar que Python se deje en el mismo " +"estado. Aunque las llamadas recursivas están permitidas, estos " +"identificadores *no* pueden compartirse; cada llamada única " +"a :c:func:`PyGILState_Ensure` debe guardar el identificador para su llamada " +"a :c:func:`PyGILState_Release`." #: ../Doc/c-api/init.rst:1085 msgid "" @@ -1864,22 +1871,23 @@ msgstr "" #: ../Doc/c-api/init.rst:1097 msgid "" "Release any resources previously acquired. After this call, Python's state " -"will be the same as it was prior to the corresponding :c:func:" -"`PyGILState_Ensure` call (but generally this state will be unknown to the " -"caller, hence the use of the GILState API)." +"will be the same as it was prior to the " +"corresponding :c:func:`PyGILState_Ensure` call (but generally this state " +"will be unknown to the caller, hence the use of the GILState API)." msgstr "" "Libera cualquier recurso previamente adquirido. Después de esta llamada, el " -"estado de Python será el mismo que antes de la llamada correspondiente :c:" -"func:`PyGILState_Ensure` (pero en general este estado será desconocido para " -"la persona que llama, de ahí el uso de la API ``GILState``)." +"estado de Python será el mismo que antes de la llamada " +"correspondiente :c:func:`PyGILState_Ensure` (pero en general este estado " +"será desconocido para la persona que llama, de ahí el uso de la API " +"``GILState``)." #: ../Doc/c-api/init.rst:1102 msgid "" -"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" -"func:`PyGILState_Release` on the same thread." +"Every call to :c:func:`PyGILState_Ensure` must be matched by a call " +"to :c:func:`PyGILState_Release` on the same thread." msgstr "" -"Cada llamada a :c:func:`PyGILState_Ensure` debe coincidir con una llamada a :" -"c:func:`PyGILState_Release` en el mismo hilo." +"Cada llamada a :c:func:`PyGILState_Ensure` debe coincidir con una llamada " +"a :c:func:`PyGILState_Release` en el mismo hilo." #: ../Doc/c-api/init.rst:1108 msgid "" @@ -1924,45 +1932,45 @@ msgstr "" #: ../Doc/c-api/init.rst:1134 msgid "" -"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" -"``. Note that it contains an opening brace; it must be matched with a " -"following :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further " -"discussion of this macro." +"This macro expands to ``{ PyThreadState *_save; _save = " +"PyEval_SaveThread();``. Note that it contains an opening brace; it must be " +"matched with a following :c:macro:`Py_END_ALLOW_THREADS` macro. See above " +"for further discussion of this macro." msgstr "" -"Esta macro se expande a ``{PyThreadState *_save; _save = PyEval_SaveThread();" -"``. Tenga en cuenta que contiene una llave de apertura; debe coincidir con " -"la siguiente macro :c:macro:`Py_END_ALLOW_THREADS`. Ver arriba para una " -"discusión más detallada de esta macro." +"Esta macro se expande a ``{PyThreadState *_save; _save = " +"PyEval_SaveThread();``. Tenga en cuenta que contiene una llave de apertura; " +"debe coincidir con la siguiente macro :c:macro:`Py_END_ALLOW_THREADS`. Ver " +"arriba para una discusión más detallada de esta macro." #: ../Doc/c-api/init.rst:1142 msgid "" "This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " -"contains a closing brace; it must be matched with an earlier :c:macro:" -"`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of this " -"macro." +"contains a closing brace; it must be matched with an " +"earlier :c:macro:`Py_BEGIN_ALLOW_THREADS` macro. See above for further " +"discussion of this macro." msgstr "" "Esta macro se expande a ``PyEval_RestoreThread(_save); }``. Tenga en cuenta " -"que contiene una llave de cierre; debe coincidir con una macro anterior :c:" -"macro:`Py_BEGIN_ALLOW_THREADS`. Ver arriba para una discusión más detallada " -"de esta macro." +"que contiene una llave de cierre; debe coincidir con una macro " +"anterior :c:macro:`Py_BEGIN_ALLOW_THREADS`. Ver arriba para una discusión " +"más detallada de esta macro." #: ../Doc/c-api/init.rst:1150 msgid "" -"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" -"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." +"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent " +"to :c:macro:`Py_END_ALLOW_THREADS` without the closing brace." msgstr "" -"Esta macro se expande a ``PyEval_RestoreThread(_save);``: es equivalente a :" -"c:macro:`Py_END_ALLOW_THREADS` sin la llave de cierre." +"Esta macro se expande a ``PyEval_RestoreThread(_save);``: es equivalente " +"a :c:macro:`Py_END_ALLOW_THREADS` sin la llave de cierre." #: ../Doc/c-api/init.rst:1156 msgid "" -"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" -"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " +"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent " +"to :c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " "declaration." msgstr "" -"Esta macro se expande a ``_save = PyEval_SaveThread();``: es equivalente a :" -"c:macro:`Py_BEGIN_ALLOW_THREADS` sin la llave de apertura y la declaración " -"de variable." +"Esta macro se expande a ``_save = PyEval_SaveThread();``: es equivalente " +"a :c:macro:`Py_BEGIN_ALLOW_THREADS` sin la llave de apertura y la " +"declaración de variable." #: ../Doc/c-api/init.rst:1162 msgid "Low-level API" @@ -1972,8 +1980,8 @@ msgstr "API de bajo nivel" msgid "" "All of the following functions must be called after :c:func:`Py_Initialize`." msgstr "" -"Todas las siguientes funciones deben llamarse después de :c:func:" -"`Py_Initialize`." +"Todas las siguientes funciones deben llamarse después " +"de :c:func:`Py_Initialize`." #: ../Doc/c-api/init.rst:1166 msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." @@ -1991,11 +1999,11 @@ msgstr "" #: ../Doc/c-api/init.rst:1176 msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"PyInterpreterState_New`` with no arguments." +"Raises an :ref:`auditing event ` " +"``cpython.PyInterpreterState_New`` with no arguments." msgstr "" -"Genera un :ref:`evento de auditoría ` ``python." -"PyInterpreterState_New`` sin argumentos." +"Genera un :ref:`evento de auditoría ` " +"``python.PyInterpreterState_New`` sin argumentos." #: ../Doc/c-api/init.rst:1181 msgid "" @@ -2007,8 +2015,8 @@ msgstr "" #: ../Doc/c-api/init.rst:1184 msgid "" -"Raises an :ref:`auditing event ` ``cpython." -"PyInterpreterState_Clear`` with no arguments." +"Raises an :ref:`auditing event ` " +"``cpython.PyInterpreterState_Clear`` with no arguments." msgstr "" "Lanza una :ref:`eventos de auditoría ` ``python.PyInterpreterState " "Clear`` sin argumentos." @@ -2046,31 +2054,31 @@ msgid "" "This function now calls the :c:member:`PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -"Esta función ahora llama a la retrollamada :c:member:`PyThreadState." -"on_delete`. Anteriormente, eso sucedía en :c:func:`PyThreadState_Delete`." +"Esta función ahora llama a la " +"retrollamada :c:member:`PyThreadState.on_delete`. Anteriormente, eso sucedía " +"en :c:func:`PyThreadState_Delete`." #: ../Doc/c-api/init.rst:1213 msgid "" "Destroy a thread state object. The global interpreter lock need not be " -"held. The thread state must have been reset with a previous call to :c:func:" -"`PyThreadState_Clear`." +"held. The thread state must have been reset with a previous call " +"to :c:func:`PyThreadState_Clear`." msgstr "" "Destruye un objeto de estado de hilo. No es necesario mantener el bloqueo " "global del intérprete. El estado del hilo debe haberse restablecido con una " "llamada previa a :c:func:`PyThreadState_Clear`." #: ../Doc/c-api/init.rst:1220 -#, fuzzy msgid "" "Destroy the current thread state and release the global interpreter lock. " "Like :c:func:`PyThreadState_Delete`, the global interpreter lock must be " -"held. The thread state must have been reset with a previous call to :c:func:" -"`PyThreadState_Clear`." +"held. The thread state must have been reset with a previous call " +"to :c:func:`PyThreadState_Clear`." msgstr "" -"Destruye un objeto de estado de hilo y suelta el bloqueo del intérprete " -"global. Como :c:func:`PyThreadState_Delete`, no es necesario mantener el " -"bloqueo del intérprete global. El estado del hilo debe haberse restablecido " -"con una llamada anterior a :c:func:`PyThreadState_Clear`." +"Destruye el estado actual del subproceso y libera el bloqueo global del " +"intérprete. Al igual que en :c:func:`PyThreadState_Delete`, el bloqueo " +"global del intérprete debe mantenerse. El estado del subproceso debe haberse " +"restablecido con una llamada anterior a :c:func:`PyThreadState_Clear`." #: ../Doc/c-api/init.rst:1228 msgid "Get the current frame of the Python thread state *tstate*." @@ -2128,8 +2136,8 @@ msgstr "" msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -"Consulte también las funciones :c:func:`PyEval_SetTrace` y :c:func:" -"`PyEval_SetProfile`." +"Consulte también las funciones :c:func:`PyEval_SetTrace` " +"y :c:func:`PyEval_SetProfile`." #: ../Doc/c-api/init.rst:1280 msgid "Get the current interpreter." @@ -2226,7 +2234,6 @@ msgstr "" "que llama debe asumir que no hay disponible ningún estado del hilo actual." #: ../Doc/c-api/init.rst:1352 -#, fuzzy msgid "" "Asynchronously raise an exception in a thread. The *id* argument is the " "thread id of the target thread; *exc* is the exception object to be raised. " @@ -2237,19 +2244,20 @@ msgid "" "``NULL``, the pending exception (if any) for the thread is cleared. This " "raises no exceptions." msgstr "" -"Asincrónicamente lanza una excepción en un hilo. El argumento *id* es el id " -"del hilo del hilo de destino; *exc* es el objeto de excepción que se debe " -"generar. Esta función no roba ninguna referencia a *exc*. Para evitar el uso " -"indebido ingenuo, debe escribir su propia extensión C para llamar a esto. " -"Debe llamarse con el GIL retenido. Retorna el número de estados de hilo " -"modificados; normalmente es uno, pero será cero si no se encuentra la " -"identificación del hilo. Si *exc* es :const:`NULL`, se borra la excepción " -"pendiente (si existe) para el hilo. Esto no lanza excepciones." +"Generar una excepción de forma asincrónica en un subproceso. El argumento " +"*id* es el identificador del subproceso de destino; *exc* es el objeto de " +"excepción que se va a generar. Esta función no roba ninguna referencia a " +"*exc*. Para evitar un uso indebido ingenuo, debe escribir su propia " +"extensión C para llamarla. Debe llamarse con el GIL en su poder. Devuelve la " +"cantidad de estados de subproceso modificados; normalmente es uno, pero será " +"cero si no se encuentra el identificador del subproceso. Si *exc* es " +"``NULL``, se borra la excepción pendiente (si la hay) para el subproceso. " +"Esto no genera excepciones." #: ../Doc/c-api/init.rst:1360 msgid "" -"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" -"`unsigned long`." +"The type of the *id* parameter changed from :c:expr:`long` " +"to :c:expr:`unsigned long`." msgstr "" "El tipo del parámetro *id* cambia de :c:expr:`long` a :c:expr:`unsigned " "long`." @@ -2267,13 +2275,15 @@ msgstr "" #: ../Doc/c-api/init.rst:1377 msgid "" -"Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" -"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " -"current thread if called while the interpreter is finalizing." +"Updated to be consistent " +"with :c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, " +"and :c:func:`PyGILState_Ensure`, and terminate the current thread if called " +"while the interpreter is finalizing." msgstr "" -"Actualiza para ser coherente con :c:func:`PyEval_RestoreThread`, :c:func:" -"`Py_END_ALLOW_THREADS`, y :c:func:`PyGILState_Ensure`, y termina el hilo " -"actual si se llama mientras el intérprete está finalizando." +"Actualiza para ser coherente " +"con :c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, " +"y :c:func:`PyGILState_Ensure`, y termina el hilo actual si se llama mientras " +"el intérprete está finalizando." #: ../Doc/c-api/init.rst:1382 msgid "" @@ -2342,13 +2352,13 @@ msgstr "" #: ../Doc/c-api/init.rst:1415 msgid "" -"You can switch between sub-interpreters using the :c:func:" -"`PyThreadState_Swap` function. You can create and destroy them using the " -"following functions:" +"You can switch between sub-interpreters using " +"the :c:func:`PyThreadState_Swap` function. You can create and destroy them " +"using the following functions:" msgstr "" -"Puede cambiar entre subinterpretes utilizando la función :c:func:" -"`PyThreadState_Swap`. Puede crearlos y destruirlos utilizando las siguientes " -"funciones:" +"Puede cambiar entre subinterpretes utilizando la " +"función :c:func:`PyThreadState_Swap`. Puede crearlos y destruirlos " +"utilizando las siguientes funciones:" #: ../Doc/c-api/init.rst:1421 msgid "" @@ -2356,24 +2366,36 @@ msgid "" "values are used only in :c:func:`Py_NewInterpreterFromConfig` and never " "modified by the runtime." msgstr "" +"Estructura que contiene la mayoría de los parámetros para configurar un " +"subintérprete. Sus valores se utilizan únicamente " +"en :c:func:`Py_NewInterpreterFromConfig` y nunca son modificados por el " +"entorno de ejecución." #: ../Doc/c-api/init.rst:1427 msgid "Structure fields:" -msgstr "" +msgstr "Campos de estructura:" #: ../Doc/c-api/init.rst:1431 msgid "" "If this is ``0`` then the sub-interpreter will use its own \"object\" " "allocator state. Otherwise it will use (share) the main interpreter's." msgstr "" +"Si se trata de ``0``, el subintérprete utilizará su propio estado de " +"asignador de \"objetos\". De lo contrario, utilizará (compartirá) el del " +"intérprete principal." #: ../Doc/c-api/init.rst:1435 msgid "" -"If this is ``0`` then :c:member:`~PyInterpreterConfig." -"check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` " -"then :c:member:`~PyInterpreterConfig.gil` must not be :c:macro:" -"`PyInterpreterConfig_OWN_GIL`." +"If this is ``0`` " +"then :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` must be " +"``1`` (non-zero). If this is ``1`` then :c:member:`~PyInterpreterConfig.gil` " +"must not be :c:macro:`PyInterpreterConfig_OWN_GIL`." msgstr "" +"Si es ``0``, " +"entonces :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` debe " +"ser ``1`` (distinto de cero). Si es ``1``, " +"entonces :c:member:`~PyInterpreterConfig.gil` no debe " +"ser :c:macro:`PyInterpreterConfig_OWN_GIL`." #: ../Doc/c-api/init.rst:1443 msgid "" @@ -2381,11 +2403,16 @@ msgid "" "any thread where the sub-interpreter is currently active. Otherwise fork is " "unrestricted." msgstr "" +"Si es ``0``, el entorno de ejecución no admitirá la bifurcación del proceso " +"en ningún subproceso en el que el subintérprete esté activo en ese momento. " +"De lo contrario, la bifurcación no tendrá restricciones." #: ../Doc/c-api/init.rst:1447 msgid "" "Note that the :mod:`subprocess` module still works when fork is disallowed." msgstr "" +"Tenga en cuenta que el módulo :mod:`subprocess` aún funciona cuando no se " +"permite la bifurcación." #: ../Doc/c-api/init.rst:1452 msgid "" @@ -2393,96 +2420,120 @@ msgid "" "process via exec (e.g. :func:`os.execv`) in any thread where the sub-" "interpreter is currently active. Otherwise exec is unrestricted." msgstr "" +"Si se trata de ``0``, el entorno de ejecución no admitirá la sustitución del " +"proceso actual mediante exec (por ejemplo, :func:`os.execv`) en ningún " +"subproceso en el que el subintérprete esté activo en ese momento. De lo " +"contrario, exec no tendrá restricciones." #: ../Doc/c-api/init.rst:1457 msgid "" "Note that the :mod:`subprocess` module still works when exec is disallowed." msgstr "" +"Tenga en cuenta que el módulo :mod:`subprocess` aún funciona cuando la " +"ejecución no está permitida." #: ../Doc/c-api/init.rst:1462 msgid "" "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " "create threads. Otherwise threads are allowed." msgstr "" +"Si se trata de ``0``, el módulo :mod:`threading` del subintérprete no creará " +"subprocesos. De lo contrario, se permiten los subprocesos." #: ../Doc/c-api/init.rst:1468 msgid "" "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " -"create daemon threads. Otherwise daemon threads are allowed (as long as :c:" -"member:`~PyInterpreterConfig.allow_threads` is non-zero)." +"create daemon threads. Otherwise daemon threads are allowed (as long " +"as :c:member:`~PyInterpreterConfig.allow_threads` is non-zero)." msgstr "" +"Si se trata de ``0``, el módulo :mod:`threading` del subintérprete no creará " +"subprocesos de demonio. De lo contrario, se permiten subprocesos de demonio " +"(siempre que :c:member:`~PyInterpreterConfig.allow_threads` no sea cero)." #: ../Doc/c-api/init.rst:1475 msgid "" "If this is ``0`` then all extension modules may be imported, including " "legacy (single-phase init) modules, in any thread where the sub-interpreter " -"is currently active. Otherwise only multi-phase init extension modules (see :" -"pep:`489`) may be imported. (Also see :c:macro:" -"`Py_mod_multiple_interpreters`.)" +"is currently active. Otherwise only multi-phase init extension modules " +"(see :pep:`489`) may be imported. (Also " +"see :c:macro:`Py_mod_multiple_interpreters`.)" msgstr "" +"Si se trata de ``0``, se podrán importar todos los módulos de extensión, " +"incluidos los módulos heredados (inicio monofásico), en cualquier subproceso " +"en el que el subintérprete esté activo en ese momento. De lo contrario, solo " +"se podrán importar los módulos de extensión de inicio multifásico " +"(consulte :pep:`489`). (Consulte " +"también :c:macro:`Py_mod_multiple_interpreters`)." #: ../Doc/c-api/init.rst:1482 msgid "" -"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." -"use_main_obmalloc` is ``0``." +"This must be ``1`` (non-zero) " +"if :c:member:`~PyInterpreterConfig.use_main_obmalloc` is ``0``." msgstr "" +"Debe ser ``1`` (distinto de cero) " +"si :c:member:`~PyInterpreterConfig.use_main_obmalloc` es ``0``." #: ../Doc/c-api/init.rst:1487 msgid "" "This determines the operation of the GIL for the sub-interpreter. It may be " "one of the following:" msgstr "" +"Esto determina el funcionamiento del GIL para el subintérprete. Puede ser " +"uno de los siguientes:" #: ../Doc/c-api/init.rst:1494 msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." msgstr "" +"Utilice la selección predeterminada " +"(:c:macro:`PyInterpreterConfig_SHARED_GIL`)." #: ../Doc/c-api/init.rst:1498 -#, fuzzy msgid "Use (share) the main interpreter's GIL." -msgstr "Retorna el objeto de estado del intérprete principal." +msgstr "Utilice (comparta) el GIL del intérprete principal." #: ../Doc/c-api/init.rst:1502 -#, fuzzy msgid "Use the sub-interpreter's own GIL." -msgstr "Obtiene el intérprete actual." +msgstr "Utilice el GIL propio del subintérprete." #: ../Doc/c-api/init.rst:1504 msgid "" -"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" -"`PyInterpreterConfig.use_main_obmalloc` must be ``0``." +"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` " +"then :c:member:`PyInterpreterConfig.use_main_obmalloc` must be ``0``." msgstr "" +"Si es :c:macro:`PyInterpreterConfig_OWN_GIL`, " +"entonces :c:member:`PyInterpreterConfig.use_main_obmalloc` debe ser ``0``." #: ../Doc/c-api/init.rst:1518 msgid "" "Create a new sub-interpreter. This is an (almost) totally separate " "environment for the execution of Python code. In particular, the new " "interpreter has separate, independent versions of all imported modules, " -"including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:" -"`sys`. The table of loaded modules (``sys.modules``) and the module search " -"path (``sys.path``) are also separate. The new environment has no ``sys." -"argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, " -"``sys.stdout`` and ``sys.stderr`` (however these refer to the same " -"underlying file descriptors)." +"including the fundamental modules :mod:`builtins`, :mod:`__main__` " +"and :mod:`sys`. The table of loaded modules (``sys.modules``) and the " +"module search path (``sys.path``) are also separate. The new environment " +"has no ``sys.argv`` variable. It has new standard I/O stream file objects " +"``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` (however these refer to the " +"same underlying file descriptors)." msgstr "" "Crea un nuevo subinterprete. Este es un entorno (casi) totalmente separado " "para la ejecución de código Python. En particular, el nuevo intérprete tiene " "versiones separadas e independientes de todos los módulos importados, " -"incluidos los módulos fundamentales :mod:`builtins`, :mod:`__main__` y :mod:" -"`sys`. La tabla de módulos cargados (``sys.modules``) y la ruta de búsqueda " -"del módulo (``sys.path``) también están separados. El nuevo entorno no tiene " -"variable ``sys.argv``. Tiene nuevos objetos de archivo de flujo de E/S " -"estándar ``sys.stdin``, ``sys.stdout`` y ``sys.stderr`` (sin embargo, estos " -"se refieren a los mismos descriptores de archivo subyacentes)." +"incluidos los módulos fundamentales :mod:`builtins`, :mod:`__main__` " +"y :mod:`sys`. La tabla de módulos cargados (``sys.modules``) y la ruta de " +"búsqueda del módulo (``sys.path``) también están separados. El nuevo entorno " +"no tiene variable ``sys.argv``. Tiene nuevos objetos de archivo de flujo de " +"E/S estándar ``sys.stdin``, ``sys.stdout`` y ``sys.stderr`` (sin embargo, " +"estos se refieren a los mismos descriptores de archivo subyacentes)." #: ../Doc/c-api/init.rst:1528 msgid "" "The given *config* controls the options with which the interpreter is " "initialized." msgstr "" +"El *config* dado controla las opciones con las que se inicializa el " +"intérprete." #: ../Doc/c-api/init.rst:1531 -#, fuzzy msgid "" "Upon success, *tstate_p* will be set to the first thread state created in " "the new sub-interpreter. This thread state is made in the current thread " @@ -2492,17 +2543,14 @@ msgid "" "is stored in the current thread state and there may not be a current thread " "state." msgstr "" -"El valor de retorno apunta al primer estado del hilo creado en el nuevo " -"subinterprete. Este estado de hilo se realiza en el estado de hilo actual. " -"Tenga en cuenta que no se crea ningún hilo real; vea la discusión de los " -"estados del hilo a continuación. Si la creación del nuevo intérprete no " -"tiene éxito, se retorna ``NULL``; no se establece ninguna excepción, ya que " -"el estado de excepción se almacena en el estado actual del hilo y es posible " -"que no haya un estado actual del hilo. (Al igual que todas las otras " -"funciones de Python/C API, el bloqueo global del intérprete debe mantenerse " -"antes de llamar a esta función y aún se mantiene cuando regresa; sin " -"embargo, a diferencia de la mayoría de las otras funciones de Python/C API, " -"no es necesario que haya un estado del hilo actual en entrada.)" +"Si la creación del nuevo intérprete es exitosa, *tstate_p* se establecerá en " +"el primer estado de subproceso creado en el nuevo subintérprete. Este estado " +"de subproceso se crea en el estado de subproceso actual. Tenga en cuenta que " +"no se crea ningún subproceso real; consulte la explicación de los estados de " +"subprocesos a continuación. Si la creación del nuevo intérprete no es " +"exitosa, *tstate_p* se establece en ``NULL``; no se establece ninguna " +"excepción ya que el estado de excepción se almacena en el estado de " +"subproceso actual y es posible que no haya un estado de subproceso actual." #: ../Doc/c-api/init.rst:1540 msgid "" @@ -2515,12 +2563,22 @@ msgid "" "by the current thread and the previously interpreter's GIL will remain " "released here." msgstr "" +"Al igual que todas las demás funciones de la API de Python/C, el bloqueo del " +"intérprete global debe mantenerse antes de llamar a esta función y aún se " +"mantiene cuando regresa. Asimismo, se debe establecer un estado de " +"subproceso actual en la entrada. En caso de éxito, el estado de subproceso " +"devuelto se establecerá como actual. Si el subintérprete se crea con su " +"propio GIL, se liberará el GIL del intérprete que realiza la llamada. Cuando " +"la función regresa, el GIL del nuevo intérprete será retenido por el " +"subproceso actual y el GIL del intérprete anterior permanecerá liberado aquí." #: ../Doc/c-api/init.rst:1551 msgid "" "Sub-interpreters are most effective when isolated from each other, with " "certain functionality restricted::" msgstr "" +"Los subintérpretes son más eficaces cuando están aislados unos de otros y " +"con ciertas funciones restringidas:" #: ../Doc/c-api/init.rst:1554 msgid "" @@ -2535,14 +2593,29 @@ msgid "" "};\n" "PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);" msgstr "" +"PyInterpreterConfig config = {\n" +" .use_main_obmalloc = 0,\n" +" .allow_fork = 0,\n" +" .allow_exec = 0,\n" +" .allow_threads = 1,\n" +" .allow_daemon_threads = 0,\n" +" .check_multi_interp_extensions = 1,\n" +" .gil = PyInterpreterConfig_OWN_GIL,\n" +"};\n" +"PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);" #: ../Doc/c-api/init.rst:1565 msgid "" "Note that the config is used only briefly and does not get modified. During " -"initialization the config's values are converted into various :c:type:" -"`PyInterpreterState` values. A read-only copy of the config may be stored " -"internally on the :c:type:`PyInterpreterState`." +"initialization the config's values are converted into " +"various :c:type:`PyInterpreterState` values. A read-only copy of the config " +"may be stored internally on the :c:type:`PyInterpreterState`." msgstr "" +"Tenga en cuenta que la configuración se utiliza solo brevemente y no se " +"modifica. Durante la inicialización, los valores de la configuración se " +"convierten en varios valores :c:type:`PyInterpreterState`. Es posible que se " +"almacene una copia de solo lectura de la configuración internamente en " +"el :c:type:`PyInterpreterState`." #: ../Doc/c-api/init.rst:1574 msgid "Extension modules are shared between (sub-)interpreters as follows:" @@ -2552,45 +2625,46 @@ msgstr "" #: ../Doc/c-api/init.rst:1576 msgid "" -"For modules using multi-phase initialization, e.g. :c:func:" -"`PyModule_FromDefAndSpec`, a separate module object is created and " -"initialized for each interpreter. Only C-level static and global variables " -"are shared between these module objects." +"For modules using multi-phase initialization, " +"e.g. :c:func:`PyModule_FromDefAndSpec`, a separate module object is created " +"and initialized for each interpreter. Only C-level static and global " +"variables are shared between these module objects." msgstr "" -"Para módulos que usan inicialización multifase, por ejemplo :c:func:" -"`PyModule_FromDefAndSpec`, se crea e inicializa un objeto de módulo separado " -"para cada intérprete. Solo las variables estáticas y globales de nivel C se " -"comparten entre estos objetos de módulo." +"Para módulos que usan inicialización multifase, por " +"ejemplo :c:func:`PyModule_FromDefAndSpec`, se crea e inicializa un objeto de " +"módulo separado para cada intérprete. Solo las variables estáticas y " +"globales de nivel C se comparten entre estos objetos de módulo." #: ../Doc/c-api/init.rst:1582 msgid "" -"For modules using single-phase initialization, e.g. :c:func:" -"`PyModule_Create`, the first time a particular extension is imported, it is " -"initialized normally, and a (shallow) copy of its module's dictionary is " -"squirreled away. When the same extension is imported by another " -"(sub-)interpreter, a new module is initialized and filled with the contents " -"of this copy; the extension's ``init`` function is not called. Objects in " -"the module's dictionary thus end up shared across (sub-)interpreters, which " -"might cause unwanted behavior (see `Bugs and caveats`_ below)." -msgstr "" -"Para módulos que utilizan inicialización monofásica, por ejemplo :c:func:" -"`PyModule_Create`, la primera vez que se importa una extensión en " -"particular, se inicializa normalmente y una copia (superficial) del " -"diccionario de su módulo se guarda. Cuando otro (sub) intérprete importa la " -"misma extensión, se inicializa un nuevo módulo y se llena con el contenido " -"de esta copia; no se llama a la función ``init`` de la extensión. Los " -"objetos en el diccionario del módulo terminan compartidos entre (sub) " +"For modules using single-phase initialization, " +"e.g. :c:func:`PyModule_Create`, the first time a particular extension is " +"imported, it is initialized normally, and a (shallow) copy of its module's " +"dictionary is squirreled away. When the same extension is imported by " +"another (sub-)interpreter, a new module is initialized and filled with the " +"contents of this copy; the extension's ``init`` function is not called. " +"Objects in the module's dictionary thus end up shared across " +"(sub-)interpreters, which might cause unwanted behavior (see `Bugs and " +"caveats`_ below)." +msgstr "" +"Para módulos que utilizan inicialización monofásica, por " +"ejemplo :c:func:`PyModule_Create`, la primera vez que se importa una " +"extensión en particular, se inicializa normalmente y una copia (superficial) " +"del diccionario de su módulo se guarda. Cuando otro (sub) intérprete importa " +"la misma extensión, se inicializa un nuevo módulo y se llena con el " +"contenido de esta copia; no se llama a la función ``init`` de la extensión. " +"Los objetos en el diccionario del módulo terminan compartidos entre (sub) " "intérpretes, lo que puede causar un comportamiento no deseado (ver Errores y " "advertencias (`Bugs and caveats`_) a continuación)." #: ../Doc/c-api/init.rst:1593 msgid "" "Note that this is different from what happens when an extension is imported " -"after the interpreter has been completely re-initialized by calling :c:func:" -"`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, the extension's " -"``initmodule`` function *is* called again. As with multi-phase " -"initialization, this means that only C-level static and global variables are " -"shared between these modules." +"after the interpreter has been completely re-initialized by " +"calling :c:func:`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, " +"the extension's ``initmodule`` function *is* called again. As with multi-" +"phase initialization, this means that only C-level static and global " +"variables are shared between these modules." msgstr "" "Tenga en cuenta que esto es diferente de lo que sucede cuando se importa una " "extensión después de que el intérprete se haya reiniciado por completo " @@ -2601,15 +2675,19 @@ msgstr "" #: ../Doc/c-api/init.rst:1613 msgid "" -"Create a new sub-interpreter. This is essentially just a wrapper around :c:" -"func:`Py_NewInterpreterFromConfig` with a config that preserves the existing " -"behavior. The result is an unisolated sub-interpreter that shares the main " -"interpreter's GIL, allows fork/exec, allows daemon threads, and allows " -"single-phase init modules." +"Create a new sub-interpreter. This is essentially just a wrapper " +"around :c:func:`Py_NewInterpreterFromConfig` with a config that preserves " +"the existing behavior. The result is an unisolated sub-interpreter that " +"shares the main interpreter's GIL, allows fork/exec, allows daemon threads, " +"and allows single-phase init modules." msgstr "" +"Cree un nuevo subintérprete. Básicamente, se trata de un envoltorio " +"de :c:func:`Py_NewInterpreterFromConfig` con una configuración que conserva " +"el comportamiento existente. El resultado es un subintérprete no aislado que " +"comparte el GIL del intérprete principal, permite fork/exec, permite " +"subprocesos de demonio y permite módulos de inicialización monofásicos." #: ../Doc/c-api/init.rst:1625 -#, fuzzy msgid "" "Destroy the (sub-)interpreter represented by the given thread state. The " "given thread state must be the current thread state. See the discussion of " @@ -2618,24 +2696,26 @@ msgid "" "destroyed. The global interpreter lock used by the target interpreter must " "be held before calling this function. No GIL is held when it returns." msgstr "" -"Destruye el (sub) intérprete representado por el estado del hilo dado. El " -"estado del hilo dado debe ser el estado del hilo actual. Vea la discusión de " -"los estados del hilo a continuación. Cuando la llamada regresa, el estado " -"actual del hilo es ``NULL``. Todos los estados de hilo asociados con este " -"intérprete se destruyen. (El bloqueo global del intérprete debe mantenerse " -"antes de llamar a esta función y aún se mantiene cuando vuelve). :c:func:" -"`Py_FinalizeEx` destruirá todos los subinterpretes que no se hayan destruido " -"explícitamente en ese punto." +"Destruye el (sub)intérprete representado por el estado del subproceso " +"indicado. El estado del subproceso indicado debe ser el estado actual del " +"subproceso. Consulta la explicación de los estados del subproceso a " +"continuación. Cuando la llamada retorna, el estado actual del subproceso es " +"``NULL``. Se destruyen todos los estados del subproceso asociados con este " +"intérprete. El bloqueo del intérprete global utilizado por el intérprete de " +"destino debe mantenerse antes de llamar a esta función. No se mantiene " +"ningún GIL cuando retorna." #: ../Doc/c-api/init.rst:1633 msgid "" ":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " "explicitly destroyed at that point." msgstr "" +":c:func:`Py_FinalizeEx` destruirá todos los subintérpretes que no hayan sido " +"destruidos explícitamente en ese momento." #: ../Doc/c-api/init.rst:1638 msgid "A Per-Interpreter GIL" -msgstr "" +msgstr "Un GIL por intérprete" #: ../Doc/c-api/init.rst:1640 msgid "" @@ -2648,6 +2728,14 @@ msgid "" "isolation also encourages a different approach to concurrency than that of " "just using threads. (See :pep:`554`.)" msgstr "" +"Con :c:func:`Py_NewInterpreterFromConfig` se puede crear un subintérprete " +"que esté completamente aislado de otros intérpretes, incluso con su propio " +"GIL. El beneficio más importante de este aislamiento es que un intérprete de " +"este tipo puede ejecutar código Python sin que otros intérpretes lo bloqueen " +"ni bloqueen a ningún otro. Por lo tanto, un único proceso Python puede " +"aprovechar realmente los múltiples núcleos de CPU al ejecutar código Python. " +"El aislamiento también fomenta un enfoque diferente de la concurrencia que " +"el de simplemente usar subprocesos. (Consulte :pep:`554`)." #: ../Doc/c-api/init.rst:1650 msgid "" @@ -2662,6 +2750,18 @@ msgid "" "been done for the builtin singletons, small integers, and a number of other " "builtin objects." msgstr "" +"El uso de un intérprete aislado requiere vigilancia para preservar ese " +"aislamiento. Esto significa especialmente no compartir ningún objeto o " +"estado mutable sin garantías sobre la seguridad de los subprocesos. Incluso " +"los objetos que de otro modo serían inmutables (por ejemplo, ``None``, ``(1, " +"5)``) normalmente no se pueden compartir debido al recuento de referencias. " +"Un enfoque simple pero menos eficiente para evitar esto es usar un bloqueo " +"global alrededor de todo uso de algún estado (u objeto). Alternativamente, " +"los objetos efectivamente inmutables (como números enteros o cadenas) se " +"pueden hacer seguros a pesar de sus recuentos de referencias al convertirlos " +"en :term:`immortal`. De hecho, esto se ha hecho para los singletons " +"integrados, los números enteros pequeños y una serie de otros objetos " +"integrados." #: ../Doc/c-api/init.rst:1661 msgid "" @@ -2670,6 +2770,11 @@ msgid "" "to preserve isolation will expose you to the full consequences of free-" "threading, including races and hard-to-debug crashes." msgstr "" +"Si preserva el aislamiento, tendrá acceso a una computación multinúcleo " +"adecuada sin las complicaciones que conlleva el uso de subprocesos libres. " +"Si no preserva el aislamiento, se expondrá a todas las consecuencias del uso " +"de subprocesos libres, incluidas las carreras y los fallos difíciles de " +"depurar." #: ../Doc/c-api/init.rst:1666 msgid "" @@ -2680,6 +2785,13 @@ msgid "" "of preserving isolation and expose effective tools for communicating (and " "sharing) data between interpreters." msgstr "" +"Aparte de eso, uno de los principales desafíos de usar varios intérpretes " +"aislados es cómo comunicarse entre ellos de forma segura (sin romper el " +"aislamiento) y eficiente. El entorno de ejecución y la biblioteca estándar " +"aún no ofrecen ningún enfoque estándar para esto. Un futuro módulo de la " +"biblioteca estándar ayudaría a mitigar el esfuerzo de preservar el " +"aislamiento y expondría herramientas efectivas para comunicar (y compartir) " +"datos entre intérpretes." #: ../Doc/c-api/init.rst:1677 msgid "Bugs and caveats" @@ -2729,10 +2841,10 @@ msgid "" "delicate, because these APIs assume a bijection between Python thread states " "and OS-level threads, an assumption broken by the presence of sub-" "interpreters. It is highly recommended that you don't switch sub-" -"interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:" -"func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:" -"`ctypes`) using these APIs to allow calling of Python code from non-Python " -"created threads will probably be broken when using sub-interpreters." +"interpreters between a pair of matching :c:func:`PyGILState_Ensure` " +"and :c:func:`PyGILState_Release` calls. Furthermore, extensions (such " +"as :mod:`ctypes`) using these APIs to allow calling of Python code from non-" +"Python created threads will probably be broken when using sub-interpreters." msgstr "" "También tenga en cuenta que la combinación de esta funcionalidad con " "``PyGILState_*`` APIs es delicada, porque estas APIs suponen una biyección " @@ -2829,8 +2941,8 @@ msgid "" "no guarantee that *func* will be called as quick as possible. If the main " "thread is busy executing a system call, *func* won't be called before the " "system call returns. This function is generally **not** suitable for " -"calling Python code from arbitrary C threads. Instead, use the :ref:" -"`PyGILState API`." +"calling Python code from arbitrary C threads. Instead, use " +"the :ref:`PyGILState API`." msgstr "" "Esta es una función de bajo nivel, solo útil para casos muy especiales. No " "hay garantía de que *func* se llame lo más rápido posible. Si el hilo " @@ -2883,25 +2995,20 @@ msgstr "" "rastreo a nivel de Python en versiones anteriores." #: ../Doc/c-api/init.rst:1778 -#, fuzzy msgid "" "The type of the trace function registered using :c:func:`PyEval_SetProfile` " "and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " "the registration function as *obj*, *frame* is the frame object to which the " -"event pertains, *what* is one of the constants :c:data:`PyTrace_CALL`, :c:" -"data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :" -"c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:" -"`PyTrace_C_RETURN`, or :c:data:`PyTrace_OPCODE`, and *arg* depends on the " -"value of *what*:" -msgstr "" -"El tipo de la función de rastreo registrada usando :c:func:" -"`PyEval_SetProfile` y :c:func:`PyEval_SetTrace`. El primer parámetro es el " -"objeto pasado a la función de registro como *obj*, *frame* es el objeto de " -"marco al que pertenece el evento, *what* es una de las constantes :const:" -"`PyTrace_CALL`, :const:`PyTrace_EXCEPTION` , :const:`PyTrace_LINE`, :const:" -"`PyTrace_RETURN`, :const:`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION`, :" -"const:`PyTrace_C_RETURN`, o :const:`PyTrace_OPCODE`, y *arg* depende de el " -"valor de *what*:" +"event pertains, *what* is one of the " +"constants :c:data:`PyTrace_CALL`, :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:`PyTrace_C_RETURN`, " +"or :c:data:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" +msgstr "" +"El tipo de la función de seguimiento registrada " +"mediante :c:func:`PyEval_SetProfile` y :c:func:`PyEval_SetTrace`. El primer " +"parámetro es el objeto pasado a la función de registro como *obj*, *frame* " +"es el objeto de marco al que pertenece el evento, *what* es una de las " +"constantes :c:data:`PyTrace_CALL`, :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:`PyTrace_C_RETURN` " +"o :c:data:`PyTrace_OPCODE`, y *arg* depende del valor de *what*:" #: ../Doc/c-api/init.rst:1787 msgid "Value of *what*" @@ -2912,9 +3019,8 @@ msgid "Meaning of *arg*" msgstr "Significado de *arg*" #: ../Doc/c-api/init.rst:1789 -#, fuzzy msgid ":c:data:`PyTrace_CALL`" -msgstr ":const:`PyTrace_CALL`" +msgstr ":c:data:`PyTrace_CALL`" #: ../Doc/c-api/init.rst:1789 ../Doc/c-api/init.rst:1794 #: ../Doc/c-api/init.rst:1805 @@ -2922,23 +3028,20 @@ msgid "Always :c:data:`Py_None`." msgstr "Siempre :c:data:`Py_None`." #: ../Doc/c-api/init.rst:1791 -#, fuzzy msgid ":c:data:`PyTrace_EXCEPTION`" -msgstr ":const:`PyTrace_EXCEPTION`" +msgstr ":c:data:`PyTrace_EXCEPTION`" #: ../Doc/c-api/init.rst:1791 msgid "Exception information as returned by :func:`sys.exc_info`." msgstr "Información de excepción retornada por :func:`sys.exc_info`." #: ../Doc/c-api/init.rst:1794 -#, fuzzy msgid ":c:data:`PyTrace_LINE`" -msgstr ":const:`PyTrace_LINE`" +msgstr ":c:data:`PyTrace_LINE`" #: ../Doc/c-api/init.rst:1796 -#, fuzzy msgid ":c:data:`PyTrace_RETURN`" -msgstr ":const:`PyTrace_RETURN`" +msgstr ":c:data:`PyTrace_RETURN`" #: ../Doc/c-api/init.rst:1796 msgid "" @@ -2947,9 +3050,8 @@ msgstr "" "Valor retornado al que llama, o ``NULL`` si es causado por una excepción." #: ../Doc/c-api/init.rst:1799 -#, fuzzy msgid ":c:data:`PyTrace_C_CALL`" -msgstr ":const:`PyTrace_C_CALL`" +msgstr ":c:data:`PyTrace_C_CALL`" #: ../Doc/c-api/init.rst:1799 ../Doc/c-api/init.rst:1801 #: ../Doc/c-api/init.rst:1803 @@ -2957,19 +3059,16 @@ msgid "Function object being called." msgstr "Objeto función que se llaman." #: ../Doc/c-api/init.rst:1801 -#, fuzzy msgid ":c:data:`PyTrace_C_EXCEPTION`" -msgstr ":const:`PyTrace_C_EXCEPTION`" +msgstr ":c:data:`PyTrace_C_EXCEPTION`" #: ../Doc/c-api/init.rst:1803 -#, fuzzy msgid ":c:data:`PyTrace_C_RETURN`" -msgstr ":const:`PyTrace_C_RETURN`" +msgstr ":c:data:`PyTrace_C_RETURN`" #: ../Doc/c-api/init.rst:1805 -#, fuzzy msgid ":c:data:`PyTrace_OPCODE`" -msgstr ":const:`PyTrace_OPCODE`" +msgstr ":c:data:`PyTrace_OPCODE`" #: ../Doc/c-api/init.rst:1810 msgid "" @@ -3007,17 +3106,17 @@ msgstr "" "no los necesita." #: ../Doc/c-api/init.rst:1830 -#, fuzzy msgid "" "The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " "function (but not a profiling function) when a line-number event is being " -"reported. It may be disabled for a frame by setting :attr:`~frame." -"f_trace_lines` to *0* on that frame." +"reported. It may be disabled for a frame by " +"setting :attr:`~frame.f_trace_lines` to *0* on that frame." msgstr "" -"El valor pasado como parámetro *what* a una función :c:type:`Py_tracefunc` " -"(pero no una función de creación de perfiles) cuando se informa un evento de " -"número de línea. Puede deshabilitarse para un marco configurando :attr:" -"`f_trace_lines` en *0* en ese marco." +"El valor que se pasa como parámetro *what* a una " +"función :c:type:`Py_tracefunc` (pero no a una función de creación de " +"perfiles) cuando se informa un evento de número de línea. Se puede " +"desactivar para un marco configurando :attr:`~frame.f_trace_lines` en *0* en " +"ese marco." #: ../Doc/c-api/init.rst:1838 msgid "" @@ -3052,36 +3151,36 @@ msgstr "" "una función C ha retornado." #: ../Doc/c-api/init.rst:1862 -#, fuzzy msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " "not profiling functions) when a new opcode is about to be executed. This " -"event is not emitted by default: it must be explicitly requested by setting :" -"attr:`~frame.f_trace_opcodes` to *1* on the frame." +"event is not emitted by default: it must be explicitly requested by " +"setting :attr:`~frame.f_trace_opcodes` to *1* on the frame." msgstr "" -"El valor del parámetro *what* para funciones :c:type:`Py_tracefunc` (pero no " -"funciones de creación de perfiles) cuando un nuevo código de operación está " -"a punto de ejecutarse. Este evento no se emite de forma predeterminada: debe " -"solicitarse explícitamente estableciendo :attr:`f_trace_opcodes` en *1* en " -"el marco." +"El valor del parámetro *what* para las funciones :c:type:`Py_tracefunc` " +"(pero no para las funciones de creación de perfiles) cuando está a punto de " +"ejecutarse un nuevo código de operación. Este evento no se emite de forma " +"predeterminada: debe solicitarse explícitamente " +"configurando :attr:`~frame.f_trace_opcodes` en *1* en el marco." #: ../Doc/c-api/init.rst:1870 -#, fuzzy msgid "" "Set the profiler function to *func*. The *obj* parameter is passed to the " "function as its first parameter, and may be any Python object, or ``NULL``. " "If the profile function needs to maintain state, using a different value for " "*obj* for each thread provides a convenient and thread-safe place to store " -"it. The profile function is called for all monitored events except :c:data:" -"`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`." -msgstr "" -"Establece la función del generador de perfiles en *func*. El parámetro *obj* " -"se pasa a la función como su primer parámetro, y puede ser cualquier objeto " -"de Python o ``NULL``. Si la función de perfilado necesita mantener el " -"estado, el uso de un valor diferente para *obj* para cada hilo proporciona " -"un lugar conveniente y seguro para guardarlo. Se llama a la función de " -"perfilado para todos los eventos supervisados, excepto :const:" -"`PyTrace_LINE` :const:`PyTrace_OPCODE` y :const:`PyTrace_EXCEPTION`." +"it. The profile function is called for all monitored events " +"except :c:data:`PyTrace_LINE` :c:data:`PyTrace_OPCODE` " +"and :c:data:`PyTrace_EXCEPTION`." +msgstr "" +"Establezca la función de perfilador en *func*. El parámetro *obj* se pasa a " +"la función como su primer parámetro y puede ser cualquier objeto Python o " +"``NULL``. Si la función de perfilador necesita mantener el estado, el uso de " +"un valor diferente para *obj* para cada subproceso proporciona un lugar " +"conveniente y seguro para subprocesos donde almacenarlo. La función de " +"perfilador se llama para todos los eventos monitoreados " +"excepto :c:data:`PyTrace_LINE`, :c:data:`PyTrace_OPCODE` " +"y :c:data:`PyTrace_EXCEPTION`." #: ../Doc/c-api/init.rst:1877 msgid "See also the :func:`sys.setprofile` function." @@ -3098,31 +3197,37 @@ msgid "" "running threads belonging to the current interpreter instead of the setting " "it only on the current thread." msgstr "" +"Como :c:func:`PyEval_SetProfile`, pero establece la función de perfil en " +"todos los subprocesos en ejecución que pertenecen al intérprete actual en " +"lugar de configurarla solo en el subproceso actual." #: ../Doc/c-api/init.rst:1888 msgid "" "As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " "while setting the profile functions in all threads." msgstr "" +"Al igual que :c:func:`PyEval_SetProfile`, esta función ignora cualquier " +"excepción generada al configurar las funciones de perfil en todos los " +"subprocesos." #: ../Doc/c-api/init.rst:1896 -#, fuzzy -msgid "" -"Set the tracing function to *func*. This is similar to :c:func:" -"`PyEval_SetProfile`, except the tracing function does receive line-number " -"events and per-opcode events, but does not receive any event related to C " -"function objects being called. Any trace function registered using :c:func:" -"`PyEval_SetTrace` will not receive :c:data:`PyTrace_C_CALL`, :c:data:" -"`PyTrace_C_EXCEPTION` or :c:data:`PyTrace_C_RETURN` as a value for the " -"*what* parameter." -msgstr "" -"Establece la función de rastreo en *func*. Esto es similar a :c:func:" -"`PyEval_SetProfile`, excepto que la función de rastreo recibe eventos de " -"número de línea y eventos por código de operación, pero no recibe ningún " -"evento relacionado con los objetos de la función C. Cualquier función de " -"rastreo registrada con :c:func:`PyEval_SetTrace` no recibirá :const:" -"`PyTrace_C_CALL`, :const:`PyTrace_C_EXCEPTION` o :const:`PyTrace_C_RETURN` " -"como valor para el parámetro *what*." +msgid "" +"Set the tracing function to *func*. This is similar " +"to :c:func:`PyEval_SetProfile`, except the tracing function does receive " +"line-number events and per-opcode events, but does not receive any event " +"related to C function objects being called. Any trace function registered " +"using :c:func:`PyEval_SetTrace` will not " +"receive :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` " +"or :c:data:`PyTrace_C_RETURN` as a value for the *what* parameter." +msgstr "" +"Establezca la función de seguimiento en *func*. Es similar " +"a :c:func:`PyEval_SetProfile`, excepto que la función de seguimiento recibe " +"eventos de número de línea y eventos por código de operación, pero no recibe " +"ningún evento relacionado con los objetos de función C que se están " +"llamando. Cualquier función de seguimiento registrada " +"con :c:func:`PyEval_SetTrace` no " +"recibirá :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` " +"o :c:data:`PyTrace_C_RETURN` como valor para el parámetro *what*." #: ../Doc/c-api/init.rst:1903 msgid "See also the :func:`sys.settrace` function." @@ -3134,44 +3239,55 @@ msgid "" "threads belonging to the current interpreter instead of the setting it only " "on the current thread." msgstr "" +"Como :c:func:`PyEval_SetTrace`, pero establece la función de seguimiento en " +"todos los subprocesos en ejecución que pertenecen al intérprete actual en " +"lugar de configurarla solo en el subproceso actual." #: ../Doc/c-api/init.rst:1914 msgid "" "As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " "while setting the trace functions in all threads." msgstr "" +"Al igual que :c:func:`PyEval_SetTrace`, esta función ignora cualquier " +"excepción generada al configurar las funciones de seguimiento en todos los " +"subprocesos." #: ../Doc/c-api/init.rst:1920 msgid "Reference tracing" -msgstr "" +msgstr "Rastreo de referencia" #: ../Doc/c-api/init.rst:1926 msgid "" -"The type of the trace function registered using :c:func:" -"`PyRefTracer_SetTracer`. The first parameter is a Python object that has " -"been just created (when **event** is set to :c:data:`PyRefTracer_CREATE`) or " -"about to be destroyed (when **event** is set to :c:data:" -"`PyRefTracer_DESTROY`). The **data** argument is the opaque pointer that was " -"provided when :c:func:`PyRefTracer_SetTracer` was called." -msgstr "" +"The type of the trace function registered " +"using :c:func:`PyRefTracer_SetTracer`. The first parameter is a Python " +"object that has been just created (when **event** is set " +"to :c:data:`PyRefTracer_CREATE`) or about to be destroyed (when **event** is " +"set to :c:data:`PyRefTracer_DESTROY`). The **data** argument is the opaque " +"pointer that was provided when :c:func:`PyRefTracer_SetTracer` was called." +msgstr "" +"El tipo de la función de seguimiento registrada " +"mediante :c:func:`PyRefTracer_SetTracer`. El primer parámetro es un objeto " +"Python que se acaba de crear (cuando **event** se establece " +"en :c:data:`PyRefTracer_CREATE`) o que está a punto de destruirse (cuando " +"**event** se establece en :c:data:`PyRefTracer_DESTROY`). El argumento " +"**data** es el puntero opaco que se proporcionó cuando se llamó " +"a :c:func:`PyRefTracer_SetTracer`." #: ../Doc/c-api/init.rst:1936 -#, fuzzy msgid "" "The value for the *event* parameter to :c:type:`PyRefTracer` functions when " "a Python object has been created." msgstr "" -"El valor del parámetro *what* para :c:type:`Py_tracefunc` funciona cuando " -"una función C ha retornado." +"El valor del parámetro *event* a :c:type:`PyRefTracer` funciona cuando se ha " +"creado un objeto Python." #: ../Doc/c-api/init.rst:1941 -#, fuzzy msgid "" "The value for the *event* parameter to :c:type:`PyRefTracer` functions when " "a Python object has been destroyed." msgstr "" -"El valor del parámetro *what* para :c:type:`Py_tracefunc` funciona cuando " -"una función C ha retornado." +"El valor del parámetro *event* a :c:type:`PyRefTracer` funciona cuando se ha " +"destruido un objeto Python." #: ../Doc/c-api/init.rst:1946 msgid "" @@ -3181,6 +3297,11 @@ msgid "" "the tracer function is called. Return ``0`` on success. Set an exception and " "return ``-1`` on error." msgstr "" +"Registra una función de rastreo de referencia. La función se llamará cuando " +"se haya creado un nuevo Python o cuando se vaya a destruir un objeto. Si se " +"proporciona **data**, debe ser un puntero opaco que se proporcionará cuando " +"se llame a la función de rastreo. Devuelve ``0`` en caso de éxito. Establece " +"una excepción y devuelve ``-1`` en caso de error." #: ../Doc/c-api/init.rst:1952 msgid "" @@ -3189,13 +3310,15 @@ msgid "" "any existing exception or set an exception. The GIL will be held every time " "the tracer function is called." msgstr "" +"No es que las funciones de seguimiento **must not** creen objetos Python en " +"su interior, de lo contrario la llamada será reentrante. El seguimiento " +"también **must not** borra cualquier excepción existente o establece una " +"excepción. El GIL se mantendrá cada vez que se llame a la función de " +"seguimiento." #: ../Doc/c-api/init.rst:1957 ../Doc/c-api/init.rst:1968 -#, fuzzy msgid "The GIL must be held when calling this function." -msgstr "" -"El GIL *no* necesita ser retenido al llamar a estas funciones; proporcionan " -"su propio bloqueo." +msgstr "El GIL debe mantenerse al llamar a esta función." #: ../Doc/c-api/init.rst:1963 msgid "" @@ -3204,6 +3327,10 @@ msgid "" "called. If no tracer was registered this function will return NULL and will " "set the **data** pointer to NULL." msgstr "" +"Obtenga la función de trazador de referencia registrada y el valor del " +"puntero de datos opacos que se registró cuando se llamó " +"a :c:func:`PyRefTracer_SetTracer`. Si no se registró ningún trazador, esta " +"función devolverá NULL y establecerá el puntero **data** en NULL." #: ../Doc/c-api/init.rst:1975 msgid "Advanced Debugger Support" @@ -3250,8 +3377,8 @@ msgid "" "objects belonging to the same :c:type:`PyInterpreterState` object." msgstr "" "Retorna el siguiente objeto de estado del hilo después de *tstate* de la " -"lista de todos los objetos que pertenecen al mismo objeto :c:type:" -"`PyInterpreterState`." +"lista de todos los objetos que pertenecen al mismo " +"objeto :c:type:`PyInterpreterState`." #: ../Doc/c-api/init.rst:2014 msgid "Thread Local Storage Support" @@ -3292,10 +3419,10 @@ msgstr "" #: ../Doc/c-api/init.rst:2032 msgid "" -"None of these API functions handle memory management on behalf of the :c:" -"expr:`void*` values. You need to allocate and deallocate them yourself. If " -"the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these functions " -"don't do refcount operations on them either." +"None of these API functions handle memory management on behalf of " +"the :c:expr:`void*` values. You need to allocate and deallocate them " +"yourself. If the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, " +"these functions don't do refcount operations on them either." msgstr "" "Ninguna de estas funciones API maneja la administración de memoria en nombre " "de los valores :c:expr:`void*`. Debe asignarlos y desasignarlos usted mismo. " @@ -3314,8 +3441,9 @@ msgid "" "instead of :c:expr:`int` to represent thread keys." msgstr "" "La API de TSS se introduce para reemplazar el uso de la API TLS existente " -"dentro del intérprete de CPython. Esta API utiliza un nuevo tipo :c:type:" -"`Py_tss_t` en lugar de :c:expr:`int` para representar las claves del hilo." +"dentro del intérprete de CPython. Esta API utiliza un nuevo " +"tipo :c:type:`Py_tss_t` en lugar de :c:expr:`int` para representar las " +"claves del hilo." #: ../Doc/c-api/init.rst:2048 msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" @@ -3368,11 +3496,12 @@ msgstr "" #: ../Doc/c-api/init.rst:2078 msgid "" -"Return a value which is the same state as a value initialized with :c:macro:" -"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." +"Return a value which is the same state as a value initialized " +"with :c:macro:`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic " +"allocation failure." msgstr "" -"Retorna un valor que es el mismo estado que un valor inicializado con :c:" -"macro:`Py_tss_NEEDS_INIT`, o ``NULL`` en caso de falla de asignación " +"Retorna un valor que es el mismo estado que un valor inicializado " +"con :c:macro:`Py_tss_NEEDS_INIT`, o ``NULL`` en caso de falla de asignación " "dinámica." #: ../Doc/c-api/init.rst:2085 @@ -3401,8 +3530,8 @@ msgstr "Métodos" msgid "" "The parameter *key* of these functions must not be ``NULL``. Moreover, the " "behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " -"undefined if the given :c:type:`Py_tss_t` has not been initialized by :c:" -"func:`PyThread_tss_create`." +"undefined if the given :c:type:`Py_tss_t` has not been initialized " +"by :c:func:`PyThread_tss_create`." msgstr "" "El parámetro *key* de estas funciones no debe ser ``NULL``. Además, los " "comportamientos de :c:func:`PyThread_tss_set` y :c:func:`PyThread_tss_get` " @@ -3435,15 +3564,16 @@ msgstr "" msgid "" "Destroy a TSS key to forget the values associated with the key across all " "threads, and change the key's initialization state to uninitialized. A " -"destroyed key is able to be initialized again by :c:func:" -"`PyThread_tss_create`. This function can be called repeatedly on the same " -"key -- calling it on an already destroyed key is a no-op." +"destroyed key is able to be initialized again " +"by :c:func:`PyThread_tss_create`. This function can be called repeatedly on " +"the same key -- calling it on an already destroyed key is a no-op." msgstr "" "Destruye una clave TSS para olvidar los valores asociados con la clave en " "todos los hilos y cambie el estado de inicialización de la clave a no " -"inicializado. Una clave destruida se puede inicializar nuevamente mediante :" -"c:func:`PyThread_tss_create`. Esta función se puede invocar repetidamente en " -"la misma llave; llamarla en una llave ya destruida es un *no-op*." +"inicializado. Una clave destruida se puede inicializar nuevamente " +"mediante :c:func:`PyThread_tss_create`. Esta función se puede invocar " +"repetidamente en la misma llave; llamarla en una llave ya destruida es un " +"*no-op*." #: ../Doc/c-api/init.rst:2130 msgid "" @@ -3451,9 +3581,9 @@ msgid "" "value with a TSS key in the current thread. Each thread has a distinct " "mapping of the key to a :c:expr:`void*` value." msgstr "" -"Retorna un valor cero para indicar la asociación exitosa de un valor a :c:" -"expr:`void*` con una clave TSS en el hilo actual. Cada hilo tiene un mapeo " -"distinto de la clave a un valor :c:expr:`void*`." +"Retorna un valor cero para indicar la asociación exitosa de un valor " +"a :c:expr:`void*` con una clave TSS en el hilo actual. Cada hilo tiene un " +"mapeo distinto de la clave a un valor :c:expr:`void*`." #: ../Doc/c-api/init.rst:2137 msgid "" @@ -3502,21 +3632,23 @@ msgstr "" #: ../Doc/c-api/init.rst:2168 msgid "Synchronization Primitives" -msgstr "" +msgstr "Primitivas de sincronización" #: ../Doc/c-api/init.rst:2170 msgid "The C-API provides a basic mutual exclusion lock." -msgstr "" +msgstr "La C-API proporciona un bloqueo de exclusión mutua básico." #: ../Doc/c-api/init.rst:2174 msgid "" "A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " "zero to represent the unlocked state. For example::" msgstr "" +"Un bloqueo de exclusión mutua. El :c:type:`!PyMutex` debe inicializarse a " +"cero para representar el estado desbloqueado. Por ejemplo:" #: ../Doc/c-api/init.rst:2177 msgid "PyMutex mutex = {0};" -msgstr "" +msgstr "PyMutex mutex = {0};" #: ../Doc/c-api/init.rst:2179 msgid "" @@ -3524,6 +3656,9 @@ msgid "" "contents and address of a :c:type:`!PyMutex` are meaningful, and it must " "remain at a fixed, writable location in memory." msgstr "" +"Las instancias de :c:type:`!PyMutex` no se deben copiar ni mover. Tanto el " +"contenido como la dirección de un :c:type:`!PyMutex` son significativos y " +"deben permanecer en una ubicación fija y escribible en la memoria." #: ../Doc/c-api/init.rst:2185 msgid "" @@ -3531,6 +3666,9 @@ msgid "" "considered unstable. The size may change in future Python releases without " "a deprecation period." msgstr "" +"Actualmente, un :c:type:`!PyMutex` ocupa un byte, pero el tamaño debe " +"considerarse inestable. El tamaño puede cambiar en futuras versiones de " +"Python sin un período de desuso." #: ../Doc/c-api/init.rst:2193 msgid "" @@ -3538,16 +3676,22 @@ msgid "" "will block until the mutex is unlocked. While blocked, the thread will " "temporarily release the :term:`GIL` if it is held." msgstr "" +"Bloqueo del mutex *m*. Si otro subproceso ya lo ha bloqueado, el subproceso " +"que realiza la llamada se bloqueará hasta que se desbloquee el mutex. " +"Mientras esté bloqueado, el subproceso liberará temporalmente el :term:`GIL` " +"si está retenido." #: ../Doc/c-api/init.rst:2201 msgid "" "Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " "issue a fatal error." msgstr "" +"Desbloquee el mutex *m*. El mutex debe estar bloqueado; de lo contrario, la " +"función emitirá un error fatal." #: ../Doc/c-api/init.rst:2209 msgid "Python Critical Section API" -msgstr "" +msgstr "API de sección crítica de Python" #: ../Doc/c-api/init.rst:2211 msgid "" @@ -3556,16 +3700,29 @@ msgid "" "intended to replace reliance on the :term:`global interpreter lock`, and are " "no-ops in versions of Python with the global interpreter lock." msgstr "" +"La API de sección crítica proporciona una capa de prevención de bloqueos " +"sobre los bloqueos por objeto para :term:`free-threaded ` " +"CPython. Su objetivo es reemplazar la dependencia de :term:`global " +"interpreter lock` y no se pueden realizar operaciones en versiones de Python " +"con el bloqueo del intérprete global." #: ../Doc/c-api/init.rst:2216 msgid "" "Critical sections avoid deadlocks by implicitly suspending active critical " -"sections and releasing the locks during calls to :c:func:" -"`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, the most " -"recent critical section is resumed, and its locks reacquired. This means " -"the critical section API provides weaker guarantees than traditional locks " -"-- they are useful because their behavior is similar to the :term:`GIL`." -msgstr "" +"sections and releasing the locks during calls " +"to :c:func:`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is " +"called, the most recent critical section is resumed, and its locks " +"reacquired. This means the critical section API provides weaker guarantees " +"than traditional locks -- they are useful because their behavior is similar " +"to the :term:`GIL`." +msgstr "" +"Las secciones críticas evitan los bloqueos al suspender implícitamente las " +"secciones críticas activas y liberar los bloqueos durante las llamadas " +"a :c:func:`PyEval_SaveThread`. Cuando se llama " +"a :c:func:`PyEval_RestoreThread`, se reanuda la sección crítica más reciente " +"y se vuelven a adquirir sus bloqueos. Esto significa que la API de la " +"sección crítica ofrece garantías más débiles que los bloqueos tradicionales; " +"son útiles porque su comportamiento es similar al de :term:`GIL`." #: ../Doc/c-api/init.rst:2223 msgid "" @@ -3574,19 +3731,29 @@ msgid "" "expansions. Note that the sizes and contents of the structures may change in " "future Python versions." msgstr "" +"Las funciones y estructuras que utilizan las macros se exponen para los " +"casos en los que las macros de C no están disponibles. Solo se deben " +"utilizar como en las expansiones de macros indicadas. Tenga en cuenta que " +"los tamaños y contenidos de las estructuras pueden cambiar en futuras " +"versiones de Python." #: ../Doc/c-api/init.rst:2230 msgid "" -"Operations that need to lock two objects at once must use :c:macro:" -"`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to " -"lock more than one object at once, because the inner critical section may " -"suspend the outer critical sections. This API does not provide a way to " -"lock more than two objects at once." +"Operations that need to lock two objects at once must " +"use :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical " +"sections to lock more than one object at once, because the inner critical " +"section may suspend the outer critical sections. This API does not provide " +"a way to lock more than two objects at once." msgstr "" +"Las operaciones que necesitan bloquear dos objetos a la vez deben " +"utilizar :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. *cannot* utiliza secciones " +"críticas anidadas para bloquear más de un objeto a la vez, ya que la sección " +"crítica interna puede suspender las secciones críticas externas. Esta API no " +"proporciona una manera de bloquear más de dos objetos a la vez." #: ../Doc/c-api/init.rst:2236 msgid "Example usage::" -msgstr "" +msgstr "Ejemplo de uso::" #: ../Doc/c-api/init.rst:2238 msgid "" @@ -3599,6 +3766,14 @@ msgid "" " Py_RETURN_NONE;\n" "}" msgstr "" +"static PyObject *\n" +"set_field(MyObject *self, PyObject *value)\n" +"{\n" +" Py_BEGIN_CRITICAL_SECTION(self);\n" +" Py_SETREF(self->field, Py_XNewRef(value));\n" +" Py_END_CRITICAL_SECTION();\n" +" Py_RETURN_NONE;\n" +"}" #: ../Doc/c-api/init.rst:2247 msgid "" @@ -3606,20 +3781,28 @@ msgid "" "can call arbitrary code through an object's deallocation function. The " "critical section API avoids potentital deadlocks due to reentrancy and lock " "ordering by allowing the runtime to temporarily suspend the critical section " -"if the code triggered by the finalizer blocks and calls :c:func:" -"`PyEval_SaveThread`." +"if the code triggered by the finalizer blocks and " +"calls :c:func:`PyEval_SaveThread`." msgstr "" +"En el ejemplo anterior, :c:macro:`Py_SETREF` llama a :c:macro:`Py_DECREF`, " +"que puede llamar a código arbitrario a través de la función de desasignación " +"de un objeto. La API de sección crítica evita posibles bloqueos debido a la " +"reentrada y al orden de bloqueo al permitir que el entorno de ejecución " +"suspenda temporalmente la sección crítica si el código activado por el " +"finalizador se bloquea y llama a :c:func:`PyEval_SaveThread`." #: ../Doc/c-api/init.rst:2255 msgid "" "Acquires the per-object lock for the object *op* and begins a critical " "section." msgstr "" +"Adquiere el bloqueo por objeto para el objeto *op* y comienza una sección " +"crítica." #: ../Doc/c-api/init.rst:2258 ../Doc/c-api/init.rst:2272 #: ../Doc/c-api/init.rst:2287 ../Doc/c-api/init.rst:2301 msgid "In the free-threaded build, this macro expands to::" -msgstr "" +msgstr "En la compilación de subprocesos libres, esta macro se expande a:" #: ../Doc/c-api/init.rst:2260 msgid "" @@ -3627,24 +3810,29 @@ msgid "" " PyCriticalSection _py_cs;\n" " PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" msgstr "" +"{\n" +" PyCriticalSection _py_cs;\n" +" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" #: ../Doc/c-api/init.rst:2264 ../Doc/c-api/init.rst:2293 msgid "In the default build, this macro expands to ``{``." -msgstr "" +msgstr "En la compilación predeterminada, esta macro se expande a ``{``." #: ../Doc/c-api/init.rst:2270 msgid "Ends the critical section and releases the per-object lock." -msgstr "" +msgstr "Finaliza la sección crítica y libera el bloqueo por objeto." #: ../Doc/c-api/init.rst:2274 msgid "" " PyCriticalSection_End(&_py_cs);\n" "}" msgstr "" +" PyCriticalSection_End(&_py_cs);\n" +"}" #: ../Doc/c-api/init.rst:2277 ../Doc/c-api/init.rst:2306 msgid "In the default build, this macro expands to ``}``." -msgstr "" +msgstr "En la compilación predeterminada, esta macro se expande a ``}``." #: ../Doc/c-api/init.rst:2283 msgid "" @@ -3652,6 +3840,9 @@ msgid "" "critical section. The locks are acquired in a consistent order (lowest " "address first) to avoid lock ordering deadlocks." msgstr "" +"Adquiere los bloqueos por objeto para los objetos *a* y *b* y comienza una " +"sección crítica. Los bloqueos se adquieren en un orden coherente (la " +"dirección más baja primero) para evitar bloqueos en el orden de bloqueo." #: ../Doc/c-api/init.rst:2289 msgid "" @@ -3659,176 +3850,177 @@ msgid "" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection_Begin2(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" msgstr "" +"{\n" +" PyCriticalSection2 _py_cs2;\n" +" PyCriticalSection_Begin2(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" #: ../Doc/c-api/init.rst:2299 msgid "Ends the critical section and releases the per-object locks." -msgstr "" +msgstr "Finaliza la sección crítica y libera los bloqueos por objeto." #: ../Doc/c-api/init.rst:2303 msgid "" " PyCriticalSection_End2(&_py_cs2);\n" "}" msgstr "" +" PyCriticalSection_End2(&_py_cs2);\n" +"}" #: ../Doc/c-api/init.rst:335 msgid "PyEval_InitThreads()" -msgstr "" +msgstr "PyEval_InitThreads()" #: ../Doc/c-api/init.rst:335 msgid "modules (in module sys)" -msgstr "" +msgstr "módulos (en el módulo sys)" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 msgid "path (in module sys)" -msgstr "" +msgstr "path (en el módulo sys)" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 #: ../Doc/c-api/init.rst:1011 ../Doc/c-api/init.rst:1510 #: ../Doc/c-api/init.rst:1605 msgid "module" -msgstr "" +msgstr "modulo" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1510 #: ../Doc/c-api/init.rst:1605 msgid "builtins" -msgstr "" +msgstr "elementos incorporados" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1510 #: ../Doc/c-api/init.rst:1605 msgid "__main__" -msgstr "" +msgstr "__main__" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1510 #: ../Doc/c-api/init.rst:1605 msgid "sys" -msgstr "" +msgstr "sys" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 msgid "search" -msgstr "" +msgstr "buscar" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 msgid "path" -msgstr "" +msgstr "path" #: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1570 #: ../Doc/c-api/init.rst:1623 msgid "Py_FinalizeEx (C function)" -msgstr "" +msgstr "Py_FinalizeEx (C function)" #: ../Doc/c-api/init.rst:445 -#, fuzzy msgid "Py_Initialize()" -msgstr ":c:func:`Py_IsInitialized`" +msgstr "Py_Initialize()" #: ../Doc/c-api/init.rst:445 ../Doc/c-api/init.rst:674 msgid "main()" -msgstr "" +msgstr "main()" #: ../Doc/c-api/init.rst:445 msgid "Py_GetPath()" -msgstr "" +msgstr "Py_GetPath()" #: ../Doc/c-api/init.rst:555 msgid "executable (in module sys)" -msgstr "" +msgstr "ejecutable (en el módulo sys)" #: ../Doc/c-api/init.rst:609 ../Doc/c-api/init.rst:651 #: ../Doc/c-api/init.rst:665 msgid "version (in module sys)" -msgstr "" +msgstr "version (in module sys)" #: ../Doc/c-api/init.rst:621 msgid "platform (in module sys)" -msgstr "" +msgstr "platform (en el módulo sys)" #: ../Doc/c-api/init.rst:638 msgid "copyright (in module sys)" -msgstr "" +msgstr "derechos de autor (en el módulo sys)" #: ../Doc/c-api/init.rst:674 msgid "Py_FatalError()" -msgstr "" +msgstr "Py_FatalError()" #: ../Doc/c-api/init.rst:674 msgid "argv (in module sys)" -msgstr "" +msgstr "argv (en el módulo sys)" #: ../Doc/c-api/init.rst:794 -#, fuzzy msgid "global interpreter lock" -msgstr "Estado del hilo y el bloqueo global del intérprete" +msgstr "bloqueo global del intérprete" #: ../Doc/c-api/init.rst:794 -#, fuzzy msgid "interpreter lock" -msgstr "Soporte de subinterprete" +msgstr "bloqueo de intérprete" #: ../Doc/c-api/init.rst:794 msgid "lock, interpreter" -msgstr "" +msgstr "bloqueo, interprete" #: ../Doc/c-api/init.rst:807 msgid "setswitchinterval (in module sys)" -msgstr "" +msgstr "setswitchinterval (in module sys)" #: ../Doc/c-api/init.rst:816 msgid "PyThreadState (C type)" -msgstr "" +msgstr "PyThreadState (C type)" #: ../Doc/c-api/init.rst:842 msgid "Py_BEGIN_ALLOW_THREADS (C macro)" -msgstr "" +msgstr "Py_BEGIN_ALLOW_THREADS (C macro)" #: ../Doc/c-api/init.rst:842 msgid "Py_END_ALLOW_THREADS (C macro)" -msgstr "" +msgstr "Py_END_ALLOW_THREADS (C macro)" #: ../Doc/c-api/init.rst:858 msgid "PyEval_RestoreThread (C function)" -msgstr "" +msgstr "PyEval_RestoreThread (C function)" #: ../Doc/c-api/init.rst:858 msgid "PyEval_SaveThread (C function)" -msgstr "" +msgstr "PyEval_SaveThread (C function)" #: ../Doc/c-api/init.rst:989 msgid "PyEval_AcquireThread()" -msgstr "" +msgstr "PyEval_AcquireThread()" #: ../Doc/c-api/init.rst:989 msgid "PyEval_ReleaseThread()" -msgstr "" +msgstr "PyEval_ReleaseThread()" #: ../Doc/c-api/init.rst:989 msgid "PyEval_SaveThread()" -msgstr "" +msgstr "PyEval_SaveThread()" #: ../Doc/c-api/init.rst:989 msgid "PyEval_RestoreThread()" -msgstr "" +msgstr "PyEval_RestoreThread()" #: ../Doc/c-api/init.rst:1011 msgid "_thread" -msgstr "" +msgstr "_thread" #: ../Doc/c-api/init.rst:1510 ../Doc/c-api/init.rst:1605 msgid "stdout (in module sys)" -msgstr "" +msgstr "stdout (in module sys)" #: ../Doc/c-api/init.rst:1510 ../Doc/c-api/init.rst:1605 msgid "stderr (in module sys)" -msgstr "" +msgstr "stderr (in module sys)" #: ../Doc/c-api/init.rst:1510 ../Doc/c-api/init.rst:1605 msgid "stdin (in module sys)" -msgstr "" +msgstr "stdin (in module sys)" #: ../Doc/c-api/init.rst:1570 -#, fuzzy msgid "Py_Initialize (C function)" -msgstr ":c:func:`Py_IsInitialized`" +msgstr "Py_Initialize (C function)" #: ../Doc/c-api/init.rst:1600 msgid "close (in module os)" -msgstr "" +msgstr "cerrar (en el módulo os)" diff --git a/dictionaries/c-api_init.txt b/dictionaries/c-api_init.txt index 512f5c6fbe..86d469745a 100644 --- a/dictionaries/c-api_init.txt +++ b/dictionaries/c-api_init.txt @@ -1,3 +1,6 @@ -pthreads -deadlock Reanudelos +deadlock +monofásico +monofásicos +multifásico +pthreads From c9f98af20e4af6c844ed04217e43bca30dd4e1cb Mon Sep 17 00:00:00 2001 From: Joseph Salgado <49181840+xooseph@users.noreply.github.com> Date: Tue, 14 Oct 2025 17:37:55 -0600 Subject: [PATCH 31/40] Translate `c-api/long.po` (#3424) Closes #3239 --------- Co-authored-by: rtobar --- c-api/long.po | 294 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 204 insertions(+), 90 deletions(-) diff --git a/c-api/long.po b/c-api/long.po index 4550eb3602..f7a23ef9c6 100644 --- a/c-api/long.po +++ b/c-api/long.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-02 01:24+0200\n" +"PO-Revision-Date: 2025-10-14 01:44-0600\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language: es\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.7\n" #: ../Doc/c-api/long.rst:6 msgid "Integer Objects" @@ -79,23 +80,21 @@ msgstr "" "de error." #: ../Doc/c-api/long.rst:43 -#, fuzzy msgid "" "The current implementation keeps an array of integer objects for all " "integers between ``-5`` and ``256``. When you create an int in that range " "you actually just get back a reference to the existing object." msgstr "" "La implementación actual mantiene un arreglo de objetos enteros para todos " -"los enteros entre ``-5`` y ``256``, cuando crea un *int* en ese rango, en " +"los enteros entre ``-5`` y ``256``. Cuando crea un *int* en ese rango, en " "realidad solo obtiene una referencia al objeto existente." #: ../Doc/c-api/long.rst:50 -#, fuzzy msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, " "or ``NULL`` on failure." msgstr "" -"Retorna un objeto :c:type:`PyLongObject` nuevo desde un C :c:type:`unsigned " +"Retorna un objeto :c:type:`PyLongObject` nuevo desde un C :c:expr:`unsigned " "long`, o ``NULL`` en caso de error." #: ../Doc/c-api/long.rst:56 @@ -115,21 +114,19 @@ msgstr "" "o ``NULL`` en caso de error." #: ../Doc/c-api/long.rst:68 -#, fuzzy msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or " "``NULL`` on failure." msgstr "" -"Retorna un objeto :c:type:`PyLongObject` nuevo desde un C :c:type:`long " +"Retorna un objeto :c:type:`PyLongObject` nuevo desde un C :c:expr:`long " "long`, o ``NULL`` en caso de error." #: ../Doc/c-api/long.rst:74 -#, fuzzy msgid "" "Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long " "long`, or ``NULL`` on failure." msgstr "" -"Retorna un objeto :c:type:`PyLongObject` nuevo desde un C :c:type:`unsigned " +"Retorna un objeto :c:type:`PyLongObject` nuevo desde un C :c:expr:`unsigned " "long long`, o ``NULL`` en caso de error." #: ../Doc/c-api/long.rst:80 @@ -141,7 +138,6 @@ msgstr "" "``NULL`` en caso de error." #: ../Doc/c-api/long.rst:86 -#, fuzzy msgid "" "Return a new :c:type:`PyLongObject` based on the string value in *str*, " "which is interpreted according to the radix in *base*, or ``NULL`` on " @@ -156,15 +152,17 @@ msgid "" "whitespace, :exc:`ValueError` will be raised." msgstr "" "Retorna un nuevo :c:type:`PyLongObject` basado en el valor de cadena de " -"caracteres en *str*, que se interpreta de acuerdo con la raíz en *base*. Si " -"*pend* no es ``NULL``, *\\* pend* apuntará al primer carácter en *str* que " -"sigue a la representación del número. Si *base* es ``0``, *str* se " -"interpreta utilizando la definición :ref:`integers`; en este caso, los ceros " -"a la izquierda en un número decimal distinto de cero lanzan un :exc:" -"`ValueError`. Si *base* no es ``0``, debe estar entre ``2`` y ``36``, " -"inclusive. Se ignoran los espacios iniciales y los guiones bajos " -"individuales después de un especificador base y entre dígitos. Si no hay " -"dígitos, se lanzará :exc:`ValueError`." +"caracteres en *str*, que se interpreta de acuerdo con la raíz en *base*, o " +"``NULL`` en caso de error. Si *pend* no es ``NULL``, *\\*pend* apuntará al " +"final de *str* en caso de éxito o al primer carácter que no se pudo procesar " +"en caso de error. Si *base* es ``0``, *str* se interpreta utilizando la " +"definición :ref:`integers`; en este caso, los ceros a la izquierda en un " +"número decimal distinto de cero lanzan un :exc:`ValueError`. Si *base* no es " +"``0``, debe estar entre ``2`` y ``36``, inclusive. Se ignoran los espacios " +"iniciales y finales y los guiones bajos individuales después de un " +"especificador base y entre dígitos. Si no hay dígitos o *str* no termina en " +"NULL después de los dígitos y los espacios finales, se lanzará :exc:" +"`ValueError`." #: ../Doc/c-api/long.rst:97 msgid "" @@ -172,6 +170,9 @@ msgid "" "c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can " "call those from C using :c:func:`PyObject_CallMethod`." msgstr "" +"Los métodos de Python :meth:`int.to_bytes` y :meth:`int.from_bytes` para " +"convertir un :c:type:`PyLongObject` a/desde un arreglo de bytes en base " +"``256``. Se pueden llamar desde C al utilizar :c:func:`PyObject_CallMethod`." #: ../Doc/c-api/long.rst:104 msgid "" @@ -194,6 +195,8 @@ msgid "" "Create a Python integer from the value contained in the first *n_bytes* of " "*buffer*, interpreted as a two's-complement signed number." msgstr "" +"Crea un entero de Python desde el valor contenido en los primeros *n_bytes* " +"de *buffer*, interpretado como un número con signo del complemento a dos." #: ../Doc/c-api/long.rst:121 msgid "" @@ -203,12 +206,19 @@ msgid "" "``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` will produce the same result as " "calling :c:func:`PyLong_FromUnsignedNativeBytes`. Other flags are ignored." msgstr "" +"*flags* son los mismos que para :c:func:`PyLong_AsNativeBytes`. Al pasar " +"``-1`` seleccionará el endian nativo con el que CPython fue compilado y " +"asumirá que el bit más significativo es un bit de signo. Al pasar " +"``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` producirá el mismo resultado que llamar " +"a :c:func:`PyLong_FromUnsignedNativeBytes`. Otros indicadores se ignoran." #: ../Doc/c-api/long.rst:132 msgid "" "Create a Python integer from the value contained in the first *n_bytes* of " "*buffer*, interpreted as an unsigned number." msgstr "" +"Crea un entero de Python desde el valor contenido en los primeros *n_bytes* " +"de *buffer*, interpretado como un número sin signo." #: ../Doc/c-api/long.rst:135 msgid "" @@ -216,26 +226,29 @@ msgid "" "select the native endian that CPython was compiled with and assume that the " "most-significant bit is not a sign bit. Flags other than endian are ignored." msgstr "" +"*flags* son los mismos que para :c:func:`PyLong_AsNativeBytes`. Al pasar " +"``-1`` seleccionará el endian nativo con el que CPython fue compilado y " +"asumirá que el bit más significativo no es un bit con signo. Los indicadores " +"que no sean endian se ignoran." #: ../Doc/c-api/long.rst:148 ../Doc/c-api/long.rst:184 -#, fuzzy msgid "" "Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -"Retorna una representación C :c:type:`long` de *obj*. Si *obj* no es una " +"Retorna una representación C :c:expr:`long` de *obj*. Si *obj* no es una " "instancia de :c:type:`PyLongObject`, primero llama a su método :meth:" -"`__index__` (si está presente) para convertirlo en un :c:type:`PyLongObject`." +"`~object.__index__` (si está presente) para convertirlo en un :c:type:" +"`PyLongObject`." #: ../Doc/c-api/long.rst:152 -#, fuzzy msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long`." msgstr "" "Lanza :exc:`OverflowError` si el valor de *obj* está fuera de rango para un :" -"c:type:`long`." +"c:expr:`long`." #: ../Doc/c-api/long.rst:155 ../Doc/c-api/long.rst:193 #: ../Doc/c-api/long.rst:214 ../Doc/c-api/long.rst:234 @@ -248,16 +261,14 @@ msgstr "" #: ../Doc/c-api/long.rst:157 ../Doc/c-api/long.rst:195 #: ../Doc/c-api/long.rst:216 ../Doc/c-api/long.rst:238 #: ../Doc/c-api/long.rst:322 ../Doc/c-api/long.rst:342 -#, fuzzy msgid "Use :meth:`~object.__index__` if available." -msgstr "Use :meth:`__index__` si está disponible." +msgstr "Use :meth:`~object.__index__` si está disponible." #: ../Doc/c-api/long.rst:160 ../Doc/c-api/long.rst:198 #: ../Doc/c-api/long.rst:219 ../Doc/c-api/long.rst:241 #: ../Doc/c-api/long.rst:325 ../Doc/c-api/long.rst:345 -#, fuzzy msgid "This function will no longer use :meth:`~object.__int__`." -msgstr "Esta función no usará más :meth:`__int__`." +msgstr "Esta función no usará más :meth:`~object.__int__`." #: ../Doc/c-api/long.rst:167 msgid "" @@ -265,60 +276,62 @@ msgid "" "``PyLong_AsLong``. In particular, it can fail with :exc:`OverflowError` or " "another exception." msgstr "" +"Un alias :term:`soft deprecated`. Equivalente exacto al ``PyLong_AsLong`` " +"preferido. En particular, puede fallar con :exc:`OverflowError` u otra " +"excepción." #: ../Doc/c-api/long.rst:171 msgid "The function is soft deprecated." -msgstr "" +msgstr "La función está deprecada de forma suave." #: ../Doc/c-api/long.rst:176 msgid "" "Similar to :c:func:`PyLong_AsLong`, but store the result in a C :c:expr:" "`int` instead of a C :c:expr:`long`." msgstr "" +"Similar a :c:func:`PyLong_AsLong`, pero almacena el resultado en un C :c:" +"expr:`int` en lugar de un C :c:expr:`long`." #: ../Doc/c-api/long.rst:188 -#, fuzzy msgid "" "If the value of *obj* is greater than :c:macro:`LONG_MAX` or less than :c:" "macro:`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " "return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " "exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -"Si el valor de *obj* es mayor que :const:`LONG_MAX` o menor que :const:" -"`LONG_MIN`, establece *\\*overflow * en ``1`` o ``-1``, respectivamente, y " +"Si el valor de *obj* es mayor que :c:macro:`LONG_MAX` o menor que :c:macro:" +"`LONG_MIN`, establece *\\*overflow* en ``1`` o ``-1``, respectivamente, y " "retorna ``-1``; de lo contrario, establece *\\*overflow* en ``0``. Si se " "produce alguna otra excepción, configura *\\*overflow* en ``0`` y retorna " "``-1`` como de costumbre." #: ../Doc/c-api/long.rst:207 ../Doc/c-api/long.rst:225 -#, fuzzy msgid "" "Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`~object.__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -"Retorna una representación C :c:type:`long long` de *obj*. Si *obj* no es " +"Retorna una representación C :c:expr:`long long` de *obj*. Si *obj* no es " "una instancia de :c:type:`PyLongObject`, primero llame a su método :meth:" -"`__index__` (si está presente) para convertirlo en un :c:type:`PyLongObject`." +"`~object.__index__` (si está presente) para convertirlo en un :c:type:" +"`PyLongObject`." #: ../Doc/c-api/long.rst:211 -#, fuzzy msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long long`." msgstr "" "Lanza :exc:`OverflowError` si el valor de *obj* está fuera de rango para un :" -"c:type:`long long`." +"c:expr:`long long`." #: ../Doc/c-api/long.rst:229 -#, fuzzy msgid "" "If the value of *obj* is greater than :c:macro:`LLONG_MAX` or less than :c:" "macro:`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and " "return ``-1``; otherwise, set *\\*overflow* to ``0``. If any other " "exception occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -"Si el valor de *obj* es mayor que :const:`LLONG_MAX` o menor que :const:" +"Si el valor de *obj* es mayor que :c:macro:`LLONG_MAX` o menor que :c:macro:" "`LLONG_MIN`, establece *\\*overflow* en ``1`` o ``-1``, respectivamente, y " "retorna ``-1``; de lo contrario, establece *\\*overflow* en ``0``. Si se " "produce alguna otra excepción, configura *\\*overflow* en ``0`` y retorna " @@ -341,22 +354,20 @@ msgstr "" "un :c:type:`Py_ssize_t`." #: ../Doc/c-api/long.rst:266 -#, fuzzy msgid "" "Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" -"Retorna una representación de C :c:type:`unsigned long` de *pylong*. " +"Retorna una representación de C :c:expr:`unsigned long` de *pylong*. " "*pylong* debe ser una instancia de :c:type:`PyLongObject`." #: ../Doc/c-api/long.rst:269 -#, fuzzy msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`unsigned long`." msgstr "" "Lanza :exc:`OverflowError` si el valor de *pylong* está fuera de rango para " -"un :c:type:`unsigned long`." +"un :c:expr:`unsigned long`." #: ../Doc/c-api/long.rst:272 msgid "" @@ -391,22 +402,20 @@ msgstr "" "desambiguar." #: ../Doc/c-api/long.rst:297 -#, fuzzy msgid "" "Return a C :c:expr:`unsigned long long` representation of *pylong*. " "*pylong* must be an instance of :c:type:`PyLongObject`." msgstr "" -"Retorna una representación de C :c:type:`unsigned long long` de *pylong*. " +"Retorna una representación de C :c:expr:`unsigned long long` de *pylong*. " "*pylong* debe ser una instancia de :c:type:`PyLongObject`." #: ../Doc/c-api/long.rst:300 -#, fuzzy msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" "c:expr:`unsigned long long`." msgstr "" "Lanza :exc:`OverflowError` si el valor de *pylong* está fuera de rango para " -"un :c:type:`unsigned long long`." +"un :c:expr:`unsigned long long`." #: ../Doc/c-api/long.rst:303 msgid "" @@ -424,23 +433,22 @@ msgstr "" "`TypeError`." #: ../Doc/c-api/long.rst:312 -#, fuzzy msgid "" "Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " "an instance of :c:type:`PyLongObject`, first call its :meth:`~object." "__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -"Retorna una representación C :c:type:`unsigned long` de *obj*. Si *obj* no " +"Retorna una representación C :c:expr:`unsigned long` de *obj*. Si *obj* no " "es una instancia de :c:type:`PyLongObject`, primero llame a su método :meth:" -"`__index__` (si está presente) para convertirlo en un :c:type:`PyLongObject`." +"`~object.__index__` (si está presente) para convertirlo en un :c:type:" +"`PyLongObject`." #: ../Doc/c-api/long.rst:316 -#, fuzzy msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " "the reduction of that value modulo ``ULONG_MAX + 1``." msgstr "" -"Si el valor de *obj* está fuera del rango para :c:type:`unsigned long`, " +"Si el valor de *obj* está fuera del rango para :c:expr:`unsigned long`, " "retorna la reducción de ese valor módulo ``ULONG_MAX + 1``." #: ../Doc/c-api/long.rst:319 @@ -452,24 +460,22 @@ msgstr "" "para desambiguar." #: ../Doc/c-api/long.rst:331 -#, fuzzy msgid "" "Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " "is not an instance of :c:type:`PyLongObject`, first call its :meth:`~object." "__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -"Retorna una representación C :c:type:`unsigned long long` de *obj*. Si *obj* " +"Retorna una representación C :c:expr:`unsigned long long` de *obj*. Si *obj* " "no es una instancia de :c:type:`PyLongObject`, primero llame a su método :" -"meth:`__index__` (si está presente) para convertirlo en un :c:type:" +"meth:`~object.__index__` (si está presente) para convertirlo en un :c:type:" "`PyLongObject`." #: ../Doc/c-api/long.rst:336 -#, fuzzy msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " "return the reduction of that value modulo ``ULLONG_MAX + 1``." msgstr "" -"Si el valor de *obj* está fuera del rango para :c:type:`unsigned long long`, " +"Si el valor de *obj* está fuera del rango para :c:expr:`unsigned long long`, " "retorna la reducción de ese valor módulo ``ULLONG_MAX + 1``." #: ../Doc/c-api/long.rst:339 @@ -481,22 +487,20 @@ msgstr "" "para desambiguar." #: ../Doc/c-api/long.rst:351 -#, fuzzy msgid "" "Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -"Retorna una representación de C :c:type:`double` de *pylong*. *pylong* debe " +"Retorna una representación de C :c:expr:`double` de *pylong*. *pylong* debe " "ser una instancia de :c:type:`PyLongObject`." #: ../Doc/c-api/long.rst:354 -#, fuzzy msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`double`." msgstr "" "Lanza :exc:`OverflowError` si el valor de *pylong* está fuera de rango para " -"un :c:type:`double`." +"un :c:expr:`double`." #: ../Doc/c-api/long.rst:357 msgid "" @@ -506,16 +510,15 @@ msgstr "" "desambiguar." #: ../Doc/c-api/long.rst:362 -#, fuzzy msgid "" "Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " "cannot be converted, an :exc:`OverflowError` will be raised. This is only " "assured to produce a usable :c:expr:`void` pointer for values created with :" "c:func:`PyLong_FromVoidPtr`." msgstr "" -"Convierte un entero Python *pylong* en un puntero C :c:type:`void`. Si " +"Convierte un entero Python *pylong* en un puntero C :c:expr:`void`. Si " "*pylong* no se puede convertir, se lanzará un :exc:`OverflowError`. Esto " -"solo se garantiza para producir un puntero utilizable :c:type:`void` para " +"solo se garantiza para producir un puntero utilizable :c:expr:`void` para " "valores creados con :c:func:`PyLong_FromVoidPtr`." #: ../Doc/c-api/long.rst:367 @@ -531,6 +534,10 @@ msgid "" "*n_bytes*. The *flags* can be set to ``-1`` to behave similarly to a C cast, " "or to values documented below to control the behavior." msgstr "" +"Copia el valor entero de Python *pylong* a un *buffer* nativo de tamaño " +"*n_bytes*. Los *flags* pueden establecerse en ``-1`` para un comportamiento " +"similar a una conversión de C, o en los valores documentados a continuación " +"para controlar el comportamiento." #: ../Doc/c-api/long.rst:376 msgid "" @@ -538,6 +545,10 @@ msgid "" "*pylong* cannot be interpreted as an integer, or if *pylong* was negative " "and the ``Py_ASNATIVEBYTES_REJECT_NEGATIVE`` flag was set." msgstr "" +"Retorna ``-1`` con una excepción lanzada en caso de error. Esto puede " +"ocurrir si *pylong* no se puede interpretar como un entero, o si *pylong* " +"era negativo y se configuró el indicador " +"``Py_ASNATIVEBYTES_REJECT_NEGATIVE``." #: ../Doc/c-api/long.rst:380 msgid "" @@ -545,6 +556,10 @@ msgid "" "is equal to or less than *n_bytes*, the entire value was copied. All " "*n_bytes* of the buffer are written: large buffers are padded with zeroes." msgstr "" +"De lo contrario, retorna el número de bytes necesarios para almacenar el " +"valor. Si es igual o menor que *n_bytes*, se copió el valor completo. Se " +"escriben todos los *n_bytes* del búfer: los búferes grandes se rellenan con " +"ceros." #: ../Doc/c-api/long.rst:385 msgid "" @@ -553,24 +568,30 @@ msgid "" "and the higher bits are ignored. This matches the typical behavior of a C-" "style downcast." msgstr "" +"Si el valor que se retorna es mayor que *n_bytes*, se trunca el valor: se " +"escriben todos los bits más bajos que quepan y se ignoran los bits más " +"altos. Esto coincide con el comportamiento típico de una conversión " +"descendente de estilo C." #: ../Doc/c-api/long.rst:392 msgid "" "Overflow is not considered an error. If the returned value is larger than " "*n_bytes*, most significant bits were discarded." msgstr "" +"El desbordamiento no se considera un error. Si el valor que se retorna es " +"mayor que *n_bytes*, se descartan los bits más significativos." #: ../Doc/c-api/long.rst:395 msgid "``0`` will never be returned." -msgstr "" +msgstr "``0`` nunca será retornado." #: ../Doc/c-api/long.rst:397 msgid "Values are always copied as two's-complement." -msgstr "" +msgstr "Los valores siempre se copian como complemento a dos." #: ../Doc/c-api/long.rst:399 msgid "Usage example::" -msgstr "" +msgstr "Ejemplo de uso::" #: ../Doc/c-api/long.rst:401 msgid "" @@ -588,6 +609,19 @@ msgid "" " // lowest bits of pylong.\n" "}" msgstr "" +"int32_t value;\n" +"Py_ssize_t bytes = PyLong_AsNativeBytes(pylong, &value, sizeof(value), -1);\n" +"if (bytes < 0) {\n" +" // Error. Se estableció una excepción de Python con el motivo.\n" +" return NULL;\n" +"}\n" +"else if (bytes <= (Py_ssize_t)sizeof(value)) {\n" +" // ¡Éxito!\n" +"}\n" +"else {\n" +" // Se produjo un desbordamiento, pero 'value' contiene\n" +" // los bits más bajos truncados de pylong.\n" +"}" #: ../Doc/c-api/long.rst:415 msgid "" @@ -595,18 +629,27 @@ msgid "" "large enough to hold the value. This may be larger than technically " "necessary, but not unreasonably so. If *n_bytes=0*, *buffer* may be ``NULL``." msgstr "" +"Al pasar cero a *n_bytes* retornará el tamaño de un búfer lo suficientemente " +"grande como para contener el valor. Este tamaño puede ser mayor de lo " +"técnicamente necesario, pero no excesivamente grande. Si *n_bytes=0*, " +"*buffer* puede ser ``NULL``." #: ../Doc/c-api/long.rst:422 msgid "" "Passing *n_bytes=0* to this function is not an accurate way to determine the " "bit length of the value." msgstr "" +"Al pasar *n_bytes=0* a esta función no es una forma precisa de determinar la " +"longitud en bits del valor." #: ../Doc/c-api/long.rst:425 msgid "" "To get at the entire Python value of an unknown size, the function can be " "called twice: first to determine the buffer size, then to fill it::" msgstr "" +"Para obtener el valor completo de Python de un tamaño desconocido, la " +"función se puede llamar dos veces: primero para determinar el tamaño del " +"búfer y luego para llenarlo::" #: ../Doc/c-api/long.rst:428 msgid "" @@ -638,6 +681,33 @@ msgid "" "// ... use bignum ...\n" "free(bignum);" msgstr "" +"// Pide cuánto espacio necesitamos.\n" +"Py_ssize_t expected = PyLong_AsNativeBytes(pylong, NULL, 0, -1);\n" +"if (expected < 0) {\n" +" // Error. Se estableció una excepción de Python con el motivo.\n" +" return NULL;\n" +"}\n" +"assert(expected != 0); // Imposible según la definición de la API.\n" +"uint8_t *bignum = malloc(expected);\n" +"if (!bignum) {\n" +" PyErr_SetString(PyExc_MemoryError, \"bignum malloc failed.\");\n" +" return NULL;\n" +"}\n" +"// Obtiene el valor completo de forma segura.\n" +"Py_ssize_t bytes = PyLong_AsNativeBytes(pylong, bignum, expected, -1);\n" +"if (bytes < 0) { // Se configuró una excepción.\n" +" free(bignum);\n" +" return NULL;\n" +"}\n" +"else if (bytes > expected) { // Esto no debería ser posible.\n" +" PyErr_SetString(PyExc_RuntimeError,\n" +" \"Unexpected bignum truncation after a size check.\");\n" +" free(bignum);\n" +" return NULL;\n" +"}\n" +"// El éxito esperado dada la comprobación previa.\n" +"// ... use bignum ...\n" +"free(bignum);" #: ../Doc/c-api/long.rst:456 msgid "" @@ -645,54 +715,62 @@ msgid "" "that behave most like a C cast, or a combintation of the other flags in the " "table below. Note that ``-1`` cannot be combined with other flags." msgstr "" +"*flags* es ``-1`` (``Py_ASNATIVEBYTES_DEFAULTS``) para seleccionar valores " +"predeterminados que se comportan de forma similar a una conversión de C, o " +"una combinación de los demás indicadores de la tabla a continuación. Tenga " +"en cuenta que ``-1`` no se puede combinar con otros indicadores." #: ../Doc/c-api/long.rst:461 msgid "" "Currently, ``-1`` corresponds to ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " "Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." msgstr "" +"Actualmente, ``-1`` corresponde a ``Py_ASNATIVEBYTES_NATIVE_ENDIAN | " +"Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." #: ../Doc/c-api/long.rst:467 msgid "Flag" -msgstr "" +msgstr "Indicador" #: ../Doc/c-api/long.rst:467 msgid "Value" -msgstr "" +msgstr "Valor" #: ../Doc/c-api/long.rst:469 msgid "``-1``" -msgstr "" +msgstr "``-1``" #: ../Doc/c-api/long.rst:470 msgid "``0``" -msgstr "" +msgstr "``0``" #: ../Doc/c-api/long.rst:471 msgid "``1``" -msgstr "" +msgstr "``1``" #: ../Doc/c-api/long.rst:472 msgid "``3``" -msgstr "" +msgstr "``3``" #: ../Doc/c-api/long.rst:473 msgid "``4``" -msgstr "" +msgstr "``4``" #: ../Doc/c-api/long.rst:474 msgid "``8``" -msgstr "" +msgstr "``8``" #: ../Doc/c-api/long.rst:475 msgid "``16``" -msgstr "" +msgstr "``16``" #: ../Doc/c-api/long.rst:478 msgid "" "Specifying ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` will override any other endian " "flags. Passing ``2`` is reserved." msgstr "" +"Especificar ``Py_ASNATIVEBYTES_NATIVE_ENDIAN`` redefinirá cualquier otro " +"indicador endian. Pasar ``2`` está reservado." #: ../Doc/c-api/long.rst:481 msgid "" @@ -700,6 +778,9 @@ msgid "" "example, when converting 128 with *n_bytes=1*, the function will return 2 " "(or more) in order to store a zero sign bit." msgstr "" +"Por defecto, se solicitará búfer suficiente para incluir un bit de signo. " +"Por ejemplo, al convertir 128 con *n_bytes=1*, la función retornará 2 (o " +"más) para almacenar un bit de signo cero." #: ../Doc/c-api/long.rst:485 msgid "" @@ -710,6 +791,12 @@ msgid "" "handling of negative values: for those, space for a sign bit is always " "requested." msgstr "" +"Si se especifica ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER``, se omitirá el bit de " +"signo cero en los cálculos de tamaño. Esto permite, por ejemplo, que quepa " +"128 en un búfer de un solo byte. Si el búfer de destino se trata " +"posteriormente como con signo, un valor de entrada positivo puede volverse " +"negativo. Tenga en cuenta que este indicador no afecta el manejo de valores " +"negativos: para ellos, siempre se solicita espacio para un bit de signo." #: ../Doc/c-api/long.rst:492 msgid "" @@ -718,6 +805,10 @@ msgid "" "copied provided there is enough space for at least one sign bit, regardless " "of whether ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER`` was specified." msgstr "" +"Especificar ``Py_ASNATIVEBYTES_REJECT_NEGATIVE``, se establece una excepción " +"si *pylong* es negativo. Sin este indicador, se copiarán los valores " +"negativos siempre que haya suficiente espacio para al menos un bit de signo, " +"independientemente de si se especificó ``Py_ASNATIVEBYTES_UNSIGNED_BUFFER``." #: ../Doc/c-api/long.rst:497 msgid "" @@ -728,6 +819,12 @@ msgid "" "``-1``, this option is not set, and non-integer values will raise :exc:" "`TypeError`." msgstr "" +"Si se especifica ``Py_ASNATIVEBYTES_ALLOW_INDEX`` y se pasa un valor " +"distinto de un entero, se llamará primero a su método :meth:`~object." +"__index__`. Esto puede resultar la ejecución de código Python y la ejecución " +"de otros subprocesos, lo que podría causar cambios en otros objetos o " +"valores en uso. Cuando *flags* es ``-1``, esta opción no se establece y los " +"valores distintos de un entero lanzarán :exc:`TypeError`." #: ../Doc/c-api/long.rst:506 msgid "" @@ -736,6 +833,11 @@ msgid "" "without overflow. For example, both ``255`` and ``-1`` fit a single-byte " "buffer and set all its bits. This matches typical C cast behavior." msgstr "" +"Con los *flags* predeterminados (``-1`` o *UNSIGNED_BUFFER* sin " +"*REJECT_NEGATIVE*), varios enteros de Python pueden asignarse a un único " +"valor sin desbordamiento. Por ejemplo, tanto ``255`` como ``-1`` se ajustan " +"a un búfer de un solo byte y configuran todos sus bits. Esto coincide con el " +"comportamiento típico de conversión de C." #: ../Doc/c-api/long.rst:517 msgid "" @@ -743,14 +845,17 @@ msgid "" "about Python's internal representation of integers. See :data:`sys.int_info` " "for description of individual fields." msgstr "" +"En caso de éxito, retorna una :term:`named tuple` de solo lectura, que " +"contiene información sobre la representación interna de enteros en Python. " +"Consulte :data:`sys.int_info` para obtener una descripción de cada campo." #: ../Doc/c-api/long.rst:521 msgid "On failure, return ``NULL`` with an exception set." -msgstr "" +msgstr "En caso de error, retorna ``NULL`` con una excepción configurada." #: ../Doc/c-api/long.rst:528 msgid "Return 1 if *op* is compact, 0 otherwise." -msgstr "" +msgstr "Retorna 1 si *op* es compacto, 0 en caso contrario." #: ../Doc/c-api/long.rst:530 msgid "" @@ -759,58 +864,67 @@ msgid "" "`PyUnstable_Long_CompactValue`; for others fall back to a :c:func:" "`PyLong_As* ` function or :c:func:`PyLong_AsNativeBytes`." msgstr "" +"Esta función permite que el código de rendimiento crítico implemente una " +"“ruta rápida” para enteros pequeños. Para valores compactos, utilice :c:func:" +"`PyUnstable_Long_CompactValue`; para otros, utilice una función :c:func:" +"`PyLong_As* ` o :c:func:`PyLong_AsNativeBytes`." #: ../Doc/c-api/long.rst:536 msgid "The speedup is expected to be negligible for most users." msgstr "" +"Se espera que la aceleración sea insignificante para la mayoría de los " +"usuarios." #: ../Doc/c-api/long.rst:538 msgid "" "Exactly what values are considered compact is an implementation detail and " "is subject to change." msgstr "" +"Exactamente qué valores se consideran compactos es un detalle de " +"implementación y está sujeto a cambios." #: ../Doc/c-api/long.rst:543 msgid "" "If *op* is compact, as determined by :c:func:`PyUnstable_Long_IsCompact`, " "return its value." msgstr "" +"Si *op* es compacto, se determina por :c:func:`PyUnstable_Long_IsCompact`, " +"retorna su valor." #: ../Doc/c-api/long.rst:546 msgid "Otherwise, the return value is undefined." -msgstr "" +msgstr "De lo contrario, el valor que retorna está indefinido." #: ../Doc/c-api/long.rst:8 msgid "object" -msgstr "" +msgstr "object" #: ../Doc/c-api/long.rst:8 msgid "long integer" -msgstr "" +msgstr "long integer" #: ../Doc/c-api/long.rst:8 -#, fuzzy msgid "integer" -msgstr "Objetos enteros" +msgstr "integer" #: ../Doc/c-api/long.rst:144 msgid "LONG_MAX (C macro)" -msgstr "" +msgstr "LONG_MAX (C macro)" #: ../Doc/c-api/long.rst:144 ../Doc/c-api/long.rst:204 #: ../Doc/c-api/long.rst:247 ../Doc/c-api/long.rst:262 #: ../Doc/c-api/long.rst:278 ../Doc/c-api/long.rst:294 msgid "OverflowError (built-in exception)" -msgstr "" +msgstr "OverflowError (built-in exception)" #: ../Doc/c-api/long.rst:247 msgid "PY_SSIZE_T_MAX (C macro)" -msgstr "" +msgstr "PY_SSIZE_T_MAX (C macro)" #: ../Doc/c-api/long.rst:262 msgid "ULONG_MAX (C macro)" -msgstr "" +msgstr "ULONG_MAX (C macro)" #: ../Doc/c-api/long.rst:278 msgid "SIZE_MAX (C macro)" -msgstr "" +msgstr "SIZE_MAX (C macro)" From b9de17deef9d8886c388266ba1b5db8304c63edd Mon Sep 17 00:00:00 2001 From: Joseph Salgado <49181840+xooseph@users.noreply.github.com> Date: Thu, 16 Oct 2025 23:45:13 -0600 Subject: [PATCH 32/40] Translate `c-api/set.po` (#3421) Closes #3245 --- c-api/set.po | 60 ++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/c-api/set.po b/c-api/set.po index 83ca70dcbc..6cf381cd4f 100644 --- a/c-api/set.po +++ b/c-api/set.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: 2022-11-10 21:17+0100\n" +"PO-Revision-Date: 2025-10-15 00:17-0600\n" "Last-Translator: Rodrigo Tobar \n" -"Language: es\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.8\n" #: ../Doc/c-api/set.rst:6 msgid "Set Objects" @@ -167,9 +168,9 @@ msgid "" "`TypeError` if *iterable* is not actually iterable." msgstr "" "Retorna un nuevo :class:`frozenset` que contiene objetos retornados por " -"*iterable*. El *iterable* puede ser ``NULL`` para crear un nuevo conjunto " -"congelado vacío. Retorna el nuevo conjunto en caso de éxito o ``NULL`` en " -"caso de error. Lanza :exc:`TypeError` si *iterable* no es realmente iterable." +"*iterable*. El *iterable* puede ser ``NULL`` para crear un nuevo frozenset " +"vacío. Retorna el nuevo conjunto en caso de éxito o ``NULL`` en caso de " +"error. Lanza :exc:`TypeError` si *iterable* no es realmente iterable." #: ../Doc/c-api/set.rst:104 msgid "" @@ -180,22 +181,20 @@ msgstr "" "class:`set` o :class:`frozenset` o instancias de sus subtipos." #: ../Doc/c-api/set.rst:112 -#, fuzzy msgid "" "Return the length of a :class:`set` or :class:`frozenset` object. Equivalent " "to ``len(anyset)``. Raises a :exc:`SystemError` if *anyset* is not a :class:" "`set`, :class:`frozenset`, or an instance of a subtype." msgstr "" "Retorna la longitud de un objeto :class:`set` o :class:`frozenset`. " -"Equivalente a ``len(anyset)``. Lanza un :exc:`PyExc_SystemError` si *anyset* " -"no es :class:`set`, :class:`frozenset`, o una instancia de un subtipo." +"Equivalente a ``len(anyset)``. Lanza un :exc:`SystemError` si *anyset* no " +"es :class:`set`, :class:`frozenset`, o una instancia de un subtipo." #: ../Doc/c-api/set.rst:119 msgid "Macro form of :c:func:`PySet_Size` without error checking." msgstr "Forma macro de :c:func:`PySet_Size` sin comprobación de errores." #: ../Doc/c-api/set.rst:124 -#, fuzzy msgid "" "Return ``1`` if found, ``0`` if not found, and ``-1`` if an error is " "encountered. Unlike the Python :meth:`~object.__contains__` method, this " @@ -205,11 +204,11 @@ msgid "" "instance of a subtype." msgstr "" "Retorna ``1`` si se encuentra, ``0`` si no se encuentra y ``-1`` si se " -"encuentra un error. A diferencia del método Python :meth:`__contains__`, " -"esta función no convierte automáticamente conjuntos no compartibles en " -"congelados temporales. Lanza un :exc:`TypeError` si la *key* no se puede " -"compartir. Lanza :exc:`PyExc_SystemError` si *anyset* no es un :class:" -"`set`, :class:`frozenset`, o una instancia de un subtipo." +"encuentra un error. A diferencia del método Python :meth:`~object." +"__contains__`, esta función no convierte automáticamente conjuntos que no " +"son hashable en frozensets temporales. Lanza un :exc:`TypeError` si la *key* " +"no es hashable. Lanza :exc:`SystemError` si *anyset* no es un :class:`set`, :" +"class:`frozenset`, o una instancia de un subtipo." #: ../Doc/c-api/set.rst:133 msgid "" @@ -225,9 +224,9 @@ msgstr "" "de :class:`frozenset` (al igual que :c:func:`PyTuple_SetItem` puede usarse " "para rellenar los valores de nuevos frozensets antes de que sean expuestos a " "otro código). Retorna ``0`` en caso de éxito o ``-1`` en caso de fallo. " -"Lanza un error :exc:`TypeError` si la *key* no se puede intercambiar. Lanza " -"un :exc:`MemoryError` si no hay espacio para crecer. Lanza un :exc:" -"`SystemError` si *set* no es una instancia de :class:`set` o su subtipo." +"Lanza un error :exc:`TypeError` si la *key* no es hashable. Lanza un :exc:" +"`MemoryError` si no hay espacio para crecer. Lanza un :exc:`SystemError` si " +"*set* no es una instancia de :class:`set` o su subtipo." #: ../Doc/c-api/set.rst:142 msgid "" @@ -238,7 +237,6 @@ msgstr "" "sus subtipos, pero no para instancias de :class:`frozenset` o sus subtipos." #: ../Doc/c-api/set.rst:148 -#, fuzzy msgid "" "Return ``1`` if found and removed, ``0`` if not found (no action taken), and " "``-1`` if an error is encountered. Does not raise :exc:`KeyError` for " @@ -249,11 +247,11 @@ msgid "" msgstr "" "Retorna ``1`` si se encuentra y se elimina, ``0`` si no se encuentra (no se " "realiza ninguna acción) y ``-1`` si se encuentra un error. No lanza :exc:" -"`KeyError` por faltar claves. Lanza un :exc:`TypeError` si la *key* no se " -"puede compartir. A diferencia del método Python :meth:`~set.discard`, esta " -"función no convierte automáticamente conjuntos no compartibles en congelados " -"temporales. Lanza :exc:`PyExc_SystemError` si *set* no es una instancia de :" -"class:`set` o su subtipo." +"`KeyError` por faltar claves. Lanza un :exc:`TypeError` si la *key* no es " +"hashable. A diferencia del método Python :meth:`~frozenset.discard`, esta " +"función no convierte automáticamente conjuntos que no son hashable en " +"frozensets temporales. Lanza :exc:`SystemError` si *set* no es una instancia " +"de :class:`set` o su subtipo." #: ../Doc/c-api/set.rst:158 msgid "" @@ -273,24 +271,26 @@ msgid "" "``-1`` and raise :exc:`SystemError` if *set* is not an instance of :class:" "`set` or its subtype." msgstr "" +"Vacía todos los elementos de un conjunto existente. Retorna ``0`` en caso de " +"éxito. Retorna ``-1`` y lanza :exc:`SystemError` si *set* no es una " +"instancia de :class:`set` o su subtipo." #: ../Doc/c-api/set.rst:11 -#, fuzzy msgid "object" -msgstr "Objetos conjunto" +msgstr "object" #: ../Doc/c-api/set.rst:11 msgid "set" -msgstr "" +msgstr "set" #: ../Doc/c-api/set.rst:11 msgid "frozenset" -msgstr "" +msgstr "frozenset" #: ../Doc/c-api/set.rst:110 msgid "built-in function" -msgstr "" +msgstr "built-in function" #: ../Doc/c-api/set.rst:110 msgid "len" -msgstr "" +msgstr "len" From d7e5cbf82c197d978e50f4669deff4975067de82 Mon Sep 17 00:00:00 2001 From: rtobar Date: Sat, 18 Oct 2025 21:04:14 +0800 Subject: [PATCH 33/40] =?UTF-8?q?Ejecuta=20configuraci=C3=B3n=20de=20Sphin?= =?UTF-8?q?x=20de=20CPython=20de=20forma=20correcta=20(#3425)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Si bien la forma en que se ejecutaba e importaban la configuración de Sphinx de CPython funciona, no es la mejor manera de hacerlo. Esto dado que Sphinx inyecta algunos nombres globales al cual pueden acceder los archivos conf.py, y que nuestro método no toma en cuenta. Este commit cambia la forma en que se importa y ejecuta el archivo conf.py de la documentación de CPython. En vez de añadirlo al path e importarlo via "import" ahora se compilan los contenidos del archivo, y se ejecutan directamente con eval(). A este último se le entrega como contexto el diccionario globals(), con lo que se logra el objetivo de que éste sea modificado por el código siendo ejecutado. Asimismo el uso de globals() también logra hacer llegar cualquier valor que Sphinx haya inyectado en nuestro conf.py al conf.py de CPython. --------- Signed-off-by: Rodrigo Tobar Co-authored-by: Cristián Maureira-Fredes --- conf.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/conf.py b/conf.py index 9a9557ae0c..a267d02a07 100644 --- a/conf.py +++ b/conf.py @@ -21,13 +21,11 @@ sys.path.append(os.path.abspath('cpython/Doc/tools/extensions')) sys.path.append(os.path.abspath('cpython/Doc/includes')) -# Import all the Sphinx settings from cpython -# This import will trigger warnings on the 'Include/patchlevel.h' -# not being found, because it execute the content of the whole file, -# and there there is a local call to 'get_header_version' like the one -# we have in a few lines. -sys.path.insert(0, os.path.abspath('cpython/Doc')) -from conf import * +# Import all the Sphinx settings from cpython. +# Warning: calling 'eval' and 'compile' is usually not recommended, but in this case +# we are relying on the official sphinx configuration from cpython. +cpython_sphinx_conf = Path(os.path.abspath('cpython/Doc/conf.py')) +eval(compile(cpython_sphinx_conf.read_bytes(), str(cpython_sphinx_conf), "exec"), globals()) project = 'Python en Español' From 696776b65ae5b58c5e21a5e64cd6e8d898731e16 Mon Sep 17 00:00:00 2001 From: Carlos Mena <50986837+carlosm00@users.noreply.github.com> Date: Sat, 25 Oct 2025 02:42:01 +0200 Subject: [PATCH 34/40] =?UTF-8?q?Traducci=C3=B3n=20de=20library/exceptions?= =?UTF-8?q?.po=20(#3420)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #2966 --- library/exceptions.po | 341 ++++++++++++++++++++++++++++-------------- 1 file changed, 227 insertions(+), 114 deletions(-) diff --git a/library/exceptions.po b/library/exceptions.po index 79d24555ad..5b28a1dfb9 100644 --- a/library/exceptions.po +++ b/library/exceptions.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: 2024-11-05 23:29+0100\n" +"PO-Revision-Date: 2025-10-24 19:09+0200\n" "Last-Translator: Carlos Mena Pérez <@carlosm00>\n" -"Language: es\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.7\n" #: ../Doc/library/exceptions.rst:4 msgid "Built-in Exceptions" @@ -38,12 +39,11 @@ msgstr "" "derive de :class:`BaseException`. En una instrucción :keyword:`try` con una " "cláusula :keyword:`except` que menciona una clase determinada, esa cláusula " "también controla las clases de excepción derivadas de esa clase (excepto las " -"clases de excepción de las que se deriva *it*). Dos clases de excepción que " +"clases de excepción de las que esta se deriva). Dos clases de excepción que " "no están relacionadas mediante subclases nunca son equivalentes, incluso si " "tienen el mismo nombre." #: ../Doc/library/exceptions.rst:19 -#, fuzzy msgid "" "The built-in exceptions listed in this chapter can be generated by the " "interpreter or built-in functions. Except where mentioned, they have an " @@ -52,13 +52,13 @@ msgid "" "and a string explaining the code). The associated value is usually passed " "as arguments to the exception class's constructor." msgstr "" -"Las excepciones predefinidas enumeradas a continuación pueden ser generadas " -"por el intérprete o funciones predefinidas. Excepto donde se mencione lo " -"contrario, tienen un *associated value* que indica la causa detallada del " -"error. Esto podría una cadena de caracteres o una tupla elementos con " -"grandes elementos de información (por ejemplo, un código de error y una " -"cadena que explica el código). El valor asociado generalmente se pasa como " -"argumentos al constructor de la clase de excepción." +"Las excepciones incorporadas enumeradas en este apartado pueden ser lanzadas " +"por el intérprete o funciones integradas. Excepto donde se mencione lo " +"contrario, tienen un \"valor asociado\" que indica la causa detallada " +"del error. Esto podría una cadena de caracteres o una tupla de varios " +"elementos de información (por ejemplo, un código de error y una cadena que " +"explica el código). El valor asociado generalmente se pasa como argumentos " +"al constructor de la clase de excepción." #: ../Doc/library/exceptions.rst:26 msgid "" @@ -98,9 +98,10 @@ msgid "" "Three attributes on exception objects provide information about the context " "in which the exception was raised:" msgstr "" +"Tres atributos en los objetos de excepción ofrecen información sobre el " +"contexto en el cual la excepción fue lanzada:" #: ../Doc/library/exceptions.rst:53 -#, fuzzy msgid "" "When raising a new exception while another exception is already being " "handled, the new exception's :attr:`!__context__` attribute is automatically " @@ -109,7 +110,7 @@ msgid "" "used." msgstr "" "Al lanzar una nueva excepción mientras otra excepción está siendo manejada, " -"el atributo :attr:`__context__` de la nueva excepción es automáticamente " +"el atributo :attr:`!__context__` de la nueva excepción es automáticamente " "asignado a la excepción manejada. Una excepción puede ser manejada cuando " "se utiliza la cláusula :keyword:`except` o :keyword:`finally`, o con la " "sentencia :keyword:`with`." @@ -124,10 +125,9 @@ msgstr "" #: ../Doc/library/exceptions.rst:63 msgid "raise new_exc from original_exc" -msgstr "" +msgstr "raise new_exc from original_exc" #: ../Doc/library/exceptions.rst:65 -#, fuzzy msgid "" "The expression following :keyword:`from` must be an exception or " "``None``. It will be set as :attr:`!__cause__` on the raised exception. " @@ -139,16 +139,15 @@ msgid "" "introspection when debugging." msgstr "" "La expresión que sigue a :keyword:`from` debe ser una excepción o " -"``None``. Se establecerá como :attr:`__cause__` en la excepción generada. La " -"configuración de :attr:`__cause__` también establece implícitamente el " -"atributo :attr:`__suppress_context__` en ``True``, de modo que el uso de " +"``None``. Se establecerá como :attr:`!__cause__` en la excepción lanzada. La " +"configuración de :attr:`!__cause__` también establece implícitamente el " +"atributo :attr:`!__suppress_context__` a ``True``, de modo que el uso de " "``raise new_exc from None`` reemplaza efectivamente la excepción anterior " "con la nueva para fines de visualización (por ejemplo, conversión de :exc:" "`KeyError` a :exc:`AttributeError`), dejando la excepción anterior " -"disponible en :attr:`__context__` para introspección durante la depuración." +"disponible en :attr:`!__context__` para introspección durante la depuración." #: ../Doc/library/exceptions.rst:74 -#, fuzzy msgid "" "The default traceback display code shows these chained exceptions in " "addition to the traceback for the exception itself. An explicitly chained " @@ -156,12 +155,12 @@ msgid "" "chained exception in :attr:`!__context__` is shown only if :attr:`!" "__cause__` is :const:`None` and :attr:`!__suppress_context__` is false." msgstr "" -"La visualización por defecto de la traza de error muestra estas excepciones " -"encadenadas además de la traza de la propia excepción. Siempre se muestra " -"una excepción encadenada explícitamente en :attr:`__cause__` cuando está " -"presente. Una excepción implícitamente encadenada en :attr:`__context__` " -"solo se muestra si :attr:`__cause__` es :const:`None` y :attr:" -"`__suppress_context__` es falso." +"La visualización por defecto de la traza de seguimiento muestra estas " +"excepciones encadenadas además de la traza de la propia excepción. Siempre " +"se muestra una excepción encadenada explícitamente en :attr:`!__cause__` " +"cuando está presente. Una excepción implícitamente encadenada en :attr:`!" +"__context__` solo se muestra si :attr:`!__cause__` es :const:`None` y :attr:" +"`!__suppress_context__` es falso." #: ../Doc/library/exceptions.rst:80 msgid "" @@ -262,10 +261,10 @@ msgstr "" "características de encadenamiento de excepciones de :pep:`3134` estuvieran " "disponibles. El siguiente ejemplo muestra cómo podemos convertir una " "instancia de ``SomeException`` en una instancia de ``OtherException`` " -"mientras se conserva el rastreo. Una vez generado, el marco actual se " -"inserta en el rastreo del ``OtherException``, como habría sucedido con el " -"rastreo del ``SomeException`` original si hubiéramos permitido que se " -"propagara al llamador. ::" +"mientras se conserva el rastreo. Una vez lanzada, el marco actual se inserta " +"en el rastreo del ``OtherException``, como habría sucedido con el rastreo " +"del ``SomeException`` original si hubiéramos permitido que se propagara al " +"llamador. ::" #: ../Doc/library/exceptions.rst:135 msgid "" @@ -275,12 +274,20 @@ msgid "" " tb = sys.exception().__traceback__\n" " raise OtherException(...).with_traceback(tb)" msgstr "" +"try:\n" +" ...\n" +"except SomeException:\n" +" tb = sys.exception().__traceback__\n" +" raise OtherException(...).with_traceback(tb)" #: ../Doc/library/exceptions.rst:143 msgid "" "A writable field that holds the :ref:`traceback object ` " "associated with this exception. See also: :ref:`raise`." msgstr "" +"Un campo escribible que mantenga los :ref:`objetos de seguimiento de pila " +"(traceback) ` asociados con esta excepción. Consulte :ref:" +"`raise` para más información." #: ../Doc/library/exceptions.rst:149 msgid "" @@ -316,7 +323,7 @@ msgid "" "arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." msgstr "" -"La clase base para las excepciones predefinidas que se generan para varios " +"La clase base para las excepciones predefinidas que se lanzan para varios " "errores aritméticos: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." @@ -325,7 +332,7 @@ msgid "" "Raised when a :ref:`buffer ` related operation cannot be " "performed." msgstr "" -"Se genera cuando :ref:`buffer ` no se puede realizar una " +"Se lanza cuando :ref:`buffer ` no se puede realizar una " "operación relacionada." #: ../Doc/library/exceptions.rst:184 @@ -334,7 +341,7 @@ msgid "" "on a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. " "This can be raised directly by :func:`codecs.lookup`." msgstr "" -"La clase base para las excepciones que se generan cuando una clave o índice " +"La clase base para las excepciones que se lanzan cuando una clave o índice " "utilizado en un mapa o secuencia que no es válido: :exc:`IndexError`, :exc:" "`KeyError`. Esto se puede lanzar directamente por :func:`codecs.lookup`." @@ -345,12 +352,12 @@ msgstr "Excepciones específicas" #: ../Doc/library/exceptions.rst:192 msgid "The following exceptions are the exceptions that are usually raised." msgstr "" -"Las siguientes excepciones son las excepciones que normalmente se generan." +"Las siguientes excepciones son las excepciones que normalmente se lanzan." #: ../Doc/library/exceptions.rst:198 msgid "Raised when an :keyword:`assert` statement fails." msgstr "" -"Se genera cuando se produce un error en una instrucción :keyword:`assert`." +"Se lanza cuando se produce un error en una instrucción :keyword:`assert`." #: ../Doc/library/exceptions.rst:203 msgid "" @@ -358,9 +365,9 @@ msgid "" "assignment fails. (When an object does not support attribute references or " "attribute assignments at all, :exc:`TypeError` is raised.)" msgstr "" -"Se genera cuando se produce un error en una referencia de atributo (ver :ref:" +"Se lanza cuando se produce un error en una referencia de atributo (ver :ref:" "`attribute-references`) o la asignación falla. (Cuando un objeto no admite " -"referencias de atributos o asignaciones de atributos en absoluto, se genera :" +"referencias de atributos o asignaciones de atributos en absoluto, se lanza :" "exc:`TypeError`.)" #: ../Doc/library/exceptions.rst:207 @@ -385,7 +392,7 @@ msgid "" "without reading any data. (N.B.: the :meth:`io.IOBase.read` and :meth:`io." "IOBase.readline` methods return an empty string when they hit EOF.)" msgstr "" -"Se genera cuando la función :func:`input` alcanza una condición de fin de " +"Se lanza cuando la función :func:`input` alcanza una condición de fin de " "archivo (EOF) sin leer ningún dato. (Note que el :meth:`io. IOBase.read` y :" "meth:`io.IOBase.readline` retornan una cadena vacía cuando llegan a EOF.)" @@ -400,7 +407,7 @@ msgid "" "exc:`BaseException` instead of :exc:`Exception` since it is technically not " "an error." msgstr "" -"Se genera cuando un :term:`generator` o :term:`coroutine` está cerrado; ver :" +"Se lanza cuando un :term:`generator` o :term:`coroutine` está cerrado; ver :" "meth:`generator.close` y :meth:`coroutine.close`. Hereda directamente de :" "exc:`BaseException` en lugar de :exc:`Exception` ya que técnicamente no es " "un error." @@ -411,9 +418,9 @@ msgid "" "module. Also raised when the \"from list\" in ``from ... import`` has a " "name that cannot be found." msgstr "" -"Se genera cuando la instrucción :keyword:`import` tiene problemas al " -"intentar cargar un módulo. También se produce cuando la *from list* en " -"``from ... import`` tiene un nombre que no se puede encontrar." +"Se lanza cuando la instrucción :keyword:`import` tiene problemas al intentar " +"cargar un módulo. También se produce cuando la *from list* en ``from ... " +"import`` tiene un nombre que no se puede encontrar." #: ../Doc/library/exceptions.rst:241 msgid "" @@ -441,8 +448,8 @@ msgid "" "module could not be located. It is also raised when ``None`` is found in :" "data:`sys.modules`." msgstr "" -"Una subclase de :exc:`ImportError` que se genera mediante :keyword:`import` " -"cuando no se pudo encontrar un módulo. También se genera cuando ``None`` se " +"Una subclase de :exc:`ImportError` que se lanza mediante :keyword:`import` " +"cuando no se pudo encontrar un módulo. También se lanza cuando ``None`` se " "encuentra en :data:`sys.modules`." #: ../Doc/library/exceptions.rst:266 @@ -451,17 +458,16 @@ msgid "" "silently truncated to fall in the allowed range; if an index is not an " "integer, :exc:`TypeError` is raised.)" msgstr "" -"Se genera cuando un subíndice de secuencia está fuera del rango. (Los " -"índices de la rebanada son truncados silenciosamente para caer en el " -"intervalo permitido; si un índice no es un entero, se genera :exc:" -"`TypeError`.)" +"Se lanza cuando un subíndice de secuencia está fuera del rango. (Los índices " +"de la rebanada son truncados silenciosamente para caer en el intervalo " +"permitido; si un índice no es un entero, se lanza :exc:`TypeError`.)" #: ../Doc/library/exceptions.rst:275 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." msgstr "" -"Se genera cuando no se encuentra una clave de asignación (diccionario) en el " +"Se lanza cuando no se encuentra una clave de asignación (diccionario) en el " "conjunto de claves existentes (mapa)." #: ../Doc/library/exceptions.rst:282 @@ -472,7 +478,7 @@ msgid "" "accidentally caught by code that catches :exc:`Exception` and thus prevent " "the interpreter from exiting." msgstr "" -"Se genera cuando el usuario pulsa la tecla de interrupción (normalmente :kbd:" +"Se lanza cuando el usuario pulsa la tecla de interrupción (normalmente :kbd:" "`Control-C` o :kbd:`Delete`). Durante la ejecución, se realiza una " "comprobación de interrupciones con regularidad. La excepción hereda de :exc:" "`BaseException` para no ser detectada de forma accidental por :exc:" @@ -503,7 +509,7 @@ msgid "" "recover from this situation; it nevertheless raises an exception so that a " "stack traceback can be printed, in case a run-away program was the cause." msgstr "" -"Se genera cuando una operación se queda sin memoria pero la situación aún " +"Se lanza cuando una operación se queda sin memoria pero la situación aún " "puede ser recuperada (eliminando algunos objetos). El valor asociado es una " "cadena que indica que tipo de operación (interna) se quedó sin memoria. " "Tenga en cuenta que debido a la arquitectura de administración de memoria " @@ -518,7 +524,7 @@ msgid "" "unqualified names. The associated value is an error message that includes " "the name that could not be found." msgstr "" -"Se genera cuando no se encuentra un nombre local o global. Esto se aplica " +"Se lanza cuando no se encuentra un nombre local o global. Esto se aplica " "solo a nombres no calificados. El valor asociado es un mensaje de error que " "incluye el nombre que no se pudo encontrar." @@ -560,21 +566,20 @@ msgstr "" "subclase, se establece en :data:`None`." #: ../Doc/library/exceptions.rst:338 -#, fuzzy msgid "" "``NotImplementedError`` and :data:`NotImplemented` are not interchangeable, " "even though they have similar names and purposes. See :data:`!" "NotImplemented` for details on when to use it." msgstr "" -"``NotImplementedError`` y ``NotImplemented`` no son intercambiables, a pesar " -"de que tienen nombres y propósitos similares. Consulte :data:" -"`NotImplemented` para obtener detalles sobre cuándo usarlo." +"``NotImplementedError`` y :data:`NotImplemented` no son intercambiables, a " +"pesar de que tienen nombres y propósitos similares. Consulte :data:`!" +"NotImplemented` para obtener detalles sobre cuándo usarlo." #: ../Doc/library/exceptions.rst:347 msgid "" "This exception is raised when a system function returns a system-related " -"error, including I/O failures such as \"file not found\" or \"disk full\" " -"(not for illegal argument types or other incidental errors)." +"error, including I/O failures such as \"file not found\" or \"disk " +"full\" (not for illegal argument types or other incidental errors)." msgstr "" "Esta excepción se produce cuando una función del sistema retorna un error " "relacionado con el sistema, que incluye fallas de E/S como ``file not " @@ -682,7 +687,6 @@ msgstr "" "atributo del constructor *filename2*." #: ../Doc/library/exceptions.rst:411 -#, fuzzy msgid "" "Raised when the result of an arithmetic operation is too large to be " "represented. This cannot occur for integers (which would rather raise :exc:" @@ -691,13 +695,13 @@ msgid "" "Because of the lack of standardization of floating-point exception handling " "in C, most floating-point operations are not checked." msgstr "" -"Se genera cuando el resultado de una operación aritmética es demasiado " -"grande para ser representado. Esto no puede ocurrir para los enteros (para " -"lo cual es mejor lanzar :exc:`MemoryError` que darse por vencido). Sin " -"embargo, por razones históricas, ``OverflowError`` a veces se genera para " -"enteros que están fuera del rango requerido. Debido a la falta de " -"estandarización del manejo de excepciones de coma flotante en C, la mayoría " -"de las operaciones de coma flotante no se verifican." +"Se lanza cuando el resultado de una operación aritmética es demasiado grande " +"para ser representado. Esto no puede ocurrir para los enteros (para lo cual " +"lanza un :exc:`MemoryError` en vez de darse por vencido). Sin embargo, por " +"razones históricas, ``OverflowError`` a veces se lanza para enteros que " +"están fuera del rango requerido. Debido a la falta de estandarización del " +"manejo de excepciones de coma flotante en C, la mayoría de las operaciones " +"de coma flotante no se verifican." #: ../Doc/library/exceptions.rst:421 msgid "" @@ -705,24 +709,29 @@ msgid "" "operation is blocked during interpreter shutdown also known as :term:`Python " "finalization `." msgstr "" +"Esta excepción es derivada de :exc:`RuntimeError`. Se lanza cuando una " +"operación es bloqueada durante el apagado del intérprete, también conocido " +"como :term:`finalización de Python `." #: ../Doc/library/exceptions.rst:425 msgid "" "Examples of operations which can be blocked with a :exc:" "`PythonFinalizationError` during the Python finalization:" msgstr "" +"Ejemplos de operaciones que pueden ser bloqueadas con un :exc:" +"`PythonFinalizationError` durante la finalización de Python:" #: ../Doc/library/exceptions.rst:428 msgid "Creating a new Python thread." -msgstr "" +msgstr "Creación de nuevos hilos de Python." #: ../Doc/library/exceptions.rst:429 msgid ":func:`os.fork`." -msgstr "" +msgstr ":func:`os.fork`." #: ../Doc/library/exceptions.rst:431 msgid "See also the :func:`sys.is_finalizing` function." -msgstr "" +msgstr "Revise también la función :func:`sys.is_finalizing`." #: ../Doc/library/exceptions.rst:433 ../Doc/library/exceptions.rst:443 msgid "Previously, a plain :exc:`RuntimeError` was raised." @@ -756,7 +765,7 @@ msgid "" "categories. The associated value is a string indicating what precisely went " "wrong." msgstr "" -"Se genera cuando se detecta un error que no corresponde a ninguna de las " +"Se lanza cuando se detecta un error que no corresponde a ninguna de las " "otras categorías. El valor asociado es una cadena que indica exactamente qué " "salió mal." @@ -766,18 +775,17 @@ msgid "" "`~iterator.__next__` method to signal that there are no further items " "produced by the iterator." msgstr "" -"Generado por la función incorporada :func:`next` y un :term:`iterator`\\'s :" +"Lanzado por la función incorporada :func:`next` y un :term:`iterator`\\'s :" "meth:`~iterator.__next__` para indicar que no hay más elementos producidos " "por el iterador." #: ../Doc/library/exceptions.rst:470 -#, fuzzy msgid "" "The exception object has a single attribute :attr:`!value`, which is given " "as an argument when constructing the exception, and defaults to :const:" "`None`." msgstr "" -"El objeto de excepción tiene un solo atributo :attr:`value`, que se " +"El objeto de excepción tiene un solo atributo :attr:`!value`, que se " "proporciona como argumento al construir la excepción, y por defecto es :" "const:`None`." @@ -788,7 +796,7 @@ msgid "" "is used as the :attr:`value` parameter to the constructor of the exception." msgstr "" "Cuando se retorna una función :term:`generator` o :term:`coroutine`, se " -"genera una nueva instancia :exc:`StopIteration`, y el valor retornado por la " +"lanza una nueva instancia :exc:`StopIteration`, y el valor retornado por la " "función se utiliza como parámetro :attr:`value` para constructor de la " "excepción." @@ -824,7 +832,7 @@ msgid "" "raised in a generator is transformed into a :exc:`RuntimeError`." msgstr "" "Habilitar :pep:`479` para todo el código por defecto: a :exc:`StopIteration` " -"generado en un generador se transforma en :exc:`RuntimeError`." +"lanzado en un generador se transforma en :exc:`RuntimeError`." #: ../Doc/library/exceptions.rst:497 msgid "" @@ -841,7 +849,7 @@ msgid "" "`compile`, :func:`exec`, or :func:`eval`, or when reading the initial script " "or standard input (also interactively)." msgstr "" -"Se genera cuando el analizador encuentra un error de sintaxis. Esto puede " +"Se lanza cuando el analizador encuentra un error de sintaxis. Esto puede " "ocurrir en una instrucción :keyword:`import`, en una llamada a las funciones " "integradas :func:`compile`, :func:`exec` o :func:`eval`, o al leer el script " "inicial o la entrada estándar (también de forma interactiva)." @@ -925,7 +933,7 @@ msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." msgstr "" -"Se genera cuando la sangría contiene un uso inconsistente de pestañas y " +"Se lanza cuando la sangría contiene un uso inconsistente de pestañas y " "espacios. Esta es una subclase de :exc:`IndentationError`." #: ../Doc/library/exceptions.rst:563 @@ -934,7 +942,7 @@ msgid "" "not look so serious to cause it to abandon all hope. The associated value is " "a string indicating what went wrong (in low-level terms)." msgstr "" -"Se genera cuando el intérprete encuentra un error interno, pero la situación " +"Se lanza cuando el intérprete encuentra un error interno, pero la situación " "no parece tan grave como para abandonar toda esperanza. El valor asociado es " "una cadena que indica qué salió mal (a bajo nivel)." @@ -1006,7 +1014,7 @@ msgid "" "inappropriate type. The associated value is a string giving details about " "the type mismatch." msgstr "" -"Se genera cuando una operación o función se aplica a un objeto de tipo " +"Se lanza cuando una operación o función se aplica a un objeto de tipo " "inapropiado. El valor asociado es una cadena que proporciona detalles sobre " "la falta de coincidencia de tipos." @@ -1041,7 +1049,7 @@ msgid "" "but no value has been bound to that variable. This is a subclass of :exc:" "`NameError`." msgstr "" -"Se genera cuando se hace referencia a una variable local en una función o " +"Se lanza cuando se hace referencia a una variable local en una función o " "método, pero no se ha vinculado ningún valor a esa variable. Esta es una " "subclase de :exc:`NameError`." @@ -1050,7 +1058,7 @@ msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." msgstr "" -"Se genera cuando se produce un error de codificación o decodificación " +"Se lanza cuando se produce un error de codificación o decodificación " "relacionado con Unicode. Es una subclase de :exc:`ValueError`." #: ../Doc/library/exceptions.rst:627 @@ -1088,7 +1096,7 @@ msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -"Se genera cuando se produce un error relacionado con Unicode durante la " +"Se lanza cuando se produce un error relacionado con Unicode durante la " "codificación. Es una subclase de :exc:`UnicodeError`." #: ../Doc/library/exceptions.rst:660 @@ -1096,7 +1104,7 @@ msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -"Se genera cuando se produce un error relacionado con Unicode durante la " +"Se lanza cuando se produce un error relacionado con Unicode durante la " "codificación. Es una subclase de :exc:`UnicodeError`." #: ../Doc/library/exceptions.rst:666 @@ -1104,7 +1112,7 @@ msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -"Se genera cuando se produce un error relacionado con Unicode durante la " +"Se lanza cuando se produce un error relacionado con Unicode durante la " "codificación. Es una subclase de :exc:`UnicodeError`." #: ../Doc/library/exceptions.rst:672 @@ -1113,7 +1121,7 @@ msgid "" "type but an inappropriate value, and the situation is not described by a " "more precise exception such as :exc:`IndexError`." msgstr "" -"Se genera cuando una operación o función recibe un argumento que tiene el " +"Se lanza cuando una operación o función recibe un argumento que tiene el " "tipo correcto pero un valor inapropiado, y la situación no se describe con " "una excepción más precisa como :exc:`IndexError`." @@ -1123,7 +1131,7 @@ msgid "" "The associated value is a string indicating the type of the operands and the " "operation." msgstr "" -"Se genera cuando el segundo argumento de una operación de división o módulo " +"Se lanza cuando el segundo argumento de una operación de división o módulo " "es cero. El valor asociado es una cadena que indica el tipo de operandos y " "la operación." @@ -1148,7 +1156,7 @@ msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." msgstr "" -"Las siguientes excepciones son subclases de :exc:`OSError`, se generan según " +"Las siguientes excepciones son subclases de :exc:`OSError`, se lanzan según " "el código de error del sistema." #: ../Doc/library/exceptions.rst:704 @@ -1501,7 +1509,7 @@ msgstr "" "`BaseException` y puede envolver cualquier excepción, mientras que :exc:" "`ExceptionGroup` extiende a :exc:`Exception` y solo puede envolver subclases " "de :exc:`Exception`. Este diseño está pensado para que ``except Exception`` " -"capture un :exc:`ExceptionGroup` pero no :exc:`BaseExceptionGroup`" +"capture un :exc:`ExceptionGroup` pero no :exc:`BaseExceptionGroup`." #: ../Doc/library/exceptions.rst:940 msgid "" @@ -1547,9 +1555,14 @@ msgid "" "type object) that accepts an exception as its single argument and returns " "true for the exceptions that should be in the subgroup." msgstr "" +"La condición puede ser un tipo de excepción o una tupla de tipos de " +"excepción, en cuyo caso cada excepción se verifica para comprobar si " +"coincide utilizando la misma verificación que es usada en una cláusula " +"*except*. La condición también puede ser un invocable (distinto de un tipo " +"objeto) que acepte una excepción como su único argumento, y retorne *true* " +"para las excepciones que deban estar en el subgrupo." #: ../Doc/library/exceptions.rst:967 -#, fuzzy msgid "" "The nesting structure of the current exception is preserved in the result, " "as are the values of its :attr:`message`, :attr:`~BaseException." @@ -1559,8 +1572,9 @@ msgid "" msgstr "" "La estructura de anidamiento de la excepción actual se conserva en el " "resultado, así como también los valores de sus campos :attr:`message`, :attr:" -"`__traceback__`, :attr:`__cause__`, :attr:`__context__` y :attr:`__notes__`. " -"Los grupos anidados vacíos son omitidos del resultado." +"`~BaseException.__traceback__`, :attr:`~BaseException.__cause__`, :attr:" +"`~BaseException.__context__` y :attr:`~BaseException.__notes__` . Los grupos " +"anidados vacíos son omitidos del resultado." #: ../Doc/library/exceptions.rst:974 msgid "" @@ -1575,7 +1589,7 @@ msgstr "" #: ../Doc/library/exceptions.rst:978 msgid "``condition`` can be any callable which is not a type object." -msgstr "" +msgstr "``condition`` puede ser cualquier invocable que no sea un objeto tipo." #: ../Doc/library/exceptions.rst:983 msgid "" @@ -1596,19 +1610,18 @@ msgstr "" "envuelve las excepciones en ``excs``." #: ../Doc/library/exceptions.rst:992 -#, fuzzy msgid "" "This method is used by :meth:`subgroup` and :meth:`split`, which are used in " "various contexts to break up an exception group. A subclass needs to " "override it in order to make :meth:`subgroup` and :meth:`split` return " "instances of the subclass rather than :exc:`ExceptionGroup`." msgstr "" -"Este método es usado por :meth:`subgroup` y :meth:`split`. Se necesita una " +"Este método es usado por :meth:`subgroup` y :meth:`split`, los cuales se " +"usan en varios contextos para romper un grupo de excepción. Se necesita una " "subclase que lo sobrescriba para que :meth:`subgroup` y :meth:`split` " -"retornan instancias de la subclase en lugar de :exc:`ExceptionGroup`." +"retornen instancias de la subclase en lugar de :exc:`ExceptionGroup`." #: ../Doc/library/exceptions.rst:998 -#, fuzzy msgid "" ":meth:`subgroup` and :meth:`split` copy the :attr:`~BaseException." "__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." @@ -1616,10 +1629,11 @@ msgid "" "exception group to the one returned by :meth:`derive`, so these fields do " "not need to be updated by :meth:`derive`." msgstr "" -":meth:`subgroup` y :meth:`split` copian los campos :attr:`__traceback__`, :" -"attr:`__cause__`, :attr:`__context__` y :attr:`__notes__` del grupo de " -"excepción original al devuelto por :meth:`derive`, por lo que estos campos " -"no necesitan ser actualizados por :meth:`derive`. ::" +":meth:`subgroup` y :meth:`split` copian los campos :attr:`~BaseException." +"__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." +"__context__` y :attr:`~BaseException.__notes__` del grupo de excepción " +"original al retornado por :meth:`derive`, por lo que estos campos no " +"necesitan ser actualizados por :meth:`derive`." #: ../Doc/library/exceptions.rst:1005 msgid "" @@ -1649,9 +1663,33 @@ msgid "" ">>> exc.__traceback__ is match.__traceback__ is rest.__traceback__\n" "True" msgstr "" +">>> class MyGroup(ExceptionGroup):\n" +"... def derive(self, excs):\n" +"... return MyGroup(self.message, excs)\n" +"...\n" +">>> e = MyGroup(\"eg\", [ValueError(1), TypeError(2)])\n" +">>> e.add_note(\"a note\")\n" +">>> e.__context__ = Exception(\"context\")\n" +">>> e.__cause__ = Exception(\"cause\")\n" +">>> try:\n" +"... raise e\n" +"... except Exception as e:\n" +"... exc = e\n" +"...\n" +">>> match, rest = exc.split(ValueError)\n" +">>> exc, exc.__context__, exc.__cause__, exc.__notes__\n" +"(MyGroup('eg', [ValueError(1), TypeError(2)]), Exception('context'), " +"Exception('cause'), ['a note'])\n" +">>> match, match.__context__, match.__cause__, match.__notes__\n" +"(MyGroup('eg', [ValueError(1)]), Exception('context'), Exception('cause'), " +"['a note'])\n" +">>> rest, rest.__context__, rest.__cause__, rest.__notes__\n" +"(MyGroup('eg', [TypeError(2)]), Exception('context'), Exception('cause'), " +"['a note'])\n" +">>> exc.__traceback__ is match.__traceback__ is rest.__traceback__\n" +"True" #: ../Doc/library/exceptions.rst:1031 -#, fuzzy msgid "" "Note that :exc:`BaseExceptionGroup` defines :meth:`~object.__new__`, so " "subclasses that need a different constructor signature need to override that " @@ -1659,11 +1697,12 @@ msgid "" "exception group subclass which accepts an exit_code and and constructs the " "group's message from it. ::" msgstr "" -"Tenga en cuenta que :exc:`BaseExceptionGroup` define :meth:`__new__`, por lo " -"que las subclases que necesiten una firma de constructor diferente deben " -"sobrescribir ese método en lugar de :meth:`__init__`. Por ejemplo, a " -"continuación se define una subclase de grupo de excepción que acepta un " -"*exit_code* y construye el mensaje del grupo a partir del mismo. ::" +"Tenga en cuenta que :exc:`BaseExceptionGroup` define :meth:`~object." +"__new__`, por lo que las subclases que necesiten una firma de constructor " +"diferente deben sobrescribir ese método en lugar de :meth:`~object." +"__init__`. Por ejemplo, a continuación se define una subclase de grupo de " +"excepción que acepta un *exit_code* y construye el mensaje del grupo a " +"partir del mismo. ::" #: ../Doc/library/exceptions.rst:1037 msgid "" @@ -1676,6 +1715,14 @@ msgid "" " def derive(self, excs):\n" " return Errors(excs, self.exit_code)" msgstr "" +"class Errors(ExceptionGroup):\n" +" def __new__(cls, errors, exit_code):\n" +" self = super().__new__(Errors, f\"exit code: {exit_code}\", errors)\n" +" self.exit_code = exit_code\n" +" return self\n" +"\n" +" def derive(self, excs):\n" +" return Errors(excs, self.exit_code)" #: ../Doc/library/exceptions.rst:1046 msgid "" @@ -1766,6 +1813,74 @@ msgid "" " ├── UnicodeWarning\n" " └── UserWarning\n" msgstr "" +"BaseException\n" +" ├── BaseExceptionGroup\n" +" ├── GeneratorExit\n" +" ├── KeyboardInterrupt\n" +" ├── SystemExit\n" +" └── Exception\n" +" ├── ArithmeticError\n" +" │ ├── FloatingPointError\n" +" │ ├── OverflowError\n" +" │ └── ZeroDivisionError\n" +" ├── AssertionError\n" +" ├── AttributeError\n" +" ├── BufferError\n" +" ├── EOFError\n" +" ├── ExceptionGroup [BaseExceptionGroup]\n" +" ├── ImportError\n" +" │ └── ModuleNotFoundError\n" +" ├── LookupError\n" +" │ ├── IndexError\n" +" │ └── KeyError\n" +" ├── MemoryError\n" +" ├── NameError\n" +" │ └── UnboundLocalError\n" +" ├── OSError\n" +" │ ├── BlockingIOError\n" +" │ ├── ChildProcessError\n" +" │ ├── ConnectionError\n" +" │ │ ├── BrokenPipeError\n" +" │ │ ├── ConnectionAbortedError\n" +" │ │ ├── ConnectionRefusedError\n" +" │ │ └── ConnectionResetError\n" +" │ ├── FileExistsError\n" +" │ ├── FileNotFoundError\n" +" │ ├── InterruptedError\n" +" │ ├── IsADirectoryError\n" +" │ ├── NotADirectoryError\n" +" │ ├── PermissionError\n" +" │ ├── ProcessLookupError\n" +" │ └── TimeoutError\n" +" ├── ReferenceError\n" +" ├── RuntimeError\n" +" │ ├── NotImplementedError\n" +" │ ├── PythonFinalizationError\n" +" │ └── RecursionError\n" +" ├── StopAsyncIteration\n" +" ├── StopIteration\n" +" ├── SyntaxError\n" +" │ └── IndentationError\n" +" │ └── TabError\n" +" ├── SystemError\n" +" ├── TypeError\n" +" ├── ValueError\n" +" │ └── UnicodeError\n" +" │ ├── UnicodeDecodeError\n" +" │ ├── UnicodeEncodeError\n" +" │ └── UnicodeTranslateError\n" +" └── Warning\n" +" ├── BytesWarning\n" +" ├── DeprecationWarning\n" +" ├── EncodingWarning\n" +" ├── FutureWarning\n" +" ├── ImportWarning\n" +" ├── PendingDeprecationWarning\n" +" ├── ResourceWarning\n" +" ├── RuntimeWarning\n" +" ├── SyntaxWarning\n" +" ├── UnicodeWarning\n" +" └── UserWarning\n" #: ../Doc/library/exceptions.rst:6 ../Doc/library/exceptions.rst:17 #: ../Doc/library/exceptions.rst:196 @@ -1785,26 +1900,24 @@ msgid "raise" msgstr "raise" #: ../Doc/library/exceptions.rst:41 -#, fuzzy msgid "exception" -msgstr "Excepciones del sistema operativo" +msgstr "exception" #: ../Doc/library/exceptions.rst:41 -#, fuzzy msgid "chaining" -msgstr "Advertencias" +msgstr "chaining" #: ../Doc/library/exceptions.rst:41 msgid "__cause__ (exception attribute)" -msgstr "" +msgstr "__cause__ (exception attribute)" #: ../Doc/library/exceptions.rst:41 msgid "__context__ (exception attribute)" -msgstr "" +msgstr "__context__ (exception attribute)" #: ../Doc/library/exceptions.rst:41 msgid "__suppress_context__ (exception attribute)" -msgstr "" +msgstr "__suppress_context__ (exception attribute)" #: ../Doc/library/exceptions.rst:196 msgid "assert" From 2f1667c07b560ad0a21c447e54bdff007106b2b2 Mon Sep 17 00:00:00 2001 From: rtobar Date: Thu, 30 Oct 2025 13:36:06 +0800 Subject: [PATCH 35/40] =?UTF-8?q?Arregla=20ortograf=C3=ADa,=20CI=20y=20pot?= =?UTF-8?q?odo=20(#3426)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El step de chequeo de ortografía comenzó a fallar desde que incluímos #3346. Mi intuición es que ahora que parchamos ciertos archivos .po antes de traducirlos estamos "accidentalmente" arreglando algunas entradas que antes quizás fallaban al ser parseadas, ya sea por pospell or por msgcat, y que cuya ortografía por lo tanto nunca fue chequeada. Aprovecho la oportunidad también de arreglar o mejorar un par de detalles en nuestro script de chequeo de ortografía. En el proceso también ocurrió que, por coincidencia, apareció publicada la nueva versión de potodo, la cual depreca el flag -p/--path que usábamos. Esto provocó una serie de errores que llevó a que: * Actualizara nuestra versión de potodo a la última publicada, * Removiera el flag --path * Añadiera un nuevo step en el job de CI para que la documentación construida se pueda descargar Además envié un pequeño PR a potodo: https://git.afpy.org/AFPy/potodo/pulls/30 --------- Signed-off-by: Rodrigo Tobar --- .github/workflows/main.yml | 6 ++++++ .overrides/progress.rst | 2 +- conf.py | 8 ++++++++ dictionaries/library_io.txt | 1 + dictionaries/whatsnew_2.7.txt | 1 + reference/compound_stmts.po | 2 +- requirements-own.txt | 2 +- scripts/check_spell.py | 15 ++++++++------- 8 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18016efc2c..8b3427d1db 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -92,3 +92,9 @@ jobs: - name: Construir documentación run: | sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html + + # Publica la documentación recién construida para poder descargarla de ser necesario + - uses: actions/upload-artifact@v4 + with: + path: cpython/Doc/_build/html + name: documentación-html diff --git a/.overrides/progress.rst b/.overrides/progress.rst index 7fead69417..1a6e7284cf 100644 --- a/.overrides/progress.rst +++ b/.overrides/progress.rst @@ -20,7 +20,7 @@ Muestra los porcentajes completados por directorio y solo los archivos que no es .. runblock:: console - $ potodo --path . + $ potodo . Completados diff --git a/conf.py b/conf.py index a267d02a07..59aacc661f 100644 --- a/conf.py +++ b/conf.py @@ -90,6 +90,14 @@ ] +# autorun is used, among other things, to run potodo, which generates non-ascii output +# starting with 0.30. autorun OTOH defaults to use ascii to decode console/python output. +# Let's switch to utf-8 instead. +autorun_languages = { + "console_output_encoding": "utf-8", + "pycon_output_encoding": "utf-8", +} + def setup(app): def add_contributing_banner(app, doctree): diff --git a/dictionaries/library_io.txt b/dictionaries/library_io.txt index 0a93b4a395..9da6128ac4 100644 --- a/dictionaries/library_io.txt +++ b/dictionaries/library_io.txt @@ -8,3 +8,4 @@ Reconfigura similarmente subclasifica subclasificaciones +Markdown diff --git a/dictionaries/whatsnew_2.7.txt b/dictionaries/whatsnew_2.7.txt index dab9202ed2..87a2cf05a6 100644 --- a/dictionaries/whatsnew_2.7.txt +++ b/dictionaries/whatsnew_2.7.txt @@ -103,3 +103,4 @@ values viewkeys warnings whatever +Light diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index 483661f484..5a06c0ed61 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -336,7 +336,7 @@ msgstr "" "Para una cláusula de :keyword:`!except`con una expresión, la expresión debe " "evaluar a un tipo de excepción o un tupla de tipos de excepciones. La " "excepción generada coincide con una cláusula :keyword:`!except` cuya " -"expresión evaluá a la clase o una :term:`clase base no virtual ` del objeto excepción, o una tupla que contiene dicha clase." #: ../Doc/reference/compound_stmts.rst:255 diff --git a/requirements-own.txt b/requirements-own.txt index 5f2e1c075a..cac697fa5b 100644 --- a/requirements-own.txt +++ b/requirements-own.txt @@ -2,7 +2,7 @@ pip polib pospell>=1.1 -potodo +potodo>=0.30 powrap>=1.0.2 pre-commit Pygments>=2.17.0 diff --git a/scripts/check_spell.py b/scripts/check_spell.py index d915d23849..da8738366e 100644 --- a/scripts/check_spell.py +++ b/scripts/check_spell.py @@ -4,6 +4,7 @@ """ from pathlib import Path +import shutil import sys import tempfile @@ -43,7 +44,7 @@ def check_spell(po_files=None): # Run pospell either against all files or the file given on the command line if not po_files: - po_files = Path(".").glob("*/*.po") + po_files = list(Path(".").glob("*/*.po")) # Workaround issue #3324 FIXME # It seems that all code snippets have line breaks '\n'. This causes the @@ -52,10 +53,9 @@ def check_spell(po_files=None): # Create temporary copies of the original files. po_files_tmp = [] for po_file in po_files: - with open(tempfile.mktemp(), "w") as temp_file: - # Copy content of the .po file - with open(po_file, "r", encoding="utf-8") as f: - temp_file.write(f.read()) + with open(tempfile.mktemp(), "wb") as temp_file: + with open(po_file, "rb") as original_file: + shutil.copyfileobj(original_file, temp_file) po_files_tmp.append(temp_file.name) # Don't translate probably code entries @@ -66,8 +66,9 @@ def check_spell(po_files=None): polib_temp_file.save() detected_errors = pospell.spell_check(po_files_tmp, personal_dict=output_filename, language="es_ES") - for tmp, orig in zip(po_files_tmp, po_files): - print(tmp, " == ", orig) + if detected_errors: + for tmp, orig in zip(po_files_tmp, po_files): + print(tmp, " == ", orig) return detected_errors From 2f9920ac7b8ec99105f2d06ca0b6ad3fa7dece28 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 06:22:02 +0800 Subject: [PATCH 36/40] Bump actions/upload-artifact from 4 to 5 (#3427) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
Release notes

Sourced from actions/upload-artifact's releases.

v5.0.0

What's Changed

BREAKING CHANGE: this update supports Node v24.x. This is not a breaking change per-se but we're treating it as such.

New Contributors

Full Changelog: https://github.com/actions/upload-artifact/compare/v4...v5.0.0

v4.6.2

What's Changed

New Contributors

Full Changelog: https://github.com/actions/upload-artifact/compare/v4...v4.6.2

v4.6.1

What's Changed

Full Changelog: https://github.com/actions/upload-artifact/compare/v4...v4.6.1

v4.6.0

What's Changed

Full Changelog: https://github.com/actions/upload-artifact/compare/v4...v4.6.0

v4.5.0

What's Changed

New Contributors

... (truncated)

Commits
  • 330a01c Merge pull request #734 from actions/danwkennedy/prepare-5.0.0
  • 03f2824 Update github.dep.yml
  • 905a1ec Prepare v5.0.0
  • 2d9f9cd Merge pull request #725 from patrikpolyak/patch-1
  • 9687587 Merge branch 'main' into patch-1
  • 2848b2c Merge pull request #727 from danwkennedy/patch-1
  • 9b51177 Spell out the first use of GHES
  • cd231ca Update GHES guidance to include reference to Node 20 version
  • de65e23 Merge pull request #712 from actions/nebuk89-patch-1
  • 8747d8c Update README.md
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b3427d1db..5e1d56aed3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,7 @@ jobs: sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html # Publica la documentación recién construida para poder descargarla de ser necesario - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v5 with: path: cpython/Doc/_build/html name: documentación-html From a0892dffdc2e985db7dfe0e87fe21e5f66a1fd03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Nov 2025 06:39:13 +0800 Subject: [PATCH 37/40] Bump actions/checkout from 5 to 6 (#3429) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
Release notes

Sourced from actions/checkout's releases.

v6.0.0

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config.

This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.

v5.0.1

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v5...v5.0.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

V6.0.0

V5.0.1

V5.0.0

V4.3.1

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- .github/workflows/pr-comment.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5e1d56aed3..941885234a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 steps: # Obtención del código - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: submodules: 'true' # Necesario para que tj-actions/changed-files se ejecute diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 9e0971c7c8..5cc4c780d4 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -14,7 +14,7 @@ jobs: any_changed: ${{ steps.changed-files.outputs.any_changed }} comment: ${{ steps.create-pr-comment.outputs.comment }} steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false @@ -25,7 +25,7 @@ jobs: cache: "pip" # checkout these files from the base branch to guarantee they haven't been # modified by the PR - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: path: base-branch sparse-checkout-cone-mode: false From 5c8626f9686dd689051b86eef4855c892d1d78bc Mon Sep 17 00:00:00 2001 From: Melvin Pineda Miguel <156713664+TAPMelvin@users.noreply.github.com> Date: Thu, 4 Dec 2025 20:30:19 -0500 Subject: [PATCH 38/40] Translate 7 untranslated entries in c-api/arg.po (#3430) - Translate PY_SSIZE_T_CLEAN macro documentation - Translate string/buffer conversion methods introduction - Translate memory allocation note for es/es#/et/et# formats - Translate borrowed buffer explanation - Translate bf_releasebuffer requirement - Translate immutability check note - Translate removed format types (u, u#, Z, Z#) --- c-api/arg.po | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/c-api/arg.po b/c-api/arg.po index 5e3a772073..a3c968b094 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -85,6 +85,10 @@ msgid "" "formats (``s#``, ``y#``, etc.) explained below. This is not necessary on " "Python 3.13 and later." msgstr "" +"En Python 3.12 y versiones anteriores, la macro :c:macro:`!PY_SSIZE_T_CLEAN` " +"debe estar definida antes de incluir :file:`Python.h` para usar todas las " +"variantes ``#`` de formatos (``s#``, ``y#``, etc.) explicadas a continuación. " +"Esto no es necesario en Python 3.13 y versiones posteriores." #: ../Doc/c-api/arg.rst:42 msgid "" @@ -103,7 +107,7 @@ msgstr "" #: ../Doc/c-api/arg.rst:48 msgid "There are three ways strings and buffers can be converted to C:" -msgstr "" +msgstr "Hay tres formas en que las cadenas de caracteres y los búferes pueden convertirse a C:" #: ../Doc/c-api/arg.rst:50 #, fuzzy @@ -129,6 +133,9 @@ msgid "" "**You have to call** :c:func:`PyMem_Free` after you have finished processing " "the data (or in any early abort case)." msgstr "" +"Los formatos ``es``, ``es#``, ``et`` y ``et#`` asignan el búfer de resultado. " +"**Debe llamar** :c:func:`PyMem_Free` después de haber terminado de procesar " +"los datos (o en cualquier caso de aborto temprano)." #: ../Doc/c-api/arg.rst:63 msgid "" @@ -138,6 +145,12 @@ msgid "" "corresponding Python object, and shares the lifetime of this object. You " "won't have to release any memory yourself." msgstr "" +"Otros formatos toman un :class:`str` o un :term:`objeto de tipo bytes ` de solo lectura, como :class:`bytes`, y proporcionan un " +"puntero ``const char *`` a su búfer. En este caso el búfer es \"prestado\" " +"(*borrowed*): es gestionado por el objeto Python correspondiente y comparte " +"el tiempo de vida de este objeto. No tendrá que liberar ninguna memoria " +"usted mismo." #: ../Doc/c-api/arg.rst:70 msgid "" @@ -146,6 +159,11 @@ msgid "" "disallows common mutable objects such as :class:`bytearray`, but also some " "read-only objects such as :class:`memoryview` of :class:`bytes`." msgstr "" +"Para asegurar que el búfer subyacente pueda ser prestado de forma segura, el " +"campo :c:member:`PyBufferProcs.bf_releasebuffer` del objeto debe ser ``NULL``. " +"Esto desautoriza objetos mutables comunes como :class:`bytearray`, pero " +"también algunos objetos de solo lectura como :class:`memoryview` de :class:" +"`bytes`." #: ../Doc/c-api/arg.rst:76 msgid "" @@ -153,6 +171,9 @@ msgid "" "whether the input object is immutable (e.g. whether it would honor a request " "for a writable buffer, or whether another thread can mutate the data)." msgstr "" +"Además de este requisito de ``bf_releasebuffer``, no hay verificación para " +"comprobar si el objeto de entrada es inmutable (por ejemplo, si respetaría " +"una solicitud de un búfer escribible, o si otro hilo puede mutar los datos)." #: ../Doc/c-api/arg.rst:98 msgid "``s`` (:class:`str`) [const char \\*]" @@ -564,6 +585,8 @@ msgid "" "``u``, ``u#``, ``Z``, and ``Z#`` are removed because they used a legacy " "``Py_UNICODE*`` representation." msgstr "" +"``u``, ``u#``, ``Z`` y ``Z#`` fueron eliminados porque usaban una " +"representación heredada ``Py_UNICODE*``." #: ../Doc/c-api/arg.rst:230 msgid "Numbers" From 4c90822d82e9e57e7c86dcc7ce7c04ee58b2d276 Mon Sep 17 00:00:00 2001 From: Melvin Pineda Miguel <156713664+TAPMelvin@users.noreply.github.com> Date: Fri, 5 Dec 2025 23:10:37 -0500 Subject: [PATCH 39/40] Anadir Melvin Pineda Miguel a TRANSLATORS (#3433) Por el PR https://github.com/python/python-docs-es/pull/3430#event-21374229658 --- TRANSLATORS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TRANSLATORS b/TRANSLATORS index e46c181565..70c581a0bb 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -188,6 +188,7 @@ Mateo Cámara (@MateoCamara) Matias Bordese (@matiasb) Matthew Ellis Kane Jiménez (@M-E-K-J-2102) Melissa Escobar Gutiérrez (@MelissaEscobar) +Melvin Pineda Miguel (@TAPMelvin) Miguel Ángel Nahuel Ambrosini (@ambro17) Nahuel Espinosa (@nahueespinosa) @@ -250,4 +251,4 @@ Xavi Rambla Centellas (@xavirambla) Yennifer Paola Herrera Ariza (@Yenniferh) Yohanna Padrino (@Yo-hanaPR) zejiran -Zodac (@zodacdev) \ No newline at end of file +Zodac (@zodacdev) From cc86e77d8fbfada59a0e831f3d054c895c6658ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 07:02:07 +0800 Subject: [PATCH 40/40] Bump actions/upload-artifact from 5 to 6 (#3434) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
Release notes

Sourced from actions/upload-artifact's releases.

v6.0.0

v6 - What's new

[!IMPORTANT] actions/upload-artifact@v6 now runs on Node.js 24 (runs.using: node24) and requires a minimum Actions Runner version of 2.327.1. If you are using self-hosted runners, ensure they are updated before upgrading.

Node.js 24

This release updates the runtime to Node.js 24. v5 had preliminary support for Node.js 24, however this action was by default still running on Node.js 20. Now this action by default will run on Node.js 24.

What's Changed

Full Changelog: https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0

Commits
  • b7c566a Merge pull request #745 from actions/upload-artifact-v6-release
  • e516bc8 docs: correct description of Node.js 24 support in README
  • ddc45ed docs: update README to correct action name for Node.js 24 support
  • 615b319 chore: release v6.0.0 for Node.js 24 support
  • 017748b Merge pull request #744 from actions/fix-storage-blob
  • 38d4c79 chore: rebuild dist
  • 7d27270 chore: add missing license cache files for @​actions/core, @​actions/io, and mi...
  • 5f643d3 chore: update license files for @​actions/artifact@​5.0.1 dependencies
  • 1df1684 chore: update package-lock.json with @​actions/artifact@​5.0.1
  • b5b1a91 fix: update @​actions/artifact to ^5.0.0 for Node.js 24 punycode fix
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 941885234a..9e34309dd9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,7 @@ jobs: sphinx-build -j auto -W --keep-going -b html -d cpython/Doc/_build/doctree -D language=es . cpython/Doc/_build/html # Publica la documentación recién construida para poder descargarla de ser necesario - - uses: actions/upload-artifact@v5 + - uses: actions/upload-artifact@v6 with: path: cpython/Doc/_build/html name: documentación-html