diff --git a/c-api/unicode.po b/c-api/unicode.po index 9003857c37..3397e7f267 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -6,27 +6,30 @@ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: python-doc-es\n" +"PO-Revision-Date: 2020-05-09 02:25+0200\n" +"Language-Team: python-doc-es (https://mail.python.org/mailman3/lists/docs-es." +"python.org)\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Last-Translator: \n" +"Language: es\n" +"X-Generator: Poedit 2.3\n" #: ../Doc/c-api/unicode.rst:6 msgid "Unicode Objects and Codecs" -msgstr "" +msgstr "Objetos y códecs Unicode" #: ../Doc/c-api/unicode.rst:12 msgid "Unicode Objects" -msgstr "" +msgstr "Objetos Unicode" #: ../Doc/c-api/unicode.rst:14 msgid "" @@ -37,6 +40,13 @@ msgid "" "65536; otherwise, code points must be below 1114112 (which is the full " "Unicode range)." msgstr "" +"Desde la implementación del :pep:`393` en Python 3.3, los objetos Unicode " +"utilizan internamente una variedad de representaciones, para permitir el " +"manejo del rango completo de caracteres Unicode mientras se mantiene la " +"eficiencia de memoria. Hay casos especiales para cadenas de caracteres donde " +"todos los puntos de código están por debajo de 128, 256 o 65536; de lo " +"contrario, los puntos de código deben estar por debajo de 1114112 (que es el " +"rango completo de Unicode)." #: ../Doc/c-api/unicode.rst:20 msgid "" @@ -45,12 +55,19 @@ msgid "" "deprecated and inefficient; it should be avoided in performance- or memory-" "sensitive situations." msgstr "" +":c:type:`Py_UNICODE *` y las representaciones UTF-8 se crean a pedido y se " +"almacenan en caché en el objeto Unicode. La representación :c:type:" +"`Py_UNICODE *` está en desuso y es ineficiente; debe evitarse en situaciones " +"sensibles al rendimiento o la memoria." #: ../Doc/c-api/unicode.rst:25 msgid "" "Due to the transition between the old APIs and the new APIs, Unicode objects " "can internally be in two states depending on how they were created:" msgstr "" +"Debido a la transición entre las API antiguas y las API nuevas, los objetos " +"Unicode pueden estar internamente en dos estados dependiendo de cómo se " +"crearon:" #: ../Doc/c-api/unicode.rst:28 msgid "" @@ -58,6 +75,9 @@ msgid "" "Unicode API. They use the most efficient representation allowed by the " "implementation." msgstr "" +"Los objetos Unicode \"canónicos\" son todos los objetos creados por una API " +"Unicode no obsoleta. Utilizan la representación más eficiente permitida por " +"la implementación." #: ../Doc/c-api/unicode.rst:32 msgid "" @@ -66,16 +86,22 @@ msgid "" "`Py_UNICODE*` representation; you will have to call :c:func:" "`PyUnicode_READY` on them before calling any other API." msgstr "" +"Los objetos Unicode \"heredados\" se han creado a través de una de las API " +"obsoletas (normalmente :c:func:`PyUnicode_FromUnicode`) y solo tienen la " +"representación :c:type:`Py_UNICODE*`; Será necesario llamar a :c:func:" +"`PyUnicode_READY` en ellos antes de llamar a cualquier otra API." #: ../Doc/c-api/unicode.rst:39 msgid "Unicode Type" -msgstr "" +msgstr "Tipo Unicode" #: ../Doc/c-api/unicode.rst:41 msgid "" "These are the basic Unicode object types used for the Unicode implementation " "in Python:" msgstr "" +"Estos son los tipos básicos de objetos Unicode utilizados para la " +"implementación de Unicode en Python:" #: ../Doc/c-api/unicode.rst:48 msgid "" @@ -83,12 +109,18 @@ msgid "" "characters of 32 bits, 16 bits and 8 bits, respectively. When dealing with " "single Unicode characters, use :c:type:`Py_UCS4`." msgstr "" +"Estos tipos son definiciones de tipo (*typedefs*) para los tipos 'enteros " +"sin signo' (*unsigned int*) lo suficientemente anchos como para contener " +"caracteres de 32 bits, 16 bits y 8 bits, respectivamente. Cuando se trate " +"con caracteres Unicode individuales, use :c:type:`Py_UCS4`." #: ../Doc/c-api/unicode.rst:57 msgid "" "This is a typedef of :c:type:`wchar_t`, which is a 16-bit type or 32-bit " "type depending on the platform." msgstr "" +"Este es una definición de tipo (*typedef*) de :c:type:`wchar_t`, que es un " +"tipo de 16 bits o de 32 bits dependiendo de la plataforma." #: ../Doc/c-api/unicode.rst:60 msgid "" @@ -96,6 +128,9 @@ msgid "" "whether you selected a \"narrow\" or \"wide\" Unicode version of Python at " "build time." msgstr "" +"En versiones anteriores, este era un tipo de 16 bits o de 32 bits, " +"dependiendo de si seleccionó una versión Unicode \"estrecha\" o \"amplia\" " +"de Python en el momento de la compilación." #: ../Doc/c-api/unicode.rst:70 msgid "" @@ -103,48 +138,69 @@ msgid "" "almost all cases, they shouldn't be used directly, since all API functions " "that deal with Unicode objects take and return :c:type:`PyObject` pointers." msgstr "" +"Estos subtipos de :c:type:`PyObject` representan un objeto Python Unicode. " +"En casi todos los casos, no deben usarse directamente, ya que todas las " +"funciones API que se ocupan de objetos Unicode toman y retornan punteros :c:" +"type:`PyObject`." #: ../Doc/c-api/unicode.rst:79 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python Unicode type. " "It is exposed to Python code as ``str``." msgstr "" +"Esta instancia de :c:type:`PyTypeObject` representa el tipo Python Unicode. " +"Está expuesto al código de Python como ``str``." #: ../Doc/c-api/unicode.rst:83 msgid "" "The following APIs are really C macros and can be used to do fast checks and " "to access internal read-only data of Unicode objects:" msgstr "" +"Las siguientes API son realmente macros de C y se pueden utilizar para " +"realizar comprobaciones rápidas y acceder a datos internos de solo lectura " +"de objetos Unicode:" #: ../Doc/c-api/unicode.rst:88 msgid "" "Return true if the object *o* is a Unicode object or an instance of a " "Unicode subtype." msgstr "" +"Retorna verdadero si el objeto *o* es un objeto Unicode o una instancia de " +"un subtipo Unicode." #: ../Doc/c-api/unicode.rst:94 msgid "" "Return true if the object *o* is a Unicode object, but not an instance of a " "subtype." msgstr "" +"Retorna verdadero (*True*) si el objeto *o* es un objeto Unicode, pero no " +"una instancia de un subtipo." #: ../Doc/c-api/unicode.rst:100 msgid "" "Ensure the string object *o* is in the \"canonical\" representation. This " "is required before using any of the access macros described below." msgstr "" +"Asegura que el objeto de cadena de caracteres *o* esté en la representación " +"\"canónica\". Esto es necesario antes de usar cualquiera de las macros de " +"acceso que se describen a continuación." #: ../Doc/c-api/unicode.rst:105 msgid "" "Returns ``0`` on success and ``-1`` with an exception set on failure, which " "in particular happens if memory allocation fails." msgstr "" +"Retorna ``0`` en caso de éxito y ``-1`` con una excepción establecida en " +"caso de error, que ocurre en particular si falla la asignación de memoria." #: ../Doc/c-api/unicode.rst:113 msgid "" "Return the length of the Unicode string, in code points. *o* has to be a " "Unicode object in the \"canonical\" representation (not checked)." msgstr "" +"Retorna la longitud de la cadena de caracteres Unicode, en puntos de código. " +"*o* tiene que ser un objeto Unicode en la representación \"canónica\" (no " +"marcada)." #: ../Doc/c-api/unicode.rst:123 msgid "" @@ -154,10 +210,16 @@ msgid "" "`PyUnicode_KIND` to select the right macro. Make sure :c:func:" "`PyUnicode_READY` has been called before accessing this." msgstr "" +"Retorna un puntero a la representación canónica emitida a los tipos enteros " +"UCS1, UCS2 o UCS4 para el acceso directo a los caracteres. No se realizan " +"verificaciones si la representación canónica tiene el tamaño de carácter " +"correcto; use :c:func:`PyUnicode_KIND` para seleccionar el macro correcto. " +"Asegúrese de que se haya llamado a :c:func:`PyUnicode_READY` antes de " +"acceder a esto." #: ../Doc/c-api/unicode.rst:137 msgid "Return values of the :c:func:`PyUnicode_KIND` macro." -msgstr "" +msgstr "Retorna los valores de la macro :c:func:`PyUnicode_KIND`." #: ../Doc/c-api/unicode.rst:144 msgid "" @@ -165,12 +227,18 @@ msgid "" "many bytes per character this Unicode object uses to store its data. *o* " "has to be a Unicode object in the \"canonical\" representation (not checked)." msgstr "" +"Retorna una de las constantes de tipo ``PyUnicode`` (ver arriba) que indican " +"cuántos bytes por carácter utiliza este objeto Unicode para almacenar sus " +"datos. *o* tiene que ser un objeto Unicode en la representación \"canónica" +"\" (no marcada)." #: ../Doc/c-api/unicode.rst:155 msgid "" "Return a void pointer to the raw Unicode buffer. *o* has to be a Unicode " "object in the \"canonical\" representation (not checked)." msgstr "" +"Retorna un puntero vacío al búfer Unicode sin formato. *o* tiene que ser un " +"objeto Unicode en la representación \"canónica\" (no marcada)." #: ../Doc/c-api/unicode.rst:164 msgid "" @@ -181,12 +249,22 @@ msgid "" "string (starts at 0) and *value* is the new code point value which should be " "written to that location." msgstr "" +"Escribe en una representación canónica *data* (como se obtiene con :c:func:" +"`PyUnicode_DATA`). Esta macro no realiza ninguna comprobación de cordura y " +"está diseñado para su uso en bucles. La persona que llama debe almacenar en " +"caché el valor *kind* y el puntero *data* como se obtiene de otras llamadas " +"de la macro. *index* es el índice en la cadena de caracteres (comienza en 0) " +"y *value* es el nuevo valor del punto de código que debe escribirse en esa " +"ubicación." #: ../Doc/c-api/unicode.rst:176 msgid "" "Read a code point from a canonical representation *data* (as obtained with :" "c:func:`PyUnicode_DATA`). No checks or ready calls are performed." msgstr "" +"Lee un punto de código de una representación canónica *data* (obtenido con :" +"c:func:`PyUnicode_DATA`). No se realizan verificaciones ni llamadas " +"preparadas." #: ../Doc/c-api/unicode.rst:184 msgid "" @@ -194,6 +272,9 @@ msgid "" "\" representation. This is less efficient than :c:func:`PyUnicode_READ` if " "you do multiple consecutive reads." msgstr "" +"Lee un carácter de un objeto Unicode *o*, que debe estar en la " +"representación \"canónica\". Esto es menos eficiente que :c:func:" +"`PyUnicode_READ` si realiza varias lecturas consecutivas." #: ../Doc/c-api/unicode.rst:193 msgid "" @@ -201,10 +282,15 @@ msgid "" "based on *o*, which must be in the \"canonical\" representation. This is " "always an approximation but more efficient than iterating over the string." msgstr "" +"Retorna el punto de código máximo adecuado para crear otra cadena de " +"caracteres basada en *o*, que debe estar en la representación \"canónica\". " +"Esto siempre es una aproximación pero más eficiente que iterar sobre la " +"cadena." #: ../Doc/c-api/unicode.rst:202 msgid "Clear the free list. Return the total number of freed items." msgstr "" +"Borra la lista gratuita. Retorna el número total de artículos liberados." #: ../Doc/c-api/unicode.rst:207 msgid "" @@ -212,18 +298,25 @@ msgid "" "code units (this includes surrogate pairs as 2 units). *o* has to be a " "Unicode object (not checked)." msgstr "" +"Retorna el tamaño de la representación en desuso :c:type:`Py_UNICODE`, en " +"unidades de código (esto incluye pares sustitutos como 2 unidades). *o* " +"tiene que ser un objeto Unicode (no marcado)." #: ../Doc/c-api/unicode.rst:213 ../Doc/c-api/unicode.rst:223 msgid "" "Part of the old-style Unicode API, please migrate to using :c:func:" "`PyUnicode_GET_LENGTH`." msgstr "" +"Parte de la API Unicode de estilo antiguo, por favor migrar para usar :c:" +"func:`PyUnicode_GET_LENGTH`." #: ../Doc/c-api/unicode.rst:218 msgid "" "Return the size of the deprecated :c:type:`Py_UNICODE` representation in " "bytes. *o* has to be a Unicode object (not checked)." msgstr "" +"Retorna el tamaño de la representación en desuso :c:type:`Py_UNICODE` en " +"bytes. *o* tiene que ser un objeto Unicode (no marcado)." #: ../Doc/c-api/unicode.rst:229 msgid "" @@ -234,6 +327,12 @@ msgid "" "pointer to :c:type:`const char *`. The *o* argument has to be a Unicode " "object (not checked)." msgstr "" +"Retorna un puntero a una representación :c:type:`Py_UNICODE` del objeto. El " +"búfer retornado siempre termina con un punto de código nulo adicional. " +"También puede contener puntos de código nulo incrustados, lo que provocaría " +"que la cadena de caracteres se truncara cuando se usara en la mayoría de las " +"funciones de C. La forma ``AS_DATA`` arroja el puntero a :c:type:`const char " +"*`. El argumento *o* tiene que ser un objeto Unicode (no marcado)." #: ../Doc/c-api/unicode.rst:236 msgid "" @@ -243,16 +342,23 @@ msgid "" "use the new :c:func:`PyUnicode_nBYTE_DATA` macros or use :c:func:" "`PyUnicode_WRITE` or :c:func:`PyUnicode_READ`." msgstr "" +"Esta macro ahora es ineficiente, porque en muchos casos la representación :c:" +"type:`Py_UNICODE` no existe y necesita ser creada, y puede fallar (devolver " +"``NULL`` con un conjunto de excepciones). Intente portar el código para usar " +"las nuevas macros :c:func:`PyUnicode_nBYTE_DATA` o use :c:func:" +"`PyUnicode_WRITE` o :c:func:`PyUnicode_READ`." #: ../Doc/c-api/unicode.rst:245 msgid "" "Part of the old-style Unicode API, please migrate to using the :c:func:" "`PyUnicode_nBYTE_DATA` family of macros." msgstr "" +"Parte de la antigua API Unicode, por favor migre para usar la familia de " +"macros :c:func:`PyUnicode_nBYTE_DATA`." #: ../Doc/c-api/unicode.rst:249 msgid "Unicode Character Properties" -msgstr "" +msgstr "Propiedades de caracteres Unicode" #: ../Doc/c-api/unicode.rst:251 msgid "" @@ -260,53 +366,68 @@ msgid "" "ones are available through these macros which are mapped to C functions " "depending on the Python configuration." msgstr "" +"Unicode proporciona muchas propiedades de caracteres diferentes. Los que se " +"necesitan con mayor frecuencia están disponibles a través de estas macros " +"que se asignan a las funciones de C según la configuración de Python." #: ../Doc/c-api/unicode.rst:258 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a whitespace character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter de espacio en " +"blanco." #: ../Doc/c-api/unicode.rst:263 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a lowercase character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter en minúscula." #: ../Doc/c-api/unicode.rst:268 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an uppercase character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter en mayúscula." #: ../Doc/c-api/unicode.rst:273 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a titlecase character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter en caso de " +"título (*titlecase*)." #: ../Doc/c-api/unicode.rst:278 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is a linebreak character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter de salto de " +"línea." #: ../Doc/c-api/unicode.rst:283 msgid "Return ``1`` or ``0`` depending on whether *ch* is a decimal character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter decimal o no." #: ../Doc/c-api/unicode.rst:288 msgid "Return ``1`` or ``0`` depending on whether *ch* is a digit character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter de dígitos." #: ../Doc/c-api/unicode.rst:293 msgid "Return ``1`` or ``0`` depending on whether *ch* is a numeric character." -msgstr "" +msgstr "Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter numérico." #: ../Doc/c-api/unicode.rst:298 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphabetic character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter alfabético." #: ../Doc/c-api/unicode.rst:303 msgid "" "Return ``1`` or ``0`` depending on whether *ch* is an alphanumeric character." msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter alfanumérico." #: ../Doc/c-api/unicode.rst:308 msgid "" @@ -318,61 +439,76 @@ msgid "" "invoked on a string. It has no bearing on the handling of strings written " "to :data:`sys.stdout` or :data:`sys.stderr`.)" msgstr "" +"Retorna ``1`` o ``0`` dependiendo de si *ch* es un carácter imprimible. Los " +"caracteres no imprimibles son aquellos definidos en la base de datos de " +"caracteres Unicode como \"Otro\" o \"Separador\", excepto el espacio ASCII " +"(0x20) que se considera imprimible. (Tenga en cuenta que los caracteres " +"imprimibles en este contexto son aquellos a los que no se debe escapar " +"cuando :func:`repr` se invoca en una cadena de caracteres. No tiene relación " +"con el manejo de cadenas de caracteres escritas en :data:`sys.stdout` o :" +"data:`sys.stderr`.)" #: ../Doc/c-api/unicode.rst:317 msgid "These APIs can be used for fast direct character conversions:" msgstr "" +"Estas API se pueden usar para conversiones caracteres rápidas y directos:" #: ../Doc/c-api/unicode.rst:322 msgid "Return the character *ch* converted to lower case." -msgstr "" +msgstr "Retorna el carácter *ch* convertido a minúsculas." #: ../Doc/c-api/unicode.rst:324 ../Doc/c-api/unicode.rst:332 #: ../Doc/c-api/unicode.rst:340 msgid "This function uses simple case mappings." -msgstr "" +msgstr "Esta función utiliza conversiones simples." #: ../Doc/c-api/unicode.rst:330 msgid "Return the character *ch* converted to upper case." -msgstr "" +msgstr "Retorna el carácter *ch* convertido a mayúsculas." #: ../Doc/c-api/unicode.rst:338 msgid "Return the character *ch* converted to title case." -msgstr "" +msgstr "Retorna el carácter *ch* convertido a formato de título (*titlecase*)." #: ../Doc/c-api/unicode.rst:346 msgid "" "Return the character *ch* converted to a decimal positive integer. Return " "``-1`` if this is not possible. This macro does not raise exceptions." msgstr "" +"Retorna el carácter *ch* convertido a un entero positivo decimal. Retorna " +"``-1`` si esto no es posible. Esta macro no genera excepciones." #: ../Doc/c-api/unicode.rst:352 msgid "" "Return the character *ch* converted to a single digit integer. Return ``-1`` " "if this is not possible. This macro does not raise exceptions." msgstr "" +"Retorna el carácter *ch* convertido a un entero de un solo dígito. Retorna " +"``-1`` si esto no es posible. Esta macro no genera excepciones." #: ../Doc/c-api/unicode.rst:358 msgid "" "Return the character *ch* converted to a double. Return ``-1.0`` if this is " "not possible. This macro does not raise exceptions." msgstr "" +"Retorna el carácter *ch* convertido a doble. Devuelva ``-1.0`` si esto no es " +"posible. Esta macro no genera excepciones." #: ../Doc/c-api/unicode.rst:362 msgid "These APIs can be used to work with surrogates:" -msgstr "" +msgstr "Estas API se pueden usar para trabajar con sustitutos:" #: ../Doc/c-api/unicode.rst:366 msgid "Check if *ch* is a surrogate (``0xD800 <= ch <= 0xDFFF``)." -msgstr "" +msgstr "Comprueba si *ch* es un sustituto (``0xD800 <= ch <= 0xDFFF``)." #: ../Doc/c-api/unicode.rst:370 msgid "Check if *ch* is a high surrogate (``0xD800 <= ch <= 0xDBFF``)." -msgstr "" +msgstr "Comprueba si *ch* es un sustituto alto (``0xD800 <= ch <= 0xDFFF``)." #: ../Doc/c-api/unicode.rst:374 msgid "Check if *ch* is a low surrogate (``0xDC00 <= ch <= 0xDFFF``)." -msgstr "" +msgstr "Comprueba si *ch* es un sustituto bajo (``0xD800 <= ch <= 0xDFFF``)." #: ../Doc/c-api/unicode.rst:378 msgid "" @@ -380,16 +516,21 @@ msgid "" "*low* are respectively the leading and trailing surrogates in a surrogate " "pair." msgstr "" +"Une dos caracteres sustitutos y retorna un solo valor Py_UCS4. *high* y " +"*low* son respectivamente los sustitutos iniciales y finales en un par " +"sustituto." #: ../Doc/c-api/unicode.rst:384 msgid "Creating and accessing Unicode strings" -msgstr "" +msgstr "Creando y accediendo a cadenas de caracteres Unicode" #: ../Doc/c-api/unicode.rst:386 msgid "" "To create Unicode objects and access their basic sequence properties, use " "these APIs:" msgstr "" +"Para crear objetos Unicode y acceder a sus propiedades de secuencia básicas, " +"use estas API:" #: ../Doc/c-api/unicode.rst:391 msgid "" @@ -397,12 +538,17 @@ msgid "" "point to be placed in the string. As an approximation, it can be rounded up " "to the nearest value in the sequence 127, 255, 65535, 1114111." msgstr "" +"Crea un nuevo objeto Unicode. *maxchar* debe ser el punto de código máximo " +"que se colocará en la cadena de caracteres. Como una aproximación, se puede " +"redondear al valor más cercano en la secuencia 127, 255, 65535, 1114111." #: ../Doc/c-api/unicode.rst:395 msgid "" "This is the recommended way to allocate a new Unicode object. Objects " "created using this function are not resizable." msgstr "" +"Esta es la forma recomendada de asignar un nuevo objeto Unicode. Los objetos " +"creados con esta función no se pueden redimensionar." #: ../Doc/c-api/unicode.rst:404 msgid "" @@ -411,6 +557,10 @@ msgid "" "`PyUnicode_KIND`). The *buffer* must point to an array of *size* units of " "1, 2 or 4 bytes per character, as given by the kind." msgstr "" +"Crea un nuevo objeto Unicode con el tipo *kind* dado (los valores posibles " +"son :c:macro:`PyUnicode_1BYTE_KIND` etc., según lo retornado por :c:func:" +"`PyUnicode_KIND`). El *búfer* debe apuntar a un vector (*array*) de *tamaño* " +"unidades de 1, 2 o 4 bytes por carácter, según el tipo." #: ../Doc/c-api/unicode.rst:414 msgid "" @@ -419,6 +569,10 @@ msgid "" "object. If the buffer is not ``NULL``, the return value might be a shared " "object, i.e. modification of the data is not allowed." msgstr "" +"Crea un objeto Unicode desde el búfer de caracteres *u*. Los bytes se " +"interpretarán como codificados en UTF-8. El búfer se copia en el nuevo " +"objeto. Si el búfer no es ``NULL``, el valor de retorno podría ser un objeto " +"compartido, es decir, no se permite la modificación de los datos." #: ../Doc/c-api/unicode.rst:419 msgid "" @@ -426,11 +580,16 @@ msgid "" "`PyUnicode_FromUnicode` with the buffer set to ``NULL``. This usage is " "deprecated in favor of :c:func:`PyUnicode_New`." msgstr "" +"Si *u* es ``NULL``, esta función se comporta como :c:func:" +"`PyUnicode_FromUnicode` con el búfer establecido en ``NULL``. Este uso se " +"considera obsoleto (*deprecated*) en favor de :c:func:`PyUnicode_New`." #: ../Doc/c-api/unicode.rst:426 msgid "" "Create a Unicode object from a UTF-8 encoded null-terminated char buffer *u*." msgstr "" +"Crea un objeto Unicode a partir de un búfer *u* de caracteres terminado en " +"nulo y codificado en UTF-8." #: ../Doc/c-api/unicode.rst:432 msgid "" @@ -440,213 +599,220 @@ msgid "" "must be C types and must correspond exactly to the format characters in the " "*format* ASCII-encoded string. The following format characters are allowed:" msgstr "" +"Toma una cadena de caracteres *format* con el estilo de :c:func:`printf` en " +"C y un número variable de argumentos, calcula el tamaño de la cadena Python " +"Unicode resultante y devuelva una cadena de caracteres con los valores " +"formateados. Los argumentos variables deben ser tipos de C y deben " +"corresponder exactamente a los caracteres de formato en la cadena de " +"caracteres *format* codificada en ASCII. Se permiten los siguientes " +"caracteres de formato:" #: ../Doc/c-api/unicode.rst:447 msgid "Format Characters" -msgstr "" +msgstr "Formatear caracteres" #: ../Doc/c-api/unicode.rst:447 msgid "Type" -msgstr "" +msgstr "Tipo" #: ../Doc/c-api/unicode.rst:447 msgid "Comment" -msgstr "" +msgstr "Comentario" #: ../Doc/c-api/unicode.rst:449 #, python-format msgid ":attr:`%%`" -msgstr "" +msgstr ":attr:`%%`" #: ../Doc/c-api/unicode.rst:449 msgid "*n/a*" -msgstr "" +msgstr "*n/a*" #: ../Doc/c-api/unicode.rst:449 #, python-format msgid "The literal % character." -msgstr "" +msgstr "El carácter literal %." #: ../Doc/c-api/unicode.rst:451 #, python-format msgid ":attr:`%c`" -msgstr "" +msgstr ":attr:`%c`" #: ../Doc/c-api/unicode.rst:451 ../Doc/c-api/unicode.rst:454 #: ../Doc/c-api/unicode.rst:487 ../Doc/c-api/unicode.rst:490 msgid "int" -msgstr "" +msgstr "int" #: ../Doc/c-api/unicode.rst:451 msgid "A single character, represented as a C int." -msgstr "" +msgstr "Un solo carácter, representado como un entero (*int*) de C." #: ../Doc/c-api/unicode.rst:454 #, python-format msgid ":attr:`%d`" -msgstr "" +msgstr ":attr:`%d`" #: ../Doc/c-api/unicode.rst:454 #, python-format msgid "Equivalent to ``printf(\"%d\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%d\")``. [1]_" #: ../Doc/c-api/unicode.rst:457 #, python-format msgid ":attr:`%u`" -msgstr "" +msgstr ":attr:`%u`" #: ../Doc/c-api/unicode.rst:457 msgid "unsigned int" -msgstr "" +msgstr "unsigned int" #: ../Doc/c-api/unicode.rst:457 #, python-format msgid "Equivalent to ``printf(\"%u\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%u\")``. [1]_" #: ../Doc/c-api/unicode.rst:460 #, python-format msgid ":attr:`%ld`" -msgstr "" +msgstr ":attr:`%ld`" #: ../Doc/c-api/unicode.rst:460 ../Doc/c-api/unicode.rst:463 msgid "long" -msgstr "" +msgstr "long" #: ../Doc/c-api/unicode.rst:460 #, python-format msgid "Equivalent to ``printf(\"%ld\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%ld\")``. [1]_" #: ../Doc/c-api/unicode.rst:463 #, python-format msgid ":attr:`%li`" -msgstr "" +msgstr ":attr:`%li`" #: ../Doc/c-api/unicode.rst:463 #, python-format msgid "Equivalent to ``printf(\"%li\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%li\")``. [1]_" #: ../Doc/c-api/unicode.rst:466 #, python-format msgid ":attr:`%lu`" -msgstr "" +msgstr ":attr:`%lu`" #: ../Doc/c-api/unicode.rst:466 msgid "unsigned long" -msgstr "" +msgstr "unsigned long" #: ../Doc/c-api/unicode.rst:466 #, python-format msgid "Equivalent to ``printf(\"%lu\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%lu\")``. [1]_" #: ../Doc/c-api/unicode.rst:469 msgid ":attr:`%lld`" -msgstr "" +msgstr ":attr:`%lld`" #: ../Doc/c-api/unicode.rst:469 ../Doc/c-api/unicode.rst:472 msgid "long long" -msgstr "" +msgstr "long long" #: ../Doc/c-api/unicode.rst:469 msgid "Equivalent to ``printf(\"%lld\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%lld\")``. [1]_" #: ../Doc/c-api/unicode.rst:472 msgid ":attr:`%lli`" -msgstr "" +msgstr ":attr:`%lli`" #: ../Doc/c-api/unicode.rst:472 msgid "Equivalent to ``printf(\"%lli\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%lli\")``. [1]_" #: ../Doc/c-api/unicode.rst:475 msgid ":attr:`%llu`" -msgstr "" +msgstr ":attr:`%llu`" #: ../Doc/c-api/unicode.rst:475 msgid "unsigned long long" -msgstr "" +msgstr "unsigned long long" #: ../Doc/c-api/unicode.rst:475 msgid "Equivalent to ``printf(\"%llu\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%llu\")``. [1]_" #: ../Doc/c-api/unicode.rst:478 msgid ":attr:`%zd`" -msgstr "" +msgstr ":attr:`%zd`" #: ../Doc/c-api/unicode.rst:478 ../Doc/c-api/unicode.rst:481 msgid "Py_ssize_t" -msgstr "" +msgstr "Py_ssize_t" #: ../Doc/c-api/unicode.rst:478 msgid "Equivalent to ``printf(\"%zd\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%zd\")``. [1]_" #: ../Doc/c-api/unicode.rst:481 msgid ":attr:`%zi`" -msgstr "" +msgstr ":attr:`%zi`" #: ../Doc/c-api/unicode.rst:481 msgid "Equivalent to ``printf(\"%zi\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%zi\")``. [1]_" #: ../Doc/c-api/unicode.rst:484 msgid ":attr:`%zu`" -msgstr "" +msgstr ":attr:`%zu`" #: ../Doc/c-api/unicode.rst:484 msgid "size_t" -msgstr "" +msgstr "size_t" #: ../Doc/c-api/unicode.rst:484 msgid "Equivalent to ``printf(\"%zu\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%zu\")``. [1]_" #: ../Doc/c-api/unicode.rst:487 #, python-format msgid ":attr:`%i`" -msgstr "" +msgstr ":attr:`%i`" #: ../Doc/c-api/unicode.rst:487 #, python-format msgid "Equivalent to ``printf(\"%i\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%i\")``. [1]_" #: ../Doc/c-api/unicode.rst:490 #, python-format msgid ":attr:`%x`" -msgstr "" +msgstr ":attr:`%x`" #: ../Doc/c-api/unicode.rst:490 #, python-format msgid "Equivalent to ``printf(\"%x\")``. [1]_" -msgstr "" +msgstr "Equivalente a ``printf(\"%x\")``. [1]_" #: ../Doc/c-api/unicode.rst:493 #, python-format msgid ":attr:`%s`" -msgstr "" +msgstr ":attr:`%s`" #: ../Doc/c-api/unicode.rst:493 msgid "const char\\*" -msgstr "" +msgstr "const char\\*" #: ../Doc/c-api/unicode.rst:493 msgid "A null-terminated C character array." -msgstr "" +msgstr "Un arreglo de caracteres de C terminada en nulo." #: ../Doc/c-api/unicode.rst:496 msgid ":attr:`%p`" -msgstr "" +msgstr ":attr:`%p`" #: ../Doc/c-api/unicode.rst:496 msgid "const void\\*" -msgstr "" +msgstr "const void\\*" #: ../Doc/c-api/unicode.rst:496 msgid "" @@ -654,35 +820,38 @@ msgid "" "\")`` except that it is guaranteed to start with the literal ``0x`` " "regardless of what the platform's ``printf`` yields." msgstr "" +"La representación hexadecimal de un puntero en C. Principalmente equivalente " +"a ``printf(\"%p\")`` excepto que se garantiza que comience con el literal " +"``0x``, independiente de lo que produzca el ``printf`` de la plataforma." #: ../Doc/c-api/unicode.rst:504 msgid ":attr:`%A`" -msgstr "" +msgstr ":attr:`%A`" #: ../Doc/c-api/unicode.rst:504 ../Doc/c-api/unicode.rst:507 #: ../Doc/c-api/unicode.rst:516 ../Doc/c-api/unicode.rst:519 msgid "PyObject\\*" -msgstr "" +msgstr "PyObject\\*" #: ../Doc/c-api/unicode.rst:504 msgid "The result of calling :func:`ascii`." -msgstr "" +msgstr "El resultado de llamar :func:`ascii`." #: ../Doc/c-api/unicode.rst:507 msgid ":attr:`%U`" -msgstr "" +msgstr ":attr:`%U`" #: ../Doc/c-api/unicode.rst:507 msgid "A Unicode object." -msgstr "" +msgstr "Un objeto Unicode." #: ../Doc/c-api/unicode.rst:509 msgid ":attr:`%V`" -msgstr "" +msgstr ":attr:`%V`" #: ../Doc/c-api/unicode.rst:509 msgid "PyObject\\*, const char\\*" -msgstr "" +msgstr "PyObject\\*, const char\\*" #: ../Doc/c-api/unicode.rst:509 msgid "" @@ -690,28 +859,34 @@ msgid "" "array as a second parameter (which will be used, if the first parameter is " "``NULL``)." msgstr "" +"Un objeto Unicode (que puede ser ``NULL``) y un arreglo de caracteres de C " +"terminada en nulo como segundo parámetro (que se utilizará, si el primer " +"parámetro es ``NULL``)." #: ../Doc/c-api/unicode.rst:516 msgid ":attr:`%S`" -msgstr "" +msgstr ":attr:`%S`" #: ../Doc/c-api/unicode.rst:516 msgid "The result of calling :c:func:`PyObject_Str`." -msgstr "" +msgstr "El resultado de llamar :c:func:`PyObject_Str`." #: ../Doc/c-api/unicode.rst:519 msgid ":attr:`%R`" -msgstr "" +msgstr ":attr:`%R`" #: ../Doc/c-api/unicode.rst:519 msgid "The result of calling :c:func:`PyObject_Repr`." -msgstr "" +msgstr "El resultado de llamar :c:func:`PyObject_Repr`." #: ../Doc/c-api/unicode.rst:523 msgid "" "An unrecognized format character causes all the rest of the format string to " "be copied as-is to the result string, and any extra arguments discarded." msgstr "" +"Un carácter de formato no reconocido hace que todo el resto de la cadena de " +"formato se copie tal cual a la cadena de resultado y se descartan los " +"argumentos adicionales." #: ../Doc/c-api/unicode.rst:527 #, python-format @@ -722,21 +897,29 @@ msgid "" "``\"%A\"``, ``\"%U\"``, ``\"%S\"``, ``\"%R\"`` and ``\"%V\"`` (if the " "``PyObject*`` argument is not ``NULL``)." msgstr "" +"La unidad del formateador de ancho es el número de caracteres en lugar de " +"bytes. La unidad del formateador de precisión es la cantidad de bytes para ``" +"\"%s\"`` y ``\"%V\" `` (si el argumento ``PyObject*`` es ``NULL``), y una " +"cantidad de caracteres para ``\"%A\"``, ``\"%U\"``, ``\"%S\"``, ``\"%R\"`` y " +"``\"%V\"`` (si el argumento ``PyObject*`` no es ``NULL``)." #: ../Doc/c-api/unicode.rst:533 msgid "" "For integer specifiers (d, u, ld, li, lu, lld, lli, llu, zd, zi, zu, i, x): " "the 0-conversion flag has effect even when a precision is given." msgstr "" +"Para especificadores de enteros *(d, u, ld, li, lu, lld, lli, llu, zd, zi, " +"zu, i, x)*: el indicador de conversión 0 tiene efecto incluso cuando se " +"proporciona una precisión." #: ../Doc/c-api/unicode.rst:536 msgid "Support for ``\"%lld\"`` and ``\"%llu\"`` added." -msgstr "" +msgstr "Soporte agregado para ``\"%lld\"`` y ``\"%llu\"``." #: ../Doc/c-api/unicode.rst:539 #, python-format msgid "Support for ``\"%li\"``, ``\"%lli\"`` and ``\"%zi\"`` added." -msgstr "" +msgstr "Soporte agregado para ``\"%li\"``, ``\"%lli\"`` y ``\"%zi\"``." #: ../Doc/c-api/unicode.rst:542 #, python-format @@ -744,16 +927,20 @@ msgid "" "Support width and precision formatter for ``\"%s\"``, ``\"%A\"``, ``\"%U" "\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"`` added." msgstr "" +"Soporte agregado para formateadores de anchura y precisión para ``\"%s\"``, " +"``\"%A\"``, ``\"%U\"``, ``\"%V\"``, ``\"%S\"``, ``\"%R\"``." #: ../Doc/c-api/unicode.rst:549 msgid "" "Identical to :c:func:`PyUnicode_FromFormat` except that it takes exactly two " "arguments." msgstr "" +"Idéntico a :c:func:`PyUnicode_FromFormat` excepto que toma exactamente dos " +"argumentos." #: ../Doc/c-api/unicode.rst:556 msgid "Decode an encoded object *obj* to a Unicode object." -msgstr "" +msgstr "Decodifica un objeto codificado *obj* en un objeto Unicode." #: ../Doc/c-api/unicode.rst:558 msgid "" @@ -762,22 +949,31 @@ msgid "" "the error handling defined by *errors*. Both can be ``NULL`` to have the " "interface use the default values (see :ref:`builtincodecs` for details)." msgstr "" +":class:`bytes`, :class:`bytearray` y otros :term:`los objetos similares a " +"bytes ` se decodifican de acuerdo con el *encoding* dado " +"y utilizan el manejo de errores definido por *errors*. Ambos pueden ser " +"``NULL`` para que la interfaz use los valores predeterminados (ver :ref:" +"`builtincodecs` para más detalles)." #: ../Doc/c-api/unicode.rst:564 msgid "" "All other objects, including Unicode objects, cause a :exc:`TypeError` to be " "set." msgstr "" +"Todos los demás objetos, incluidos los objetos Unicode, hacen que se " +"establezca un :exc:`TypeError`." #: ../Doc/c-api/unicode.rst:567 msgid "" "The API returns ``NULL`` if there was an error. The caller is responsible " "for decref'ing the returned objects." msgstr "" +"La API devuelve ``NULL`` si hubo un error. La entidad que hace la llamadas " +"es la responsable de desreferenciar los objetos devueltos." #: ../Doc/c-api/unicode.rst:573 msgid "Return the length of the Unicode object, in code points." -msgstr "" +msgstr "Retorna la longitud del objeto Unicode, en puntos de código." #: ../Doc/c-api/unicode.rst:584 msgid "" @@ -786,24 +982,34 @@ msgid "" "`memcpy` if possible. Returns ``-1`` and sets an exception on error, " "otherwise returns the number of copied characters." msgstr "" +"Copia caracteres de un objeto Unicode en otro. Esta función realiza la " +"conversión de caracteres cuando es necesario y recurre a :c:func:`memcpy` si " +"es posible. Retorna ``-1`` y establece una excepción en caso de error; de lo " +"contrario, devuelve el número de caracteres copiados." #: ../Doc/c-api/unicode.rst:595 msgid "" "Fill a string with a character: write *fill_char* into ``unicode[start:start" "+length]``." msgstr "" +"Rellena una cadena con un carácter: escriba *fill_char* en ``unicode[inicio:" +"inicio+longitud]``." #: ../Doc/c-api/unicode.rst:598 msgid "" "Fail if *fill_char* is bigger than the string maximum character, or if the " "string has more than 1 reference." msgstr "" +"Falla si *fill_char* es más grande que el carácter máximo de la cadena, o si " +"la cadena tiene más de 1 referencia." #: ../Doc/c-api/unicode.rst:601 msgid "" "Return the number of written character, or return ``-1`` and raise an " "exception on error." msgstr "" +"Retorna el número de caracteres escritos o devuelve ``-1`` y genera una " +"excepción en caso de error." #: ../Doc/c-api/unicode.rst:610 msgid "" @@ -811,6 +1017,10 @@ msgid "" "func:`PyUnicode_New`. Since Unicode strings are supposed to be immutable, " "the string must not be shared, or have been hashed yet." msgstr "" +"Escribe un carácter en una cadena de caracteres. La cadena debe haberse " +"creado a través de :c:func:`PyUnicode_New`. Dado que se supone que las " +"cadenas de caracteres Unicode son inmutables, la cadena no debe compartirse " +"o no se ha cifrado todavía." #: ../Doc/c-api/unicode.rst:614 msgid "" @@ -818,6 +1028,9 @@ msgid "" "not out of bounds, and that the object can be modified safely (i.e. that it " "its reference count is one)." msgstr "" +"Esta función comprueba que *unicode* es un objeto Unicode, que el índice no " +"está fuera de los límites y que el objeto se puede modificar de forma segura " +"(es decir, si su número de referencia es uno)." #: ../Doc/c-api/unicode.rst:623 msgid "" @@ -825,12 +1038,18 @@ msgid "" "Unicode object and the index is not out of bounds, in contrast to the macro " "version :c:func:`PyUnicode_READ_CHAR`." msgstr "" +"Lee un carácter de una cadena de caracteres. Esta función verifica que " +"*unicode* es un objeto Unicode y que el índice no está fuera de límites, en " +"contraste con la versión de macro :c:func:`PyUnicode_READ_CHAR`." #: ../Doc/c-api/unicode.rst:633 msgid "" "Return a substring of *str*, from character index *start* (included) to " "character index *end* (excluded). Negative indices are not supported." msgstr "" +"Retorna una subcadena de caracteres de *str*, desde el índice de caracteres " +"*start* (incluido) al índice de caracteres *end* (excluido). Los índices " +"negativos no son compatibles." #: ../Doc/c-api/unicode.rst:642 msgid "" @@ -839,6 +1058,10 @@ msgid "" "particular, a :exc:`SystemError` if *buflen* is smaller than the length of " "*u*). *buffer* is returned on success." msgstr "" +"Copia la cadena de caracteres *u* en un búfer UCS4, incluido un carácter " +"nulo, si *copy_null* está configurado. Retorna ``NULL`` y establece una " +"excepción en caso de error (en particular, a :exc:`SystemError` si *buflen* " +"es menor que la longitud de *u*). *buffer* se devuelve en caso de éxito." #: ../Doc/c-api/unicode.rst:652 msgid "" @@ -847,10 +1070,14 @@ msgid "" "`MemoryError` set. The returned buffer always has an extra null code point " "appended." msgstr "" +"Copia la cadena de caracteres *u* en un nuevo búfer UCS4 que se asigna " +"usando :c:func:`PyMem_Malloc`. Si esto falla, se devuelve ``NULL`` con un :" +"exc:`MemoryError` establecido. El búfer devuelto siempre tiene un punto de " +"código nulo adicional agregado." #: ../Doc/c-api/unicode.rst:661 msgid "Deprecated Py_UNICODE APIs" -msgstr "" +msgstr "APIs de Py_UNICODE deprecadas" #: ../Doc/c-api/unicode.rst:665 msgid "" @@ -859,6 +1086,10 @@ msgid "" "Python 3.x, but need to be aware that their use can now cause performance " "and memory hits." msgstr "" +"Estas funciones API están en desuso con la implementación de :pep:`393`. Los " +"módulos de extensión pueden continuar usándolos, ya que no se eliminarán en " +"Python 3.x, pero deben ser conscientes de que su uso ahora puede causar " +"problemas de rendimiento y memoria." #: ../Doc/c-api/unicode.rst:672 msgid "" @@ -867,6 +1098,10 @@ msgid "" "user's responsibility to fill in the needed data. The buffer is copied into " "the new object." msgstr "" +"Crea un objeto Unicode desde el búfer Py_UNICODE *u* del tamaño dado. *u* " +"puede ser ``NULL``, lo que hace que el contenido no esté definido. Es " +"responsabilidad del usuario completar los datos necesarios. El búfer se " +"copia en el nuevo objeto." #: ../Doc/c-api/unicode.rst:677 msgid "" @@ -874,6 +1109,9 @@ msgid "" "Therefore, modification of the resulting Unicode object is only allowed when " "*u* is ``NULL``." msgstr "" +"Si el búfer no es ``NULL``, el valor de retorno podría ser un objeto " +"compartido. Por lo tanto, la modificación del objeto Unicode resultante solo " +"se permite cuando *u* es ``NULL``." #: ../Doc/c-api/unicode.rst:681 msgid "" @@ -881,12 +1119,17 @@ msgid "" "string content has been filled before using any of the access macros such " "as :c:func:`PyUnicode_KIND`." msgstr "" +"Si el búfer es ``NULL``, se debe llamar a :c:func:`PyUnicode_READY` una vez " +"que se haya llenado el contenido de la cadena de caracteres antes de usar " +"cualquiera de las macros de acceso, como :c:func:`PyUnicode_KIND`." #: ../Doc/c-api/unicode.rst:685 msgid "" "Please migrate to using :c:func:`PyUnicode_FromKindAndData`, :c:func:" "`PyUnicode_FromWideChar` or :c:func:`PyUnicode_New`." msgstr "" +"Por favor migrar para usar :c:func:`PyUnicode_FromKindAndData`, :c:func:" +"`PyUnicode_FromWideChar` o :c:func:`PyUnicode_New`." #: ../Doc/c-api/unicode.rst:691 msgid "" @@ -898,12 +1141,21 @@ msgid "" "points, which would cause the string to be truncated when used in most C " "functions." msgstr "" +"Retorna un puntero de solo lectura al búfer :c:type:`Py_UNICODE` interno del " +"objeto Unicode, o ``NULL`` en caso de error. Esto creará la representación :" +"c:type:`Py_UNICODE*` del objeto si aún no está disponible. El búfer siempre " +"termina con un punto de código nulo adicional. Tenga en cuenta que la cadena " +"de caracteres resultante :c:type:`Py_UNICODE` también puede contener puntos " +"de código nulo incrustados, lo que provocaría que la cadena se truncara " +"cuando se usara en la mayoría de las funciones de C." #: ../Doc/c-api/unicode.rst:699 msgid "" "Please migrate to using :c:func:`PyUnicode_AsUCS4`, :c:func:" "`PyUnicode_AsWideChar`, :c:func:`PyUnicode_ReadChar` or similar new APIs." msgstr "" +"Por favor migrar para usar :c:func:`PyUnicode_AsUCS4`, :c:func:" +"`PyUnicode_AsWideChar`, :c:func:`PyUnicode_ReadChar` o API nuevas similares." #: ../Doc/c-api/unicode.rst:706 msgid "" @@ -911,6 +1163,9 @@ msgid "" "`Py_UNICODE` buffer of the given *size* by ASCII digits 0--9 according to " "their decimal value. Return ``NULL`` if an exception occurs." msgstr "" +"Crea un objeto Unicode reemplazando todos los dígitos decimales en el búfer :" +"c:type:`Py_UNICODE` del *size* dado por dígitos ASCII 0--9 de acuerdo con su " +"valor decimal. Retorna ``NULL`` si ocurre una excepción." #: ../Doc/c-api/unicode.rst:713 msgid "" @@ -920,6 +1175,12 @@ msgid "" "points, which would cause the string to be truncated when used in most C " "functions." msgstr "" +"Como :c:func:`PyUnicode_AsUnicode`, pero también guarda la longitud del " +"arreglo :c:func:`Py_UNICODE` (excluyendo el terminador nulo adicional) en " +"*size*. Tenga en cuenta que la cadena de caracteres resultante :c:type:" +"`Py_UNICODE*` puede contener puntos de código nulo incrustados, lo que " +"provocaría que la cadena se truncara cuando se usara en la mayoría de las " +"funciones de C." #: ../Doc/c-api/unicode.rst:724 msgid "" @@ -930,21 +1191,32 @@ msgid "" "may contain embedded null code points, which would cause the string to be " "truncated when used in most C functions." msgstr "" +"Crea una copia de una cadena de caracteres Unicode que termina con un punto " +"de código nulo. Retorna ``NULL`` y genera una excepción :exc:`MemoryError` " +"en caso de fallo de asignación de memoria; de lo contrario, retorna un nuevo " +"búfer asignado (use :c:func:`PyMem_Free` para liberar el búfer). Tenga en " +"cuenta que la cadena de caracteres resultante :c:type:`Py_UNICODE*` puede " +"contener puntos de código nulo incrustados, lo que provocaría que la cadena " +"se truncara cuando se usara en la mayoría de las funciones de C." #: ../Doc/c-api/unicode.rst:733 msgid "" "Please migrate to using :c:func:`PyUnicode_AsUCS4Copy` or similar new APIs." msgstr "" +"Por favor migrar para usar :c:func:`PyUnicode_AsUCS4Copy` o API nuevas " +"similares." #: ../Doc/c-api/unicode.rst:738 msgid "" "Return the size of the deprecated :c:type:`Py_UNICODE` representation, in " "code units (this includes surrogate pairs as 2 units)." msgstr "" +"Retorna el tamaño de la representación en desuso :c:type:`Py_UNICODE`, en " +"unidades de código (esto incluye pares sustitutos como 2 unidades)." #: ../Doc/c-api/unicode.rst:741 msgid "Please migrate to using :c:func:`PyUnicode_GetLength`." -msgstr "" +msgstr "Por favor migrar para usar :c:func:`PyUnicode_GetLength`." #: ../Doc/c-api/unicode.rst:746 msgid "" @@ -952,21 +1224,27 @@ msgid "" "necessary. If *obj* is already a true Unicode object (not a subtype), return " "the reference with incremented refcount." msgstr "" +"Copia una instancia de un subtipo Unicode a un nuevo objeto Unicode " +"verdadero si es necesario. Si *obj* ya es un verdadero objeto Unicode (no un " +"subtipo), devuelva la referencia con un recuento incrementado." #: ../Doc/c-api/unicode.rst:750 msgid "" "Objects other than Unicode or its subtypes will cause a :exc:`TypeError`." msgstr "" +"Los objetos que no sean Unicode o sus subtipos causarán un :exc:`TypeError`." #: ../Doc/c-api/unicode.rst:754 msgid "Locale Encoding" -msgstr "" +msgstr "Codificación regional" #: ../Doc/c-api/unicode.rst:756 msgid "" "The current locale encoding can be used to decode text from the operating " "system." msgstr "" +"La codificación local actual se puede utilizar para decodificar texto del " +"sistema operativo." #: ../Doc/c-api/unicode.rst:763 msgid "" @@ -976,6 +1254,12 @@ msgid "" "\"strict\"`` error handler if *errors* is ``NULL``. *str* must end with a " "null character but cannot contain embedded null characters." msgstr "" +"Decodifica una cadena de caracteres UTF-8 en Android y VxWorks, o de la " +"codificación de configuración regional actual en otras plataformas. Los " +"manejadores de errores admitidos son ``\"estricto\"`` y ``\"subrogateescape" +"\"`` (:pep:`383`). El decodificador usa el controlador de errores ``" +"\"estricto\"`` si *errors* es``NULL``. *str* debe terminar con un carácter " +"nulo pero no puede contener caracteres nulos incrustados." #: ../Doc/c-api/unicode.rst:770 msgid "" @@ -983,14 +1267,17 @@ msgid "" "data:`Py_FileSystemDefaultEncoding` (the locale encoding read at Python " "startup)." msgstr "" +"Utilice :c:func:`PyUnicode_DecodeFSDefaultAndSize` para decodificar una " +"cadena de :c:data:`Py_FileSystemDefaultEncoding` (la codificación de la " +"configuración regional leída al iniciar Python)." #: ../Doc/c-api/unicode.rst:774 ../Doc/c-api/unicode.rst:810 msgid "This function ignores the Python UTF-8 mode." -msgstr "" +msgstr "Esta función ignora el modo Python UTF-8." #: ../Doc/c-api/unicode.rst:778 ../Doc/c-api/unicode.rst:882 msgid "The :c:func:`Py_DecodeLocale` function." -msgstr "" +msgstr "La función :c:func:`Py_DecodeLocale`." #: ../Doc/c-api/unicode.rst:782 msgid "" @@ -999,12 +1286,19 @@ msgid "" "`Py_DecodeLocale` was used for the ``surrogateescape``, and the current " "locale encoding was used for ``strict``." msgstr "" +"La función ahora también usa la codificación de configuración regional " +"actual para el controlador de errores ``subrogateescape``, excepto en " +"Android. Anteriormente, :c:func:`Py_DecodeLocale` se usaba para el " +"``subrogateescape``, y la codificación local actual se usaba para " +"``estricto``." #: ../Doc/c-api/unicode.rst:791 msgid "" "Similar to :c:func:`PyUnicode_DecodeLocaleAndSize`, but compute the string " "length using :c:func:`strlen`." msgstr "" +"Similar a :c:func:`PyUnicode_DecodeLocaleAndSize`, pero calcula la longitud " +"de la cadena de caracteres usando :c:func:`strlen`." #: ../Doc/c-api/unicode.rst:799 msgid "" @@ -1014,16 +1308,25 @@ msgid "" "\"strict\"`` error handler if *errors* is ``NULL``. Return a :class:`bytes` " "object. *unicode* cannot contain embedded null characters." msgstr "" +"Codifica un objeto Unicode UTF-8 en Android y VxWorks, o en la codificación " +"local actual en otras plataformas. Los manejadores de errores admitidos son " +"``\"estricto\" `` y ``\"subrogateescape\"`` (:pep:`383`). El codificador " +"utiliza el controlador de errores ``\"estricto\"`` si *errors* es ``NULL``. " +"Retorna un objeto :class:`bytes`. *unicode* no puede contener caracteres " +"nulos incrustados." #: ../Doc/c-api/unicode.rst:806 msgid "" "Use :c:func:`PyUnicode_EncodeFSDefault` to encode a string to :c:data:" "`Py_FileSystemDefaultEncoding` (the locale encoding read at Python startup)." msgstr "" +"Utilice :c:func:`PyUnicode_EncodeFSDefault` para codificar una cadena de " +"caracteres en :c:data:`Py_FileSystemDefaultEncoding` (la codificación de la " +"configuración regional leída al iniciar Python)." #: ../Doc/c-api/unicode.rst:814 ../Doc/c-api/unicode.rst:918 msgid "The :c:func:`Py_EncodeLocale` function." -msgstr "" +msgstr "La función :c:func:`Py_EncodeLocale`." #: ../Doc/c-api/unicode.rst:818 msgid "" @@ -1032,10 +1335,15 @@ msgid "" "`Py_EncodeLocale` was used for the ``surrogateescape``, and the current " "locale encoding was used for ``strict``." msgstr "" +"La función ahora también usa la codificación de configuración regional " +"actual para el controlador de errores ``subrogateescape``, excepto en " +"Android. Anteriormente, :c:func:`Py_EncodeLocale` se usaba para el " +"``subrogateescape``, y la codificación local actual se usaba para " +"``estricto``." #: ../Doc/c-api/unicode.rst:827 msgid "File System Encoding" -msgstr "" +msgstr "Codificación del sistema de archivos" #: ../Doc/c-api/unicode.rst:829 msgid "" @@ -1046,6 +1354,13 @@ msgid "" "argument parsing, the ``\"O&\"`` converter should be used, passing :c:func:" "`PyUnicode_FSConverter` as the conversion function:" msgstr "" +"Para codificar y decodificar nombres de archivo y otras cadenas de " +"caracteres de entorno, :c:data:`Py_FileSystemDefaultEncoding` debe usarse " +"como codificación, y :c:data:`Py_FileSystemDefaultEncodeErrors` debe usarse " +"como controlador de errores (:pep:`383` y :pep:`529`). Para codificar " +"nombres de archivo a :class:`bytes` durante el análisis de argumentos, se " +"debe usar el convertidor ``\"O&\"``, pasando :c:func:`PyUnicode_FSConverter` " +"como la función de conversión:" #: ../Doc/c-api/unicode.rst:838 msgid "" @@ -1055,10 +1370,15 @@ msgid "" "*result* must be a :c:type:`PyBytesObject*` which must be released when it " "is no longer used." msgstr "" +"Convertidor *ParseTuple* : codificar objetos :class:`str` -- obtenidos " +"directamente o mediante la interfaz :class:`os.PathLike` -- a :class:`bytes` " +"usando :c:func:`PyUnicode_EncodeFSDefault`; los objetos :class:`bytes` se " +"emiten tal cual. *result* debe ser un :c:type:`PyBytesObject*` que debe " +"liberarse cuando ya no se use." #: ../Doc/c-api/unicode.rst:846 ../Doc/c-api/unicode.rst:863 msgid "Accepts a :term:`path-like object`." -msgstr "" +msgstr "Acepta un objeto similar a una ruta (:term:`path-like object`)." #: ../Doc/c-api/unicode.rst:849 msgid "" @@ -1066,6 +1386,9 @@ msgid "" "converter should be used, passing :c:func:`PyUnicode_FSDecoder` as the " "conversion function:" msgstr "" +"Para decodificar nombres de archivo a :class:`str` durante el análisis de " +"argumentos, se debe usar el convertidor ``\"O&\"``, pasando :c:func:" +"`PyUnicode_FSDecoder` como la función de conversión:" #: ../Doc/c-api/unicode.rst:855 msgid "" @@ -1075,12 +1398,19 @@ msgid "" "objects are output as-is. *result* must be a :c:type:`PyUnicodeObject*` " "which must be released when it is no longer used." msgstr "" +"Conversor ``ParseTuple``: decodifica objetos :class:`bytes` -- obtenidos " +"directa o indirectamente a través de la interfaz :class:`os.PathLike` -- a :" +"class:`str` usando :c:func:`PyUnicode_DecodeFSDefaultAndSize`; los objetos :" +"class:`str` se generan tal cual. *result* debe ser :c:type:" +"`PyUnicodeObject*` que debe liberarse cuando ya no se use." #: ../Doc/c-api/unicode.rst:869 msgid "" "Decode a string using :c:data:`Py_FileSystemDefaultEncoding` and the :c:data:" "`Py_FileSystemDefaultEncodeErrors` error handler." msgstr "" +"Decodifica una cadena usando :c:data:`Py_FileSystemDefaultEncoding` y el " +"controlador de errores :c:data:`Py_FileSystemDefaultEncodeErrors`." #: ../Doc/c-api/unicode.rst:872 ../Doc/c-api/unicode.rst:893 #: ../Doc/c-api/unicode.rst:909 @@ -1088,6 +1418,8 @@ msgid "" "If :c:data:`Py_FileSystemDefaultEncoding` is not set, fall back to the " "locale encoding." msgstr "" +"Si :c:data:`Py_FileSystemDefaultEncoding` no está configurado, recurre a la " +"codificación de configuración regional." #: ../Doc/c-api/unicode.rst:875 msgid "" @@ -1096,22 +1428,32 @@ msgid "" "from the current locale encoding, use :c:func:" "`PyUnicode_DecodeLocaleAndSize`." msgstr "" +":c:data:`Py_FileSystemDefaultEncoding` se inicializa al inicio desde la " +"codificación local y no se puede modificar más tarde. Si se necesita " +"decodificar una cadena de caracteres de la codificación local actual, " +"utilice :c:func:`PyUnicode_DecodeLocaleAndSize`." #: ../Doc/c-api/unicode.rst:884 ../Doc/c-api/unicode.rst:898 #: ../Doc/c-api/unicode.rst:922 msgid "Use :c:data:`Py_FileSystemDefaultEncodeErrors` error handler." msgstr "" +"Utilice el controlador de errores :c:data:`Py_FileSystemDefaultEncodeErrors`." #: ../Doc/c-api/unicode.rst:890 msgid "" "Decode a null-terminated string using :c:data:`Py_FileSystemDefaultEncoding` " "and the :c:data:`Py_FileSystemDefaultEncodeErrors` error handler." msgstr "" +"Decodifique una cadena terminada en nulo usando :c:data:" +"`Py_FileSystemDefaultEncoding` y el :c:data:" +"`Py_FileSystemDefaultEncodeErrors` controlador de errores." #: ../Doc/c-api/unicode.rst:896 msgid "" "Use :c:func:`PyUnicode_DecodeFSDefaultAndSize` if you know the string length." msgstr "" +"Utilice :c:func:`PyUnicode_DecodeFSDefaultAndSize` si conoce la longitud de " +"la cadena." #: ../Doc/c-api/unicode.rst:904 msgid "" @@ -1120,6 +1462,10 @@ msgid "" "`bytes`. Note that the resulting :class:`bytes` object may contain null " "bytes." msgstr "" +"Codifica un objeto Unicode para :c:data:`Py_FileSystemDefaultEncoding` con " +"el manejador de errores :c:data:`Py_FileSystemDefaultEncodeErrors`, y " +"retorna :class:`bytes`. Tenga en cuenta que el objeto resultante :class:" +"`bytes` puede contener bytes nulos." #: ../Doc/c-api/unicode.rst:912 msgid "" @@ -1127,14 +1473,18 @@ msgid "" "locale encoding and cannot be modified later. If you need to encode a string " "to the current locale encoding, use :c:func:`PyUnicode_EncodeLocale`." msgstr "" +":c:data:`Py_FileSystemDefaultEncoding` se inicializa al inicio desde la " +"codificación local y no se puede modificar más tarde. Si necesita codificar " +"una cadena a la codificación local actual, utilice :c:func:" +"`PyUnicode_EncodeLocale`." #: ../Doc/c-api/unicode.rst:926 msgid "wchar_t Support" -msgstr "" +msgstr "Soporte wchar_t" #: ../Doc/c-api/unicode.rst:928 msgid ":c:type:`wchar_t` support for platforms which support it:" -msgstr "" +msgstr "soporte :c:type:`wchar_t` para plataformas que lo soportan:" #: ../Doc/c-api/unicode.rst:932 msgid "" @@ -1142,6 +1492,9 @@ msgid "" "*size*. Passing ``-1`` as the *size* indicates that the function must itself " "compute the length, using wcslen. Return ``NULL`` on failure." msgstr "" +"Crea un objeto Unicode a partir del búfer :c:type:`wchar_t` *w* del tamaño " +"*size* dado. Pasar ``-1`` como *size* indica que la función debe calcular la " +"longitud, usando ``wcslen``. Retorna ``NULL`` en caso de falla." #: ../Doc/c-api/unicode.rst:940 msgid "" @@ -1155,6 +1508,16 @@ msgid "" "note that the :c:type:`wchar_t*` string might contain null characters, which " "would cause the string to be truncated when used with most C functions." msgstr "" +"Copia el contenido del objeto Unicode en el búfer :c:type:`wchar_t` *w*. A " +"lo sumo *size* se copian los caracteres :c:type:`wchar_t` (excluyendo un " +"posible carácter de terminación nulo final). Devuelve el número de " +"caracteres :c:type:`wchar_t` copiados o ``-1`` en caso de error. Tenga en " +"cuenta que la cadena resultante :c:type:`wchar_t*` puede o no tener " +"terminación nula. Es responsabilidad de la persona que llama asegurarse de " +"que la cadena :c:type:`wchar_t*` tenga una terminación nula en caso de que " +"la aplicación lo requiera. Además, tenga en cuenta que la cadena :c:type:" +"`wchar_t*` podría contener caracteres nulos, lo que provocaría que la cadena " +"se truncara cuando se usara con la mayoría de las funciones de C." #: ../Doc/c-api/unicode.rst:953 msgid "" @@ -1166,6 +1529,14 @@ msgid "" "when used with most C functions. If *size* is ``NULL`` and the :c:type:" "`wchar_t*` string contains null characters a :exc:`ValueError` is raised." msgstr "" +"Convierte el objeto Unicode en una cadena de caracteres ancha. La cadena de " +"salida siempre termina con un carácter nulo. Si *size* no es ``NULL``, " +"escribe el número de caracteres anchos (excluyendo el carácter de " +"terminación nulo final) en *\\*size*. Tenga en cuenta que la cadena " +"resultante :c:type:`wchar_t` podría contener caracteres nulos, lo que " +"provocaría que la cadena se truncara cuando se usara con la mayoría de las " +"funciones de C. Si *size* es ``NULL`` y la cadena :c:type:`wchar_t*` " +"contiene caracteres nulos un :exc:`ValueError` aparece." #: ../Doc/c-api/unicode.rst:961 msgid "" @@ -1174,22 +1545,31 @@ msgid "" "\\*size* is undefined. Raises a :exc:`MemoryError` if memory allocation is " "failed." msgstr "" +"Retorna un búfer asignado por :c:func:`PyMem_Alloc` (utilice :c:func:" +"`PyMem_Free` para liberarlo) en caso de éxito. En caso de error, retorna " +"``NULL`` y *\\*size* no está definido. Provoca un :exc:`MemoryError` si " +"falla la asignación de memoria." #: ../Doc/c-api/unicode.rst:968 msgid "" "Raises a :exc:`ValueError` if *size* is ``NULL`` and the :c:type:`wchar_t*` " "string contains null characters." msgstr "" +"Provoca un :exc:`ValueError` si *size* es ``NULL`` y la cadena :c:type:" +"`wchar_t*` contiene caracteres nulos." #: ../Doc/c-api/unicode.rst:976 msgid "Built-in Codecs" -msgstr "" +msgstr "Códecs incorporados" #: ../Doc/c-api/unicode.rst:978 msgid "" "Python provides a set of built-in codecs which are written in C for speed. " "All of these codecs are directly usable via the following functions." msgstr "" +"Python proporciona un conjunto de códecs integrados que están escritos en C " +"para mayor velocidad. Todos estos códecs se pueden usar directamente a " +"través de las siguientes funciones." #: ../Doc/c-api/unicode.rst:981 msgid "" @@ -1197,6 +1577,9 @@ msgid "" "have the same semantics as the ones of the built-in :func:`str` string " "object constructor." msgstr "" +"Muchas de las siguientes API toman dos argumentos de *encoding* y *errors*, " +"y tienen la misma semántica que las del constructor de objetos de cadena " +"incorporado :func:`str`." #: ../Doc/c-api/unicode.rst:985 msgid "" @@ -1208,6 +1591,14 @@ msgid "" "others, it will change at run-time (such as when the application invokes " "setlocale)." msgstr "" +"Establecer la codificación en ``NULL`` hace que se use la codificación " +"predeterminada, que es ASCII. Las llamadas al sistema de archivos deben " +"usar :c:func:`PyUnicode_FSConverter` para codificar nombres de archivos. " +"Esto utiliza la variable :c:data:`Py_FileSystemDefaultEncoding` " +"internamente. Esta variable debe tratarse como de solo lectura: en algunos " +"sistemas, será un puntero a una cadena de caracteres estática, en otros, " +"cambiará en tiempo de ejecución (como cuando la aplicación invoca " +"*setlocale*)." #: ../Doc/c-api/unicode.rst:993 msgid "" @@ -1215,20 +1606,26 @@ msgid "" "use the default handling defined for the codec. Default error handling for " "all built-in codecs is \"strict\" (:exc:`ValueError` is raised)." msgstr "" +"El manejo de errores se establece mediante *errors* que también pueden " +"establecerse en ``NULL``, lo que significa usar el manejo predeterminado " +"definido para el códec. El manejo de errores predeterminado para todos los " +"códecs integrados es \"estricto\" (se lanza :exc:`ValueError`)." #: ../Doc/c-api/unicode.rst:997 msgid "" "The codecs all use a similar interface. Only deviation from the following " "generic ones are documented for simplicity." msgstr "" +"Todos los códecs usan una interfaz similar. Solo la desviación de las " +"siguientes genéricas se documenta por simplicidad." #: ../Doc/c-api/unicode.rst:1002 msgid "Generic Codecs" -msgstr "" +msgstr "Códecs genéricos" #: ../Doc/c-api/unicode.rst:1004 msgid "These are the generic codec APIs:" -msgstr "" +msgstr "Estas son las APIs de códecs genéricos:" #: ../Doc/c-api/unicode.rst:1010 msgid "" @@ -1238,6 +1635,11 @@ msgid "" "up using the Python codec registry. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena codificada " +"*s*. *encoding* y *errors* tienen el mismo significado que los parámetros " +"del mismo nombre en la función incorporada :func:`str`. El códec que se " +"utilizará se busca utilizando el registro de códec Python. Retorna ``NULL`` " +"si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1020 msgid "" @@ -1247,6 +1649,11 @@ msgid "" "looked up using the Python codec registry. Return ``NULL`` if an exception " "was raised by the codec." msgstr "" +"Codifica un objeto Unicode y retorna el resultado como un objeto de bytes de " +"Python. *encoding* y *errors* tienen el mismo significado que los parámetros " +"del mismo nombre en el método Unicode :meth:`~str.encode`. El códec que se " +"utilizará se busca utilizando el registro de códec Python. Retorna ``NULL`` " +"si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1030 msgid "" @@ -1256,26 +1663,35 @@ msgid "" "codec to be used is looked up using the Python codec registry. Return " "``NULL`` if an exception was raised by the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` *s* del tamaño *size* dado y devuelve " +"un objeto de bytes de Python. *encoding* y *errors* tienen el mismo " +"significado que los parámetros del mismo nombre en el método Unicode :meth:" +"`~str.encode`. El códec que se utilizará se busca utilizando el registro de " +"códec Python. Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1038 ../Doc/c-api/unicode.rst:1295 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1042 msgid "UTF-8 Codecs" -msgstr "" +msgstr "Códecs UTF-8" #: ../Doc/c-api/unicode.rst:1044 msgid "These are the UTF-8 codec APIs:" -msgstr "" +msgstr "Estas son las APIs del códec UTF-8:" #: ../Doc/c-api/unicode.rst:1049 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena codificada " +"UTF-8 *s*. Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1056 msgid "" @@ -1284,6 +1700,10 @@ msgid "" "not be treated as an error. Those bytes will not be decoded and the number " "of bytes that have been decoded will be stored in *consumed*." msgstr "" +"Si *consumed* es ``NULL``, se comporta como :c:func:`PyUnicode_DecodeUTF8`. " +"Si *consumed* no es ``NULL``, las secuencias de bytes UTF-8 incompletas no " +"se tratarán como un error. Esos bytes no serán decodificados y la cantidad " +"de bytes que han sido decodificados se almacenará en *consumed*." #: ../Doc/c-api/unicode.rst:1064 msgid "" @@ -1291,6 +1711,9 @@ msgid "" "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica un objeto Unicode usando UTF-8 y retorna el resultado como un " +"objeto de bytes de Python. El manejo de errores es \"estricto\". Retorna " +"``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1071 msgid "" @@ -1300,12 +1723,19 @@ msgid "" "buffer always has an extra null byte appended (not included in *size*), " "regardless of whether there are any other null code points." msgstr "" +"Retorna un puntero a la codificación UTF-8 del objeto Unicode y almacena el " +"tamaño de la representación codificada (en bytes) en *size*. El argumento " +"*size* puede ser ``NULL``; en este caso no se almacenará el tamaño. El búfer " +"retornado siempre tiene un byte nulo adicional agregado (no incluido en " +"*size*), independientemente de si hay otros puntos de código nulo." #: ../Doc/c-api/unicode.rst:1077 msgid "" "In the case of an error, ``NULL`` is returned with an exception set and no " "*size* is stored." msgstr "" +"En caso de error, se retorna ``NULL`` con un conjunto de excepciones y no se " +"almacena *size*." #: ../Doc/c-api/unicode.rst:1080 msgid "" @@ -1313,14 +1743,17 @@ msgid "" "and subsequent calls will return a pointer to the same buffer. The caller " "is not responsible for deallocating the buffer." msgstr "" +"Esto almacena en caché la representación UTF-8 de la cadena en el objeto " +"Unicode, y las llamadas posteriores devolverán un puntero al mismo búfer. La " +"persona que llama no es responsable de desasignar el búfer." #: ../Doc/c-api/unicode.rst:1086 ../Doc/c-api/unicode.rst:1096 msgid "The return type is now ``const char *`` rather of ``char *``." -msgstr "" +msgstr "El tipo de retorno ahora es ``const char *`` en lugar de ``char *``." #: ../Doc/c-api/unicode.rst:1092 msgid "As :c:func:`PyUnicode_AsUTF8AndSize`, but does not store the size." -msgstr "" +msgstr "Como :c:func:`PyUnicode_AsUTF8AndSize`, pero no almacena el tamaño." #: ../Doc/c-api/unicode.rst:1102 msgid "" @@ -1328,6 +1761,9 @@ msgid "" "and return a Python bytes object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` *s* del tamaño *size* dado usando " +"UTF-8 y retorna un objeto de bytes de Python. Retorna ``NULL`` si el códec " +"provocó una excepción." #: ../Doc/c-api/unicode.rst:1109 msgid "" @@ -1335,14 +1771,17 @@ msgid "" "func:`PyUnicode_AsUTF8String`, :c:func:`PyUnicode_AsUTF8AndSize` or :c:func:" "`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsUTF8String`, :c:func:`PyUnicode_AsUTF8AndSize` o :" +"c:func:`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1113 msgid "UTF-32 Codecs" -msgstr "" +msgstr "Códecs UTF-32" #: ../Doc/c-api/unicode.rst:1115 msgid "These are the UTF-32 codec APIs:" -msgstr "" +msgstr "Estas son las APIs de códecs para UTF-32:" #: ../Doc/c-api/unicode.rst:1121 msgid "" @@ -1350,12 +1789,17 @@ msgid "" "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" +"Decodifica *size* bytes de una cadena de búfer codificada UTF-32 y retorna " +"el objeto Unicode correspondiente. *errors* (si no es ``NULL``) define el " +"manejo de errores. Su valor predeterminado es \"estricto\"." #: ../Doc/c-api/unicode.rst:1125 ../Doc/c-api/unicode.rst:1198 msgid "" "If *byteorder* is non-``NULL``, the decoder starts decoding using the given " "byte order::" msgstr "" +"Si *byteorder* no es ``NULL``, el decodificador comienza a decodificar " +"utilizando el orden de bytes dado::" #: ../Doc/c-api/unicode.rst:1132 msgid "" @@ -1364,21 +1808,29 @@ msgid "" "is not copied into the resulting Unicode string. If ``*byteorder`` is " "``-1`` or ``1``, any byte order mark is copied to the output." msgstr "" +"Si ``*byteorder`` es cero, y los primeros cuatro bytes de los datos de " +"entrada son una marca de orden de bytes (BOM), el decodificador cambia a " +"este orden de bytes y la BOM no se copia en la cadena de caracteres Unicode " +"resultante. Si ``*byteorder`` es ``-1`` o ``1``, cualquier marca de orden de " +"bytes se copia en la salida." #: ../Doc/c-api/unicode.rst:1137 ../Doc/c-api/unicode.rst:1211 msgid "" "After completion, *\\*byteorder* is set to the current byte order at the end " "of input data." msgstr "" +"Una vez completado, *\\*byteorder* se establece en el orden de bytes actual " +"al final de los datos de entrada." #: ../Doc/c-api/unicode.rst:1140 ../Doc/c-api/unicode.rst:1214 msgid "If *byteorder* is ``NULL``, the codec starts in native order mode." msgstr "" +"Si *byteorder* es ``NULL``, el códec se inicia en modo de orden nativo." #: ../Doc/c-api/unicode.rst:1142 ../Doc/c-api/unicode.rst:1178 #: ../Doc/c-api/unicode.rst:1216 ../Doc/c-api/unicode.rst:1253 msgid "Return ``NULL`` if an exception was raised by the codec." -msgstr "" +msgstr "Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1148 msgid "" @@ -1388,6 +1840,12 @@ msgid "" "not divisible by four) as an error. Those bytes will not be decoded and the " "number of bytes that have been decoded will be stored in *consumed*." msgstr "" +"Si *consumed* es ``NULL``, se comporta como :c:func:`PyUnicode_DecodeUTF32`. " +"Si *consumed* no es ``NULL``, :c:func:`PyUnicode_DecodeUTF32Stateful` no " +"tratará las secuencias de bytes UTF-32 incompletas finales (como un número " +"de bytes no divisible por cuatro) como un error. Esos bytes no serán " +"decodificados y la cantidad de bytes que han sido decodificados se " +"almacenará en *consumed*." #: ../Doc/c-api/unicode.rst:1157 msgid "" @@ -1395,38 +1853,52 @@ msgid "" "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Retorna una cadena de bytes de Python usando la codificación UTF-32 en orden " +"de bytes nativo. La cadena siempre comienza con una marca BOM. El manejo de " +"errores es \"estricto\". Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1165 msgid "" "Return a Python bytes object holding the UTF-32 encoded value of the Unicode " "data in *s*. Output is written according to the following byte order::" msgstr "" +"Retorna un objeto de bytes de Python que contiene el valor codificado UTF-32 " +"de los datos Unicode en *s*. La salida se escribe de acuerdo con el " +"siguiente orden de bytes:" #: ../Doc/c-api/unicode.rst:1172 ../Doc/c-api/unicode.rst:1246 msgid "" "If byteorder is ``0``, the output string will always start with the Unicode " "BOM mark (U+FEFF). In the other two modes, no BOM mark is prepended." msgstr "" +"Si *byteorder* es ``0``, la cadena de caracteres de salida siempre comenzará " +"con la marca Unicode BOM (U+FEFF). En los otros dos modos, no se antepone " +"ninguna marca BOM." #: ../Doc/c-api/unicode.rst:1175 msgid "" "If ``Py_UNICODE_WIDE`` is not defined, surrogate pairs will be output as a " "single code point." msgstr "" +"Si ``Py_UNICODE_WIDE`` no está definido, los pares sustitutos se mostrarán " +"como un único punto de código." #: ../Doc/c-api/unicode.rst:1182 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUTF32String` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsUTF32String`. o :c:func:" +"`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1186 msgid "UTF-16 Codecs" -msgstr "" +msgstr "Códecs UTF-16" #: ../Doc/c-api/unicode.rst:1188 msgid "These are the UTF-16 codec APIs:" -msgstr "" +msgstr "Estas son las APIs de códecs para UTF-16:" #: ../Doc/c-api/unicode.rst:1194 msgid "" @@ -1434,6 +1906,10 @@ msgid "" "corresponding Unicode object. *errors* (if non-``NULL``) defines the error " "handling. It defaults to \"strict\"." msgstr "" +"Decodifica *size* bytes de una cadena de caracteres de búfer codificada " +"UTF-16 y retorna el objeto Unicode correspondiente. *errors* (si no es " +"``NULL``) define el manejo de errores. Su valor predeterminado es \"estricto" +"\"." #: ../Doc/c-api/unicode.rst:1205 msgid "" @@ -1443,6 +1919,12 @@ msgid "" "``-1`` or ``1``, any byte order mark is copied to the output (where it will " "result in either a ``\\ufeff`` or a ``\\ufffe`` character)." msgstr "" +"Si ``*byteorder`` es cero, y los primeros dos bytes de los datos de entrada " +"son una marca de orden de bytes (BOM), el decodificador cambia a este orden " +"de bytes y la BOM no se copia en la cadena de caracteres Unicode resultante. " +"Si ``*byteorder`` es ``-1`` o ``1``, cualquier marca de orden de bytes se " +"copia en la salida (donde dará como resultado un ``\\ufeff`` o un carácter ``" +"\\ufffe``)." #: ../Doc/c-api/unicode.rst:1222 msgid "" @@ -1453,6 +1935,12 @@ msgid "" "decoded and the number of bytes that have been decoded will be stored in " "*consumed*." msgstr "" +"Si *consumed* es ``NULL``, se comporta como :c:func:`PyUnicode_DecodeUTF16`. " +"Si *consumed* no es ``NULL``, :c:func:`PyUnicode_DecodeUTF16Stateful` no " +"tratará las secuencias de bytes UTF-16 incompletas finales (como un número " +"impar de bytes o un par sustituto dividido) como un error. Esos bytes no " +"serán decodificados y la cantidad de bytes que han sido decodificados se " +"almacenará en *consumed*." #: ../Doc/c-api/unicode.rst:1231 msgid "" @@ -1460,12 +1948,18 @@ msgid "" "The string always starts with a BOM mark. Error handling is \"strict\". " "Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Retorna una cadena de bytes de Python usando la codificación UTF-16 en orden " +"de bytes nativo. La cadena siempre comienza con una marca BOM. El manejo de " +"errores es \"estricto\". Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1239 msgid "" "Return a Python bytes object holding the UTF-16 encoded value of the Unicode " "data in *s*. Output is written according to the following byte order::" msgstr "" +"Retorna un objeto de bytes de Python que contiene el valor codificado UTF-16 " +"de los datos Unicode en *s*. La salida se escribe de acuerdo con el " +"siguiente orden de bytes:" #: ../Doc/c-api/unicode.rst:1249 msgid "" @@ -1473,26 +1967,34 @@ msgid "" "get represented as a surrogate pair. If it is not defined, each :c:type:" "`Py_UNICODE` values is interpreted as a UCS-2 character." msgstr "" +"Si se define ``Py_UNICODE_WIDE``, un solo valor de :c:type:`Py_UNICODE` " +"puede representarse como un par sustituto. Si no está definido, cada uno de " +"los valores :c:type:`Py_UNICODE` se interpreta como un carácter UCS-2." #: ../Doc/c-api/unicode.rst:1257 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUTF16String` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsUTF16String`. o :c:func:" +"`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1261 msgid "UTF-7 Codecs" -msgstr "" +msgstr "Códecs UTF-7" #: ../Doc/c-api/unicode.rst:1263 msgid "These are the UTF-7 codec APIs:" -msgstr "" +msgstr "Estas son las APIs del códec UTF-7:" #: ../Doc/c-api/unicode.rst:1268 msgid "" "Create a Unicode object by decoding *size* bytes of the UTF-7 encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena de caracteres " +"codificada UTF-7 *s*. Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1275 msgid "" @@ -1501,6 +2003,10 @@ msgid "" "not be treated as an error. Those bytes will not be decoded and the number " "of bytes that have been decoded will be stored in *consumed*." msgstr "" +"Si *consumed* es ``NULL``, se comporta como :c:func:`PyUnicode_DecodeUTF7`. " +"Si *consumed* no es ``NULL``, las secciones UTF-7 base-64 incompletas no se " +"tratarán como un error. Esos bytes no serán decodificados y la cantidad de " +"bytes que han sido decodificados se almacenará en *consumed*." #: ../Doc/c-api/unicode.rst:1284 msgid "" @@ -1508,6 +2014,9 @@ msgid "" "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño dado usando UTF-7 y " +"retorna un objeto de bytes de Python. Retorna ``NULL`` si el códec provocó " +"una excepción." #: ../Doc/c-api/unicode.rst:1288 msgid "" @@ -1516,20 +2025,27 @@ msgid "" "nonzero, whitespace will be encoded in base-64. Both are set to zero for " "the Python \"utf-7\" codec." msgstr "" +"Si *base64SetO* no es cero, \"Set O\" (puntuación que no tiene un " +"significado especial) se codificará en base-64. Si *base64WhiteSpace* no es " +"cero, el espacio en blanco se codificará en base-64. Ambos se establecen en " +"cero para el códec Python \"utf-7\"." #: ../Doc/c-api/unicode.rst:1299 msgid "Unicode-Escape Codecs" -msgstr "" +msgstr "Códecs Unicode escapado" #: ../Doc/c-api/unicode.rst:1301 msgid "These are the \"Unicode Escape\" codec APIs:" -msgstr "" +msgstr "Estas son las APIs de códecs para Unicode escapado:" #: ../Doc/c-api/unicode.rst:1307 msgid "" "Create a Unicode object by decoding *size* bytes of the Unicode-Escape " "encoded string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena codificada " +"Unicode escapada (*Unicode-Escape*) *s*. Retorna ``NULL`` si el códec " +"provocó una excepción." #: ../Doc/c-api/unicode.rst:1313 msgid "" @@ -1537,6 +2053,9 @@ msgid "" "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" +"Codifica un objeto Unicode usando Unicode escapado (*Unicode-Escape*) y " +"retorna el resultado como un objeto de bytes. El manejo de errores es " +"\"estricto\". Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1320 msgid "" @@ -1544,26 +2063,35 @@ msgid "" "Escape and return a bytes object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño *size* dado utilizando " +"Unicode escapado y retorna un objeto de bytes. Retorna ``NULL`` si el códec " +"provocó una excepción." #: ../Doc/c-api/unicode.rst:1325 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsUnicodeEscapeString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsUnicodeEscapeString`." #: ../Doc/c-api/unicode.rst:1329 msgid "Raw-Unicode-Escape Codecs" -msgstr "" +msgstr "Códecs para Unicode escapado en bruto" #: ../Doc/c-api/unicode.rst:1331 msgid "These are the \"Raw Unicode Escape\" codec APIs:" msgstr "" +"Estas son las API del códec Unicode escapado en bruto (*Raw Unicode Escape*):" #: ../Doc/c-api/unicode.rst:1337 msgid "" "Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape " "encoded string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena de caracteres " +"codificada Unicode escapada en bruto (*Raw-Unicode-Escape*) *s*. Retorna " +"``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1343 msgid "" @@ -1571,6 +2099,9 @@ msgid "" "bytes object. Error handling is \"strict\". Return ``NULL`` if an " "exception was raised by the codec." msgstr "" +"Codifica un objeto Unicode usando Unicode escapado en bruto (*Raw-Unicode-" +"Escape*) y retorna el resultado como un objeto de bytes. El manejo de " +"errores es \"estricto\". Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1351 msgid "" @@ -1578,6 +2109,9 @@ msgid "" "Escape and return a bytes object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño *size* dado usando Unicode " +"escapado en bruto (*Raw-Unicode-Escape*) y retorna un objeto de bytes. " +"Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1357 msgid "" @@ -1585,22 +2119,31 @@ msgid "" "func:`PyUnicode_AsRawUnicodeEscapeString` or :c:func:" "`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsRawUnicodeEscapeString` o :c:func:" +"`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1361 msgid "Latin-1 Codecs" -msgstr "" +msgstr "Códecs Latin-1" #: ../Doc/c-api/unicode.rst:1363 msgid "" "These are the Latin-1 codec APIs: Latin-1 corresponds to the first 256 " "Unicode ordinals and only these are accepted by the codecs during encoding." msgstr "" +"Estas son las API del códec Latin-1: Latin-1 corresponde a los primeros 256 " +"ordinales Unicode y solo estos son aceptados por los códecs durante la " +"codificación." #: ../Doc/c-api/unicode.rst:1369 msgid "" "Create a Unicode object by decoding *size* bytes of the Latin-1 encoded " "string *s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena de caracteres " +"codificada en latin-1 *s*. Retorna ``NULL`` si el códec provocó una " +"excepción." #: ../Doc/c-api/unicode.rst:1375 msgid "" @@ -1608,6 +2151,9 @@ msgid "" "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica un objeto Unicode usando Latin-1 y devuelva el resultado como un " +"objeto de bytes Python. El manejo de errores es \"estricto\". Retorna " +"``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1382 msgid "" @@ -1615,28 +2161,38 @@ msgid "" "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño *size* dado usando Latin-1 " +"y retorna un objeto de bytes de Python. Retorna ``NULL`` si el códec provocó " +"una excepción." #: ../Doc/c-api/unicode.rst:1389 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsLatin1String` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsLatin1String` o :c:func:" +"`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1393 msgid "ASCII Codecs" -msgstr "" +msgstr "Códecs ASCII" #: ../Doc/c-api/unicode.rst:1395 msgid "" "These are the ASCII codec APIs. Only 7-bit ASCII data is accepted. All " "other codes generate errors." msgstr "" +"Estas son las API del códec ASCII. Solo se aceptan datos ASCII de 7 bits. " +"Todos los demás códigos generan errores." #: ../Doc/c-api/unicode.rst:1401 msgid "" "Create a Unicode object by decoding *size* bytes of the ASCII encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena de caracteres " +"codificada ASCII *s*. Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1407 msgid "" @@ -1644,6 +2200,9 @@ msgid "" "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica un objeto Unicode usando ASCII y retorna el resultado como un " +"objeto de bytes de Python. El manejo de errores es \"estricto\". Retorna " +"``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1414 msgid "" @@ -1651,16 +2210,21 @@ msgid "" "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño *size* dado utilizando " +"ASCII y retorna un objeto de bytes de Python. Retorna ``NULL`` si el códec " +"provocó una excepción." #: ../Doc/c-api/unicode.rst:1421 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsASCIIString` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsASCIIString` o :c:func:`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1425 msgid "Character Map Codecs" -msgstr "" +msgstr "Códecs de mapa de caracteres" #: ../Doc/c-api/unicode.rst:1427 msgid "" @@ -1671,10 +2235,16 @@ msgid "" "the :meth:`__getitem__` mapping interface; dictionaries and sequences work " "well." msgstr "" +"Este códec es especial porque puede usarse para implementar muchos códecs " +"diferentes (y esto es lo que se hizo para obtener la mayoría de los códecs " +"estándar incluidos en el paquete :mod:`encodings`). El códec utiliza mapeo " +"para codificar y decodificar caracteres. Los objetos de mapeo provistos " +"deben soportar la interfaz de mapeo :meth:`__getitem__`; Los diccionarios y " +"las secuencias funcionan bien." #: ../Doc/c-api/unicode.rst:1433 msgid "These are the mapping codec APIs:" -msgstr "" +msgstr "Estos son las API de códec de mapeo:" #: ../Doc/c-api/unicode.rst:1438 msgid "" @@ -1682,6 +2252,9 @@ msgid "" "using the given *mapping* object. Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena de caracteres " +"codificada *s* usando el objeto *mapping* dado. Retorna ``NULL`` si el códec " +"provocó una excepción." #: ../Doc/c-api/unicode.rst:1442 msgid "" @@ -1692,6 +2265,13 @@ msgid "" "well as ones which get mapped to ``None``, ``0xFFFE`` or ``'\\ufffe'``, are " "treated as undefined mappings and cause an error." msgstr "" +"Si *mapping* es ``NULL``, se aplicará la decodificación Latin-1. De lo " +"contrario, *mapping* debe asignar bytes ordinales (enteros en el rango de 0 " +"a 255) a cadenas de caracteres Unicode, enteros (que luego se interpretan " +"como ordinales Unicode) o ``None``. Los bytes de datos sin asignar - los que " +"causan un :exc:`LookupError`, así como los que se asignan a ``None``, " +"``0xFFFE`` o ``'\\ ufffe'``, se tratan como asignaciones indefinidas y " +"causan un error" #: ../Doc/c-api/unicode.rst:1453 msgid "" @@ -1699,6 +2279,9 @@ msgid "" "result as a bytes object. Error handling is \"strict\". Return ``NULL`` if " "an exception was raised by the codec." msgstr "" +"Codifica un objeto Unicode usando el objeto *mapping* dado y retorna el " +"resultado como un objeto de bytes. El manejo de errores es \"estricto\". " +"Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1457 msgid "" @@ -1707,6 +2290,11 @@ msgid "" "ordinals (ones which cause a :exc:`LookupError`) as well as mapped to " "``None`` are treated as \"undefined mapping\" and cause an error." msgstr "" +"El objeto *mapping* debe asignar enteros ordinales Unicode a objetos de " +"bytes, enteros en el rango de 0 a 255 o ``None``. Los ordinales de " +"caracteres no asignados (los que causan un :exc:`LookupError`), así como los " +"asignados a ``Ninguno``, se tratan como \"mapeo indefinido\" y causan un " +"error." #: ../Doc/c-api/unicode.rst:1466 msgid "" @@ -1714,16 +2302,22 @@ msgid "" "*mapping* object and return the result as a bytes object. Return ``NULL`` " "if an exception was raised by the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño *size* dado utilizando el " +"objeto *mapping* dado y retorna el resultado como un objeto de bytes. " +"Devuelve ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1473 msgid "" "Part of the old-style :c:type:`Py_UNICODE` API; please migrate to using :c:" "func:`PyUnicode_AsCharmapString` or :c:func:`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_AsCharmapString` o :c:func:" +"`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1476 msgid "The following codec API is special in that maps Unicode to Unicode." -msgstr "" +msgstr "La siguiente API de códec es especial en que asigna Unicode a Unicode." #: ../Doc/c-api/unicode.rst:1481 msgid "" @@ -1731,6 +2325,9 @@ msgid "" "resulting Unicode object. Return ``NULL`` if an exception was raised by the " "codec." msgstr "" +"Traduce un objeto Unicode utilizando el objeto *mapping* dado y devuelva el " +"objeto Unicode resultante. Retorna ``NULL`` si el códec provocó una " +"excepción." #: ../Doc/c-api/unicode.rst:1485 msgid "" @@ -1739,6 +2336,11 @@ msgid "" "(causing deletion of the character). Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" +"El objeto *mapping* debe asignar enteros ordinales Unicode a cadenas de " +"caracteres Unicode, enteros (que luego se interpretan como ordinales " +"Unicode) o ``None`` (causando la eliminación del carácter). Los ordinales de " +"caracteres no asignados (los que causan un :exc:`LookupError`) se dejan " +"intactos y se copian tal cual." #: ../Doc/c-api/unicode.rst:1494 msgid "" @@ -1746,6 +2348,9 @@ msgid "" "character *mapping* table to it and return the resulting Unicode object. " "Return ``NULL`` when an exception was raised by the codec." msgstr "" +"Traduce un búfer :c:type:`Py_UNICODE` del tamaño *size* dado al aplicarle " +"una tabla de *mapping* de caracteres y devolver el objeto Unicode " +"resultante. Devuelve ``NULL`` cuando el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1501 msgid "" @@ -1753,10 +2358,13 @@ msgid "" "func:`PyUnicode_Translate`. or :ref:`generic codec based API `" msgstr "" +"Parte del viejo estilo de la API :c:type:`Py_UNICODE`; por favor migrar para " +"usar :c:func:`PyUnicode_Translate`. o :ref:`generic codec based API `" #: ../Doc/c-api/unicode.rst:1505 msgid "MBCS codecs for Windows" -msgstr "" +msgstr "Códecs MBCS para Windows" #: ../Doc/c-api/unicode.rst:1507 msgid "" @@ -1765,12 +2373,19 @@ msgid "" "MBCS (or DBCS) is a class of encodings, not just one. The target encoding " "is defined by the user settings on the machine running the codec." msgstr "" +"Estas son las API de códec MBCS. Actualmente solo están disponibles en " +"Windows y utilizan los convertidores Win32 MBCS para implementar las " +"conversiones. Tenga en cuenta que MBCS (o DBCS) es una clase de " +"codificaciones, no solo una. La codificación de destino está definida por la " +"configuración del usuario en la máquina que ejecuta el códec." #: ../Doc/c-api/unicode.rst:1514 msgid "" "Create a Unicode object by decoding *size* bytes of the MBCS encoded string " "*s*. Return ``NULL`` if an exception was raised by the codec." msgstr "" +"Crea un objeto Unicode decodificando *size* bytes de la cadena de caracteres " +"codificada con MBCS *s*. Retorna ``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1521 msgid "" @@ -1779,6 +2394,10 @@ msgid "" "decode trailing lead byte and the number of bytes that have been decoded " "will be stored in *consumed*." msgstr "" +"Si *consumed* es ``NULL``, se comporta como :c:func:`PyUnicode_DecodeMBCS`. " +"Si *consumed* no es ``NULL``, :c:func:`PyUnicode_DecodeMBCSStateful` no " +"decodificará el byte inicial y el número de bytes que se han decodificado se " +"almacenará en *consumed*." #: ../Doc/c-api/unicode.rst:1529 msgid "" @@ -1786,6 +2405,9 @@ msgid "" "object. Error handling is \"strict\". Return ``NULL`` if an exception was " "raised by the codec." msgstr "" +"Codifica un objeto Unicode usando MBCS y devuelva el resultado como un " +"objeto de bytes de Python. El manejo de errores es \"estricto\". Retorna " +"``NULL`` si el códec provocó una excepción." #: ../Doc/c-api/unicode.rst:1536 msgid "" @@ -1793,6 +2415,10 @@ msgid "" "bytes object. Return ``NULL`` if an exception was raised by the codec. Use :" "c:data:`CP_ACP` code page to get the MBCS encoder." msgstr "" +"Codifica el objeto Unicode utilizando la página de códigos especificada y " +"devuelva un objeto de bytes de Python. Retorna ``NULL`` si el códec provocó " +"una excepción. Use la página de códigos :c:data:`CP_ACP` para obtener el " +"codificador MBCS." #: ../Doc/c-api/unicode.rst:1545 msgid "" @@ -1800,6 +2426,9 @@ msgid "" "return a Python bytes object. Return ``NULL`` if an exception was raised by " "the codec." msgstr "" +"Codifica el búfer :c:type:`Py_UNICODE` del tamaño *size* dado usando MBCS y " +"retorna un objeto de bytes de Python. Retorna ``NULL`` si el códec provocó " +"una excepción." #: ../Doc/c-api/unicode.rst:1552 msgid "" @@ -1807,14 +2436,17 @@ msgid "" "func:`PyUnicode_AsMBCSString`, :c:func:`PyUnicode_EncodeCodePage` or :c:func:" "`PyUnicode_AsEncodedString`." msgstr "" +"Parte del viejo estilo :c:type:`Py_UNICODE` de la API; por favor migrar a :c:" +"func:`PyUnicode_AsMBCSString`, :c:func:`PyUnicode_EncodeCodePage` o :c:func:" +"`PyUnicode_AsEncodedString`." #: ../Doc/c-api/unicode.rst:1556 msgid "Methods & Slots" -msgstr "" +msgstr "Métodos & Ranuras (*Slots*)" #: ../Doc/c-api/unicode.rst:1562 msgid "Methods and Slot Functions" -msgstr "" +msgstr "Métodos y funciones de ranura (*Slot*)" #: ../Doc/c-api/unicode.rst:1564 msgid "" @@ -1822,14 +2454,18 @@ msgid "" "input (we refer to them as strings in the descriptions) and return Unicode " "objects or integers as appropriate." msgstr "" +"Las siguientes API son capaces de manejar objetos Unicode y cadenas de " +"caracteres en la entrada (nos referimos a ellos como cadenas de caracteres " +"en las descripciones) y retorna objetos Unicode o enteros según corresponda." #: ../Doc/c-api/unicode.rst:1568 msgid "They all return ``NULL`` or ``-1`` if an exception occurs." -msgstr "" +msgstr "Todos devuelven ``NULL`` o ``-1`` si ocurre una excepción." #: ../Doc/c-api/unicode.rst:1573 msgid "Concat two strings giving a new Unicode string." msgstr "" +"Une dos cadenas de caracteres que dan una nueva cadena de caracteres Unicode." #: ../Doc/c-api/unicode.rst:1578 msgid "" @@ -1839,6 +2475,12 @@ msgid "" "negative, no limit is set. Separators are not included in the resulting " "list." msgstr "" +"Divide una cadena de caracteres dando una lista de cadenas de caracteres " +"Unicode. Si *sep* es ``NULL``, la división se realizará en todas las " +"subcadenas de espacios en blanco. De lo contrario, las divisiones ocurren en " +"el separador dado. A lo sumo se realizarán *maxsplit* divisiones. Si es " +"negativo, no se establece ningún límite. Los separadores no están incluidos " +"en la lista resultante." #: ../Doc/c-api/unicode.rst:1586 msgid "" @@ -1846,18 +2488,26 @@ msgid "" "CRLF is considered to be one line break. If *keepend* is ``0``, the Line " "break characters are not included in the resulting strings." msgstr "" +"Divide una cadena de caracteres Unicode en los saltos de línea, retornando " +"una lista de cadenas de caracteres Unicode. CRLF se considera un salto de " +"línea. Si *keepend* es ``0``, los caracteres de salto de línea no se " +"incluyen en las cadenas de caracteres resultantes." #: ../Doc/c-api/unicode.rst:1594 msgid "" "Translate a string by applying a character mapping table to it and return " "the resulting Unicode object." msgstr "" +"Traduce una cadena de caracteres aplicando una tabla de mapeo de caracteres " +"y devuelva el objeto Unicode resultante." #: ../Doc/c-api/unicode.rst:1597 msgid "" "The mapping table must map Unicode ordinal integers to Unicode ordinal " "integers or ``None`` (causing deletion of the character)." msgstr "" +"La tabla de mapeo debe mapear enteros ordinales Unicode a enteros ordinales " +"Unicode o ``None`` (causando la eliminación del carácter)." #: ../Doc/c-api/unicode.rst:1600 msgid "" @@ -1865,18 +2515,26 @@ msgid "" "dictionaries and sequences work well. Unmapped character ordinals (ones " "which cause a :exc:`LookupError`) are left untouched and are copied as-is." msgstr "" +"Las tablas de mapeo solo necesitan proporcionar la interfaz :meth:" +"`__getitem__`; Los diccionarios y las secuencias funcionan bien. Los " +"ordinales de caracteres no asignados (los que causan un :exc:`LookupError`) " +"se dejan intactos y se copian tal cual." #: ../Doc/c-api/unicode.rst:1604 msgid "" "*errors* has the usual meaning for codecs. It may be ``NULL`` which " "indicates to use the default error handling." msgstr "" +"*errors* tiene el significado habitual para los códecs. Puede ser ``NULL``, " +"lo que indica que debe usar el manejo de errores predeterminado." #: ../Doc/c-api/unicode.rst:1610 msgid "" "Join a sequence of strings using the given *separator* and return the " "resulting Unicode string." msgstr "" +"Une una secuencia de cadenas de caracteres usando el *separator* dado y " +"retorna la cadena de caracteres Unicode resultante." #: ../Doc/c-api/unicode.rst:1617 msgid "" @@ -1884,6 +2542,10 @@ msgid "" "(*direction* == ``-1`` means to do a prefix match, *direction* == ``1`` a " "suffix match), ``0`` otherwise. Return ``-1`` if an error occurred." msgstr "" +"Retorna ``1`` si *substr* coincide con ``str[start:end]`` en el final de " +"cola dado (*direction* == ``-1`` significa hacer una coincidencia de " +"prefijo, *direction* == ``1`` una coincidencia de sufijo), ``0`` de lo " +"contrario. Devuelva ``-1`` si ocurrió un error." #: ../Doc/c-api/unicode.rst:1625 msgid "" @@ -1893,6 +2555,12 @@ msgid "" "match; a value of ``-1`` indicates that no match was found, and ``-2`` " "indicates that an error occurred and an exception has been set." msgstr "" +"Retorna la primera posición de *substr* en ``str[start:end]`` usando la " +"*direction* dada (*direction* == ``1`` significa hacer una búsqueda hacia " +"adelante, *direction* == ``-1`` una búsqueda hacia atrás). El valor de " +"retorno es el índice de la primera coincidencia; un valor de ``-1`` indica " +"que no se encontró ninguna coincidencia, y ``-2`` indica que se produjo un " +"error y se ha establecido una excepción." #: ../Doc/c-api/unicode.rst:1635 msgid "" @@ -1902,16 +2570,26 @@ msgid "" "the first match; a value of ``-1`` indicates that no match was found, and " "``-2`` indicates that an error occurred and an exception has been set." msgstr "" +"Retorna la primera posición del carácter *ch* en ``str[inicio:fin]`` usando " +"la *direction* dada (*direction* == ``1`` significa hacer una búsqueda hacia " +"adelante, *direction* == ``-1`` una búsqueda hacia atrás). El valor de " +"retorno es el índice de la primera coincidencia; un valor de ``-1`` indica " +"que no se encontró ninguna coincidencia, y ``-2`` indica que se produjo un " +"error y se ha establecido una excepción." #: ../Doc/c-api/unicode.rst:1643 msgid "*start* and *end* are now adjusted to behave like ``str[start:end]``." msgstr "" +"*start* y *end* ahora están ajustados para comportarse como ``str[start:" +"end]``." #: ../Doc/c-api/unicode.rst:1650 msgid "" "Return the number of non-overlapping occurrences of *substr* in ``str[start:" "end]``. Return ``-1`` if an error occurred." msgstr "" +"Retorna el número de ocurrencias no superpuestas de *substr* en ``str[start:" +"end]``. Retorna ``-1`` si ocurrió un error." #: ../Doc/c-api/unicode.rst:1657 msgid "" @@ -1919,18 +2597,25 @@ msgid "" "and return the resulting Unicode object. *maxcount* == ``-1`` means replace " "all occurrences." msgstr "" +"Reemplaza como máximo *maxcount* ocurrencias de *substr* en *str* con " +"*replstr* y retorna el objeto Unicode resultante. *maxcount* == ``-1`` " +"significa reemplazar todas las ocurrencias." #: ../Doc/c-api/unicode.rst:1664 msgid "" "Compare two strings and return ``-1``, ``0``, ``1`` for less than, equal, " "and greater than, respectively." msgstr "" +"Compara dos cadenas de caracteres y devuelve ``-1``, ``0``, ``1`` para menor " +"que, igual y mayor que, respectivamente." #: ../Doc/c-api/unicode.rst:1667 msgid "" "This function returns ``-1`` upon failure, so one should call :c:func:" "`PyErr_Occurred` to check for errors." msgstr "" +"Esta función devuelve ``-1`` en caso de falla, por lo que se debe llamar a :" +"c:func:`PyErr_Occurred` para verificar si hay errores." #: ../Doc/c-api/unicode.rst:1673 msgid "" @@ -1939,50 +2624,65 @@ msgid "" "pass only ASCII-encoded strings, but the function interprets the input " "string as ISO-8859-1 if it contains non-ASCII characters." msgstr "" +"Compare un objeto Unicode, *uni*, con *string* y retorna ``-1``, ``0``, " +"``1`` para menor que, igual y mayor que, respectivamente. Es mejor pasar " +"solo cadenas de caracteres codificadas en ASCII, pero la función interpreta " +"la cadena de entrada como ISO-8859-1 si contiene caracteres no ASCII." #: ../Doc/c-api/unicode.rst:1678 msgid "This function does not raise exceptions." -msgstr "" +msgstr "Esta función no genera excepciones." #: ../Doc/c-api/unicode.rst:1683 msgid "Rich compare two Unicode strings and return one of the following:" msgstr "" +"Comparación enriquecida de dos cadenas de caracteres Unicode y devuelve uno " +"de los siguientes:" #: ../Doc/c-api/unicode.rst:1685 msgid "``NULL`` in case an exception was raised" -msgstr "" +msgstr "``NULL`` en caso de que se produzca una excepción" #: ../Doc/c-api/unicode.rst:1686 msgid ":const:`Py_True` or :const:`Py_False` for successful comparisons" -msgstr "" +msgstr ":const:`Py_True` o :const:`Py_False` para comparaciones exitosas" #: ../Doc/c-api/unicode.rst:1687 msgid ":const:`Py_NotImplemented` in case the type combination is unknown" msgstr "" +":const:`Py_NotImplemented` en caso que se desconozca la combinación de tipos." #: ../Doc/c-api/unicode.rst:1689 msgid "" "Possible values for *op* are :const:`Py_GT`, :const:`Py_GE`, :const:" "`Py_EQ`, :const:`Py_NE`, :const:`Py_LT`, and :const:`Py_LE`." msgstr "" +"Los posibles valores para *op* son :const:`Py_GT`, :const:`Py_GE`, :const:" +"`Py_EQ`, :const:`Py_NE`, :const:`Py_LT`, y :const:`Py_LE`." #: ../Doc/c-api/unicode.rst:1695 msgid "" "Return a new string object from *format* and *args*; this is analogous to " "``format % args``." msgstr "" +"Retorna un nuevo objeto de cadena de caracteres desde *format* y *args*; " +"esto es análogo al ``format % args``." #: ../Doc/c-api/unicode.rst:1701 msgid "" "Check whether *element* is contained in *container* and return true or false " "accordingly." msgstr "" +"Comprueba si *element* está contenido en *container* y retorna verdadero o " +"falso en consecuencia." #: ../Doc/c-api/unicode.rst:1704 msgid "" "*element* has to coerce to a one element Unicode string. ``-1`` is returned " "if there was an error." msgstr "" +"*element* tiene que convertir a una cadena de caracteres Unicode. Se retorna " +"``-1`` si hubo un error." #: ../Doc/c-api/unicode.rst:1710 msgid "" @@ -1996,6 +2696,17 @@ msgid "" "reference counts, think of this function as reference-count-neutral; you own " "the object after the call if and only if you owned it before the call.)" msgstr "" +"Interna el argumento *\\*string* en su lugar. El argumento debe ser la " +"dirección de una variable de puntero que apunta a un objeto Unicode de " +"cadena de caracteres Python. Si hay una cadena de caracteres interna " +"existente que es igual a *\\*string*, establece *\\*string* (disminuyendo el " +"recuento de referencias del objeto de cadena de caracteres anterior e " +"incrementando el recuento de referencias del objeto de cadena de caracteres " +"interna), de lo contrario deja solo *\\*string* y lo interna (incrementando " +"su recuento de referencias). (Aclaración: a pesar de que se habla mucho " +"sobre el recuento de referencias, piense en esta función como neutral de " +"recuento de referencia; usted es el propietario del objeto después de la " +"llamada si y solo si lo tenía antes de la llamada)." #: ../Doc/c-api/unicode.rst:1723 msgid "" @@ -2004,3 +2715,8 @@ msgid "" "has been interned, or a new (\"owned\") reference to an earlier interned " "string object with the same value." msgstr "" +"Una combinación de :c:func:`PyUnicode_FromString` y :c:func:" +"`PyUnicode_InternInPlace`, que retorna un nuevo objeto de cadena de " +"caracteres Unicode que ha sido creado internamente o una nueva " +"referencia(\"propia\") a un objeto de cadena de caracteres interno anterior " +"con el mismo valor" diff --git a/dict b/dict index a65c35649d..38f2413756 100644 --- a/dict +++ b/dict @@ -165,10 +165,12 @@ collector comilla command compilada +conversor +códec +códecs configúrelo computacionalmente consolelib -conversor correlacionan corrutina corrutinas @@ -180,6 +182,11 @@ códec datagramas debugueando default +desasignar +descompresor +deserialización +deserializar +desreferenciar desalojable desambiguar desasigna @@ -207,6 +214,7 @@ enumerador env ésimo especificador +especificadores estáticamente except exclude @@ -218,6 +226,8 @@ flag flags float format +formateador +formateadores fraccional freeze garbage @@ -238,6 +248,7 @@ implementadores import imports imprimible +imprimibles include indentación indentada @@ -272,6 +283,8 @@ iterador iteradores j json +Latin +latin l letter lexicográfica @@ -365,6 +378,7 @@ recursivamente redefinido redefinidos redefinir +redimensionar redimensionado redimensionable redimensionables @@ -418,6 +432,8 @@ strings sub subárbol subárboles +subcadena +subcadenas subcarpetas subcomandos subdirectorio @@ -451,7 +467,10 @@ unices unicode uninstall urllib +utf +UTF vía +Win wchar web widget