diff --git a/dictionaries/library_stdtypes.txt b/dictionaries/library_stdtypes.txt index 51aa7d252f..3711bb408b 100644 --- a/dictionaries/library_stdtypes.txt +++ b/dictionaries/library_stdtypes.txt @@ -1,13 +1,35 @@ -computacionalmente Cardinalidad +Exceeds +Illustrative +Kharosthi +Ll +Lm +Lu cardinalidad +ceil +computacionalmente +conjugate +conversion +digits +dishes +eggs +gt +increase +iteration +juice +languaje +limit +mappingproxy +most +precompilar +precompilarlibrary/stdtypes.po:8461:dishes +recent +sausage +sprintf +squared +subcuadrática subindicando superconjunto superíndices +this unaria -Ll -Lm -Lu -Kharosthi -subcuadrática -precompilar \ No newline at end of file diff --git a/library/stdtypes.po b/library/stdtypes.po index b9c65c09c4..4b53581bad 100755 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -11,15 +11,16 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-11-21 16:38-0300\n" -"PO-Revision-Date: 2024-01-27 18:16+0100\n" -"Last-Translator: José Luis Salgado Banda\n" -"Language: es\n" +"PO-Revision-Date: 2024-11-24 12:43+0100\n" +"Last-Translator: Cristián Maureira-Fredes \n" "Language-Team: python-doc-es\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Generated-By: Babel 2.16.0\n" +"X-Generator: Poedit 3.4.2\n" #: ../Doc/library/stdtypes.rst:8 msgid "Built-in Types" @@ -83,21 +84,19 @@ msgstr "" "más adelante." #: ../Doc/library/stdtypes.rst:46 -#, fuzzy msgid "" "By default, an object is considered true unless its class defines either a :" "meth:`~object.__bool__` method that returns ``False`` or a :meth:`~object." "__len__` method that returns zero, when called with the object. [1]_ Here " "are most of the built-in objects considered false:" msgstr "" -"Por defecto, un objeto se considera verdadero a no ser que su clase defina o " -"bien un método :meth:`__bool__` que retorna ``False`` o un método :meth:" -"`__len__` que retorna cero, cuando se invoque desde ese objeto. [1]_ Aquí " -"están listados la mayoría de los objetos integrados que se evalúan como " -"falsos:" +"De manera predeterminada, un objeto se considera verdadero a menos que su " +"clase defina un método :meth:`~object.__bool__` que devuelva ``False`` o un " +"método :meth:`~object.__len__` que devuelva cero, cuando se llama con el " +"objeto. [1]_ Estos son la mayoría de los objetos integrados que se " +"consideran falsos:" #: ../Doc/library/stdtypes.rst:56 -#, fuzzy msgid "constants defined to be false: ``None`` and ``False``" msgstr "constantes definidas para tener valor falso: ``None`` y ``False``." @@ -165,9 +164,8 @@ msgid "``x or y``" msgstr "``x or y``" #: ../Doc/library/stdtypes.rst:88 -#, fuzzy msgid "if *x* is true, then *x*, else *y*" -msgstr "si *x* es falso, entonces *x*, si no, *y*" +msgstr "si *x* es verdad, entonces *x*, si no, *y*" #: ../Doc/library/stdtypes.rst:88 ../Doc/library/stdtypes.rst:967 #: ../Doc/library/stdtypes.rst:970 ../Doc/library/stdtypes.rst:1181 @@ -385,22 +383,20 @@ msgstr "" "nunca lanzar una excepción." #: ../Doc/library/stdtypes.rst:199 -#, fuzzy msgid "" "Two more operations with the same syntactic priority, :keyword:`in` and :" "keyword:`not in`, are supported by types that are :term:`iterable` or " "implement the :meth:`~object.__contains__` method." msgstr "" -"Hay otras dos operaciones con la misma prioridad sintáctica: :keyword:`in` " -"y :keyword:`not in`, que son soportadas por aquellos tipos de datos que son " -"de tipo :term:`iterable` o que implementen el método :meth:`__contains__`." +"Dos operaciones más con la misma prioridad sintáctica, :keyword:`in` y :" +"keyword:`not in`, son compatibles con tipos que son :term:`iterable` o " +"implementan el método :meth:`~object.__contains__`." #: ../Doc/library/stdtypes.rst:206 msgid "Numeric Types --- :class:`int`, :class:`float`, :class:`complex`" msgstr "Tipos numéricos --- :class:`int`, :class:`float`, :class:`complex`" #: ../Doc/library/stdtypes.rst:216 -#, fuzzy msgid "" "There are three distinct numeric types: :dfn:`integers`, :dfn:`floating-" "point numbers`, and :dfn:`complex numbers`. In addition, Booleans are a " @@ -414,22 +410,21 @@ msgid "" "numeric types :mod:`fractions.Fraction`, for rationals, and :mod:`decimal." "Decimal`, for floating-point numbers with user-definable precision.)" msgstr "" -"Hay tres tipos numéricos distintos: :dfn:`integers`, :dfn:`floating point " -"numbers` y :dfn:`complex numbers`. Además, los booleanos son un subtipo de " -"los enteros. Los enteros tiene precisión ilimitada. Los números en coma " -"flotante se implementan normalmente usando el tipo :c:expr:`double` de C; " -"hay más información sobre la precisión y la representación interna de los " -"números en coma flotante usadas por la máquina sobre la que se ejecuta tu " -"programa en :data:`sys.float_info`. Los números complejos tienen una parte " -"real y otra imaginaria, ambas representadas con números en coma flotante. " -"Para extraer estas partes del número complejo *z* se usan los métodos ``z." -"real`` y ``z.imag``. (La librería estándar incluye tipos numéricos " -"adicionales: :mod:`fractions.Fraction` para números racionales y :mod:" -"`decimal.Decimal` para números en coma flotante con precisión definida por " -"el usuario.)" +"Existen tres tipos numéricos distintos: :dfn:`números enteros`, :dfn:" +"`números de punto flotante` y :dfn:`números complejos`. Además, los " +"booleanos son un subtipo de los números enteros. Los números enteros tienen " +"una precisión ilimitada. Los números de punto flotante se implementan " +"normalmente utilizando :c:expr:`double` en C; la información sobre la " +"precisión y la representación interna de los números de punto flotante para " +"la máquina en la que se ejecuta el programa está disponible en :data:`sys." +"float_info`. Los números complejos tienen una parte real y una imaginaria, " +"que son cada una un número de punto flotante. Para extraer estas partes de " +"un número complejo *z*, utilice ``z.real`` y ``z.imag``. (La biblioteca " +"estándar incluye los tipos numéricos adicionales :mod:`fractions.Fraction`, " +"para números racionales, y :mod:`decimal.Decimal`, para números de punto " +"flotante con precisión definible por el usuario)." #: ../Doc/library/stdtypes.rst:238 -#, fuzzy msgid "" "Numbers are created by numeric literals or as the result of built-in " "functions and operators. Unadorned integer literals (including hex, octal " @@ -439,15 +434,14 @@ msgid "" "with a zero real part) which you can add to an integer or float to get a " "complex number with real and imaginary parts." msgstr "" -"Los números se crean a partir de literales numéricos, o como resultado de " -"una combinación de funciones integradas y operadores. Expresiones literales " -"de números (incluyendo números expresados en hexadecimal, octal o binario) " -"producen enteros. Si la expresión literal contiene un punto decimal o un " -"signo de exponente, se genera un número en coma flotante. Si se añade como " -"sufijo una ``'j'`` o una ``'J'`` a un literal numérico, se genera un número " -"imaginario puro (un número complejo con la parte real a cero), que se puede " -"sumar a un número entero o de coma flotante para obtener un número complejo " -"con parte real e imaginaria." +"Los números se crean mediante literales numéricos o como resultado de " +"funciones y operadores integrados. Los literales enteros sin adornos " +"(incluidos los números hexadecimales, octales y binarios) generan números " +"enteros. Los literales numéricos que contienen un punto decimal o un signo " +"de exponente generan números de punto flotante. Si se añade ``'j'`` o " +"``'J'`` a un literal numérico, se obtiene un número imaginario (un número " +"complejo con una parte real cero) que se puede sumar a un entero o un " +"flotante para obtener un número complejo con partes reales e imaginarias." #: ../Doc/library/stdtypes.rst:263 msgid "" @@ -528,9 +522,8 @@ msgid "floored quotient of *x* and *y*" msgstr "división entera a la baja de *x* entre *y*" #: ../Doc/library/stdtypes.rst:286 -#, fuzzy msgid "\\(1)\\(2)" -msgstr "(1)(2)" +msgstr "\\(1)\\(2)" #: ../Doc/library/stdtypes.rst:289 msgid "``x % y``" @@ -691,15 +684,14 @@ msgstr "" "coma flotante usando la función :func:`abs` si fuera apropiado." #: ../Doc/library/stdtypes.rst:342 -#, fuzzy msgid "" "Conversion from :class:`float` to :class:`int` truncates, discarding the " "fractional part. See functions :func:`math.floor` and :func:`math.ceil` for " "alternative conversions." msgstr "" -"Conversiones desde coma flotante a entero pueden redondearse o truncarse " -"como en C; véanse las funciones :func:`math.floor` y :func:`math.ceil` para " -"un mayor control." +"La conversión de :class:`float` a :class:`int` trunca y descarta la parte " +"fraccionaria. Consulte las funciones :func:`math.floor` y :func:`math.ceil` " +"para conocer conversiones alternativas." #: ../Doc/library/stdtypes.rst:347 msgid "" @@ -728,14 +720,14 @@ msgstr "" "con la propiedad ``Nd``)." #: ../Doc/library/stdtypes.rst:358 -#, fuzzy msgid "" "See `the Unicode Standard `_ for a complete list of code points with the ``Nd`` " "property." msgstr "" -"Véase https://www.unicode.org/Public/14.0.0/ucd/extracted/DerivedNumericType." -"txt para una lista completa de los puntos de código con la propiedad ``Nd``." +"Consulte `the Unicode Standard `_ para obtener una lista completa de puntos de " +"código con la propiedad ``Nd``." #: ../Doc/library/stdtypes.rst:362 msgid "" @@ -948,6 +940,11 @@ msgid "" ">>> n.bit_length()\n" "6" msgstr "" +">>> n = -37\n" +">>> bin(n)\n" +"'-0b100101'\n" +">>> n.bit_length()\n" +"6" #: ../Doc/library/stdtypes.rst:469 msgid "" @@ -976,6 +973,10 @@ msgid "" " s = s.lstrip('-0b') # remove leading zeros and minus sign\n" " return len(s) # len('100101') --> 6" msgstr "" +"def bit_length(self):\n" +" s = bin(self) # binary representation: bin(-37) --> '-0b100101'\n" +" s = s.lstrip('-0b') # remove leading zeros and minus sign\n" +" return len(s) # len('100101') --> 6" #: ../Doc/library/stdtypes.rst:486 msgid "" @@ -996,12 +997,21 @@ msgid "" ">>> (-n).bit_count()\n" "3" msgstr "" +">>> n = 19\n" +">>> bin(n)\n" +"'0b10011'\n" +">>> n.bit_count()\n" +"3\n" +">>> (-n).bit_count()\n" +"3" #: ../Doc/library/stdtypes.rst:500 msgid "" "def bit_count(self):\n" " return bin(self).count(\"1\")" msgstr "" +"def bit_count(self):\n" +" return bin(self).count(\"1\")" #: ../Doc/library/stdtypes.rst:507 msgid "Return an array of bytes representing an integer." @@ -1047,23 +1057,24 @@ msgid "" "The default values can be used to conveniently turn an integer into a single " "byte object::" msgstr "" +"Los valores predeterminados se pueden utilizar para convertir cómodamente un " +"entero en un objeto de un solo byte:" #: ../Doc/library/stdtypes.rst:537 msgid "" ">>> (65).to_bytes()\n" "b'A'" msgstr "" +">>> (65).to_bytes()\n" +"b'A'" #: ../Doc/library/stdtypes.rst:540 -#, fuzzy msgid "" "However, when using the default arguments, don't try to convert a value " "greater than 255 or you'll get an :exc:`OverflowError`." msgstr "" -"Los valores por defecto se pueden usar para convertir convenientemente un " -"número entero en un objeto de un solo byte. Sim embargo, cuando utilices los " -"argumentos predeterminados, no intentes convertir un valor mayor a 255 u " -"obtendrás una excepción :exc:`OverflowError`::" +"Sin embargo, al utilizar los argumentos predeterminados, no intente " +"convertir un valor mayor que 255 o obtendrá un :exc:`OverflowError`." #: ../Doc/library/stdtypes.rst:545 msgid "" @@ -1077,6 +1088,15 @@ msgid "" "\n" " return bytes((n >> i*8) & 0xff for i in order)" msgstr "" +"def to_bytes(n, length=1, byteorder='big', signed=False):\n" +" if byteorder == 'little':\n" +" order = range(length)\n" +" elif byteorder == 'big':\n" +" order = reversed(range(length))\n" +" else:\n" +" raise ValueError(\"byteorder must be either 'little' or 'big'\")\n" +"\n" +" return bytes((n >> i*8) & 0xff for i in order)" #: ../Doc/library/stdtypes.rst:556 msgid "Added default argument values for ``length`` and ``byteorder``." @@ -1137,21 +1157,33 @@ msgid "" "\n" " return n" msgstr "" +"def from_bytes(bytes, byteorder='big', signed=False):\n" +" if byteorder == 'little':\n" +" little_ordered = list(bytes)\n" +" elif byteorder == 'big':\n" +" little_ordered = list(reversed(bytes))\n" +" else:\n" +" raise ValueError(\"byteorder must be either 'little' or 'big'\")\n" +"\n" +" n = sum(b << i*8 for i, b in enumerate(little_ordered))\n" +" if signed and little_ordered and (little_ordered[-1] & 0x80):\n" +" n -= 1 << 8*len(little_ordered)\n" +"\n" +" return n" #: ../Doc/library/stdtypes.rst:604 msgid "Added default argument value for ``byteorder``." msgstr "Se agregó valor de argumento predeterminado para ``byteorder``." #: ../Doc/library/stdtypes.rst:609 -#, fuzzy msgid "" "Return a pair of integers whose ratio is equal to the original integer and " "has a positive denominator. The integer ratio of integers (whole numbers) " "is always the integer as the numerator and ``1`` as the denominator." msgstr "" -"Retorna una pareja de números enteros cuya proporción es igual a la del " -"numero entero original, y con un denominador positivo. En el caso de números " -"enteros, la proporción siempre es el entero en el numerador y ``1`` en el " +"Devuelve un par de números enteros cuyo cociente es igual al entero original " +"y tiene un denominador positivo. El cociente entero de los números enteros " +"(números naturales) es siempre el entero como numerador y ``1`` como " "denominador." #: ../Doc/library/stdtypes.rst:618 @@ -1159,6 +1191,8 @@ msgid "" "Returns ``True``. Exists for duck type compatibility with :meth:`float." "is_integer`." msgstr "" +"Devuelve ``True``. Existe para compatibilidad de tipo pato con :meth:`float." +"is_integer`." #: ../Doc/library/stdtypes.rst:623 msgid "Additional Methods on Float" @@ -1174,17 +1208,15 @@ msgstr "" "Real`. Los números float tienen además los siguientes métodos." #: ../Doc/library/stdtypes.rst:630 -#, fuzzy msgid "" "Return a pair of integers whose ratio is exactly equal to the original " "float. The ratio is in lowest terms and has a positive denominator. Raises :" "exc:`OverflowError` on infinities and a :exc:`ValueError` on NaNs." msgstr "" -"Retorna una pareja de números enteros cuya proporción es exactamente igual " -"que la del valor en punto flotante original, con un denominador positivo. Si " -"se llama con valores infinitos lanza una excepción de tipo :exc:" -"`OverflowError` y si se llama con *NaN* (*Not A Number*) lanza una excepción " -"de tipo :exc:`ValueError`." +"Devuelve un par de números enteros cuyo cociente es exactamente igual al " +"número flotante original. El cociente está en su mínima expresión y tiene un " +"denominador positivo. Genera :exc:`OverflowError` en los números infinitos " +"y :exc:`ValueError` en los números NaN." #: ../Doc/library/stdtypes.rst:637 msgid "" @@ -1201,6 +1233,10 @@ msgid "" ">>> (3.2).is_integer()\n" "False" msgstr "" +">>> (-2.0).is_integer()\n" +"True\n" +">>> (3.2).is_integer()\n" +"False" #: ../Doc/library/stdtypes.rst:645 msgid "" @@ -1252,7 +1288,7 @@ msgstr "Una cadena de caracteres en hexadecimal sigue este formato::" #: ../Doc/library/stdtypes.rst:674 msgid "[sign] ['0x'] integer ['.' fraction] ['p' exponent]" -msgstr "" +msgstr "[sign] ['0x'] integer ['.' fraction] ['p' exponent]" #: ../Doc/library/stdtypes.rst:676 msgid "" @@ -1297,6 +1333,8 @@ msgid "" ">>> float.fromhex('0x3.a7p10')\n" "3740.0" msgstr "" +">>> float.fromhex('0x3.a7p10')\n" +"3740.0" #: ../Doc/library/stdtypes.rst:699 msgid "" @@ -1311,13 +1349,14 @@ msgid "" ">>> float.hex(3740.0)\n" "'0x1.d380000000000p+11'" msgstr "" +">>> float.hex(3740.0)\n" +"'0x1.d380000000000p+11'" #: ../Doc/library/stdtypes.rst:709 msgid "Hashing of numeric types" msgstr "Calculo del *hash* de tipos numéricos" #: ../Doc/library/stdtypes.rst:711 -#, fuzzy msgid "" "For numbers ``x`` and ``y``, possibly of different types, it's a requirement " "that ``hash(x) == hash(y)`` whenever ``x == y`` (see the :meth:`~object." @@ -1332,20 +1371,19 @@ msgid "" "value of ``P`` is made available to Python as the :attr:`~sys.hash_info." "modulus` attribute of :data:`sys.hash_info`." msgstr "" -"Para dos números ``x`` e ``y``, posiblemente de tipos diferentes, se " -"requiere que ``hash(x) == hash(y)`` sea verdadero siempre que ``x == y`` " -"(véase la documentación sobre el método :meth:`~object.__hash__` para más " -"detalles). Por razones tanto de eficiencia como de facilidad de " -"implementación entre los tipos numéricos diferentes (incluyendo :class:" -"`int`, :class:`float`, :class:`decimal.Decimal` y :class:`fractions." -"Fraction`), el método de *hash* de Python se basa en una función matemática " -"sencilla que está definida para cualquier número racional, con lo cual se " -"puede aplicar a todas las instancias de :class:`int` y :class:`fractions." -"Fraction`, y a todas las instancias finitas de :class:`float` y :class:" -"`decimal.Decimal`. En esencia, lo que hace esta función es una reducción " -"módulo ``P`` para un valor fijo del número primo ``P``. El valor de ``P`` " -"está disponible en Python como atributo de :data:`sys.hash_info` con el " -"nombre de :attr:`modulus`." +"Para los números ``x`` y ``y``, posiblemente de tipos diferentes, es un " +"requisito que ``hash(x) == hash(y)`` siempre que ``x == y`` (consulte la " +"documentación del método :meth:`~object.__hash__` para obtener más " +"detalles). Para facilitar la implementación y la eficiencia en una variedad " +"de tipos numéricos (incluidos :class:`int`, :class:`float`, :class:`decimal." +"Decimal` y :class:`fractions.Fraction`), el hash de Python para tipos " +"numéricos se basa en una única función matemática que se define para " +"cualquier número racional y, por lo tanto, se aplica a todas las instancias " +"de :class:`int` y :class:`fractions.Fraction`, y a todas las instancias " +"finitas de :class:`float` y :class:`decimal.Decimal`. Esencialmente, esta " +"función se da por reducción módulo ``P`` para un primo fijo ``P``. El valor " +"de ``P`` se pone a disposición de Python como el atributo :attr:`~sys." +"hash_info.modulus` de :data:`sys.hash_info`." #: ../Doc/library/stdtypes.rst:726 msgid "" @@ -1476,23 +1514,75 @@ msgid "" " hash_value = -2\n" " return hash_value" msgstr "" +"import sys, math\n" +"\n" +"def hash_fraction(m, n):\n" +" \"\"\"Compute the hash of a rational number m / n.\n" +"\n" +" Assumes m and n are integers, with n positive.\n" +" Equivalent to hash(fractions.Fraction(m, n)).\n" +"\n" +" \"\"\"\n" +" P = sys.hash_info.modulus\n" +" # Remove common factors of P. (Unnecessary if m and n already " +"coprime.)\n" +" while m % P == n % P == 0:\n" +" m, n = m // P, n // P\n" +"\n" +" if n % P == 0:\n" +" hash_value = sys.hash_info.inf\n" +" else:\n" +" # Fermat's Little Theorem: pow(n, P-1, P) is 1, so\n" +" # pow(n, P-2, P) gives the inverse of n modulo P.\n" +" hash_value = (abs(m) % P) * pow(n, P - 2, P) % P\n" +" if m < 0:\n" +" hash_value = -hash_value\n" +" if hash_value == -1:\n" +" hash_value = -2\n" +" return hash_value\n" +"\n" +"def hash_float(x):\n" +" \"\"\"Compute the hash of a float x.\"\"\"\n" +"\n" +" if math.isnan(x):\n" +" return object.__hash__(x)\n" +" elif math.isinf(x):\n" +" return sys.hash_info.inf if x > 0 else -sys.hash_info.inf\n" +" else:\n" +" return hash_fraction(*x.as_integer_ratio())\n" +"\n" +"def hash_complex(z):\n" +" \"\"\"Compute the hash of a complex number z.\"\"\"\n" +"\n" +" hash_value = hash_float(z.real) + sys.hash_info.imag * hash_float(z." +"imag)\n" +" # do a signed reduction modulo 2**sys.hash_info.width\n" +" M = 2**(sys.hash_info.width - 1)\n" +" hash_value = (hash_value & (M - 1)) - (hash_value & M)\n" +" if hash_value == -1:\n" +" hash_value = -2\n" +" return hash_value" #: ../Doc/library/stdtypes.rst:812 -#, fuzzy msgid "Boolean Type - :class:`bool`" -msgstr "Tipos mapa --- :class:`dict`" +msgstr "Tipo Booleano --- :class:`bool`" #: ../Doc/library/stdtypes.rst:814 msgid "" "Booleans represent truth values. The :class:`bool` type has exactly two " "constant instances: ``True`` and ``False``." msgstr "" +"Los valores booleanos representan valores de verdad. El tipo :class:`bool` " +"tiene exactamente dos instancias constantes: ``True`` y ``False``." #: ../Doc/library/stdtypes.rst:822 msgid "" "The built-in function :func:`bool` converts any value to a boolean, if the " "value can be interpreted as a truth value (see section :ref:`truth` above)." msgstr "" +"La función incorporada :func:`bool` convierte cualquier valor en un " +"booleano, si el valor puede interpretarse como un valor de verdad (consulte " +"la sección :ref:`truth` más arriba)." #: ../Doc/library/stdtypes.rst:825 msgid "" @@ -1502,12 +1592,19 @@ msgid "" "\"and\", \"or\", \"xor\". However, the logical operators ``and``, ``or`` and " "``!=`` should be preferred over ``&``, ``|`` and ``^``." msgstr "" +"Para operaciones lógicas, utilice :ref:`boolean operators `, " +"``and``, ``or`` y ``not``. Al aplicar los operadores bit a bit ``&``, ``|``, " +"``^`` a dos booleanos, devuelven un booleano equivalente a las operaciones " +"lógicas \"y\", \"o\", \"xor\". Sin embargo, los operadores lógicos ``and``, " +"``or`` y ``!=`` deberían preferirse a ``&``, ``|`` y ``^``." #: ../Doc/library/stdtypes.rst:834 msgid "" "The use of the bitwise inversion operator ``~`` is deprecated and will raise " "an error in Python 3.16." msgstr "" +"El uso del operador de inversión bit a bit ``~`` está obsoleto y generará un " +"error en Python 3.16." #: ../Doc/library/stdtypes.rst:837 msgid "" @@ -1516,6 +1613,11 @@ msgid "" "1, respectively. However, relying on this is discouraged; explicitly convert " "using :func:`int` instead." msgstr "" +":class:`bool` es una subclase de :class:`int` (consulte :ref:" +"`typesnumeric`). En muchos contextos numéricos, ``False`` y ``True`` se " +"comportan como los números enteros 0 y 1, respectivamente. Sin embargo, no " +"se recomienda confiar en esto; realice la conversión explícitamente " +"utilizando :func:`int`." #: ../Doc/library/stdtypes.rst:845 msgid "Iterator Types" @@ -1622,7 +1724,6 @@ msgid "Generator Types" msgstr "Tipos generador" #: ../Doc/library/stdtypes.rst:909 -#, fuzzy msgid "" "Python's :term:`generator`\\s provide a convenient way to implement the " "iterator protocol. If a container object's :meth:`~iterator.__iter__` " @@ -1632,13 +1733,13 @@ msgid "" "generators can be found in :ref:`the documentation for the yield expression " "`." msgstr "" -"Los :term:`generator` de Python proporcionan una manera cómoda de " -"implementar el protocolo iterador. Si un objeto de tipo contenedor " -"implementa el método :meth:`__iter__` como un generador, de forma automática " -"este retornará un objeto iterador (técnicamente, un objeto generador) que " -"implementa los métodos :meth:`__iter__` y :meth:`~generator.__next__`. Se " -"puede obtener más información acerca de los generadores en :ref:`la " -"documentación de la expresión yield `." +"Los :term:`generator` de Python proporcionan una forma conveniente de " +"implementar el protocolo iterador. Si el método :meth:`~iterator.__iter__` " +"de un objeto contenedor se implementa como generador, devolverá " +"automáticamente un objeto iterador (técnicamente, un objeto generador) que " +"suministra los métodos :meth:`!__iter__` y :meth:`~generator.__next__`. " +"Puede encontrar más información sobre los generadores en :ref:`the " +"documentation for the yield expression `." #: ../Doc/library/stdtypes.rst:921 msgid "Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`" @@ -1863,6 +1964,8 @@ msgid "" ">>> \"gg\" in \"eggs\"\n" "True" msgstr "" +">>> \"gg\" in \"eggs\"\n" +"True" #: ../Doc/library/stdtypes.rst:1028 msgid "" @@ -1885,6 +1988,12 @@ msgid "" ">>> lists\n" "[[3], [3], [3]]" msgstr "" +">>> lists = [[]] * 3\n" +">>> lists\n" +"[[], [], []]\n" +">>> lists[0].append(3)\n" +">>> lists\n" +"[[3], [3], [3]]" #: ../Doc/library/stdtypes.rst:1040 msgid "" @@ -1908,6 +2017,12 @@ msgid "" ">>> lists\n" "[[3], [5], [7]]" msgstr "" +">>> lists = [[] for i in range(3)]\n" +">>> lists[0].append(3)\n" +">>> lists[1].append(5)\n" +">>> lists[2].append(7)\n" +">>> lists\n" +"[[3], [5], [7]]" #: ../Doc/library/stdtypes.rst:1052 msgid "" @@ -2216,7 +2331,6 @@ msgid "``s.remove(x)``" msgstr "``s.remove(x)``" #: ../Doc/library/stdtypes.rst:1212 -#, fuzzy msgid "removes the first item from *s* where ``s[i]`` is equal to *x*" msgstr "elimina el primer elemento de *s* tal que ``s[i]`` sea igual a *x*" @@ -2230,13 +2344,12 @@ msgid "reverses the items of *s* in place" msgstr "invierte el orden de los elementos de *s*, a nivel interno" #: ../Doc/library/stdtypes.rst:1224 -#, fuzzy msgid "" "If *k* is not equal to ``1``, *t* must have the same length as the slice it " "is replacing." msgstr "" -"La secuencia *t* debe tener la misma longitud que el segmento a la que " -"reemplaza." +"Si *k* no es igual a ``1``, *t* debe tener la misma longitud que el segmento " +"a la que reemplaza." #: ../Doc/library/stdtypes.rst:1227 msgid "" @@ -2654,6 +2767,20 @@ msgid "" ">>> list(range(1, 0))\n" "[]" msgstr "" +">>> list(range(10))\n" +"[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n" +">>> list(range(1, 11))\n" +"[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" +">>> list(range(0, 30, 5))\n" +"[0, 5, 10, 15, 20, 25]\n" +">>> list(range(0, 10, 3))\n" +"[0, 3, 6, 9]\n" +">>> list(range(0, -10, -1))\n" +"[0, -1, -2, -3, -4, -5, -6, -7, -8, -9]\n" +">>> list(range(0))\n" +"[]\n" +">>> list(range(1, 0))\n" +"[]" #: ../Doc/library/stdtypes.rst:1432 msgid "" @@ -2748,24 +2875,22 @@ msgstr "" "identidad)." #: ../Doc/library/stdtypes.rst:1495 -#, fuzzy msgid "" "Added the :attr:`~range.start`, :attr:`~range.stop` and :attr:`~range.step` " "attributes." msgstr "" -"Los atributos :attr:`~range.start`, :attr:`~range.stop` y :attr:`~range." -"step`." +"Se agregan los atributos :attr:`~range.start`, :attr:`~range.stop` y :attr:" +"`~range.step`." #: ../Doc/library/stdtypes.rst:1500 -#, fuzzy msgid "" "The `linspace recipe `_ shows how to implement a lazy version of range " "suitable for floating-point applications." msgstr "" -"En `linspace recipe `_ se " -"muestra como implementar una versión *lazy* o perezosa de rango adecuada " -"para aplicaciones de coma flotante." +"El `linspace recipe `_ muestra cómo implementar una versión perezosa de " +"rango adecuada para aplicaciones de punto flotante." #: ../Doc/library/stdtypes.rst:1512 msgid "Text Sequence Type --- :class:`str`" @@ -2820,16 +2945,15 @@ msgstr "" "cadena. Esto es, ``(\"spam \" \"eggs\") == \"spam eggs\"``." #: ../Doc/library/stdtypes.rst:1530 -#, fuzzy msgid "" "See :ref:`strings` for more about the various forms of string literal, " "including supported :ref:`escape sequences `, and the " "``r`` (\"raw\") prefix that disables most escape sequence processing." msgstr "" -"Véase :ref:`strings` para más información acerca de las diferentes formas de " -"expresar cadenas de forma literal, incluidos los caracteres de escape, y del " -"prefijo ``r`` (\"*raw*\") que deshabilita el procesamiento de la mayoría de " -"dichas secuencias de escape." +"Consulte :ref:`strings` para obtener más información sobre las distintas " +"formas de literal de cadena, incluido :ref:`escape sequences ` compatible y el prefijo ``r`` (\"sin procesar\") que deshabilita " +"la mayoría del procesamiento de secuencias de escape." #: ../Doc/library/stdtypes.rst:1534 msgid "" @@ -2881,7 +3005,6 @@ msgstr "" "pasados en los parámetros *encoding* y *errors*, como veremos." #: ../Doc/library/stdtypes.rst:1563 -#, fuzzy msgid "" "If neither *encoding* nor *errors* is given, ``str(object)`` returns :meth:" "`type(object).__str__(object) `, which is the \"informal\" " @@ -2890,12 +3013,12 @@ msgid "" "__str__` method, then :func:`str` falls back to returning :func:" "`repr(object) `." msgstr "" -"Si no se especifica ni *encoding* ni *errors*, ``str(object)`` retorna :meth:" -"`type(object).__str__(object) `, que es la representación " -"\"informal\" o mas cómoda de usar, en forma de cadena de caracteres, del " -"valor de *object*. Para una cadena de caracteres, es la cadena en sí. Si " -"*object* no tiene un método :meth:`~object.__str__`, entonces :func:`str` " -"usará como reemplazo el método :meth:`repr(object) `." +"Si no se proporciona ni *encoding* ni *errors*, ``str(object)`` devuelve :" +"meth:`type(object).__str__(object) `, que es la " +"representación de cadena \"informal\" o fácilmente imprimible de *object*. " +"Para los objetos de cadena, se trata de la cadena en sí. Si *object* no " +"tiene un método :meth:`~object.__str__`, entonces :func:`str` vuelve a " +"devolver :func:`repr(object) `." #: ../Doc/library/stdtypes.rst:1575 msgid "" @@ -2937,6 +3060,8 @@ msgid "" ">>> str(b'Zoot!')\n" "\"b'Zoot!'\"" msgstr "" +">>> str(b'Zoot!')\n" +"\"b'Zoot!'\"" #: ../Doc/library/stdtypes.rst:1592 msgid "" @@ -3032,14 +3157,14 @@ msgstr "" "pero el método :meth:`casefold` lo convertirá a ``\"ss\"``." #: ../Doc/library/stdtypes.rst:1644 -#, fuzzy msgid "" "The casefolding algorithm is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -"El algoritmo de normalización a minúsculas se describe en la sección 3.13 " -"del estándar Unicode." +"El algoritmo de plegado de mayúsculas y minúsculas es `described in section " +"3.13 'Default Case Folding' of the Unicode Standard `__." #: ../Doc/library/stdtypes.rst:1653 msgid "" @@ -3068,19 +3193,22 @@ msgid "" "If *sub* is empty, returns the number of empty strings between characters " "which is the length of the string plus one." msgstr "" +"Si *sub* está vacío, devuelve el número de cadenas vacías entre caracteres, " +"que es la longitud de la cadena más uno." #: ../Doc/library/stdtypes.rst:1671 msgid "Return the string encoded to :class:`bytes`." -msgstr "" +msgstr "Devuelve la cadena codificada a :class:`bytes`." #: ../Doc/library/stdtypes.rst:1673 ../Doc/library/stdtypes.rst:2824 msgid "" "*encoding* defaults to ``'utf-8'``; see :ref:`standard-encodings` for " "possible values." msgstr "" +"El valor predeterminado de *encoding* es ``'utf-8'``; consulte :ref:" +"`standard-encodings` para conocer los valores posibles." #: ../Doc/library/stdtypes.rst:1676 -#, fuzzy msgid "" "*errors* controls how encoding errors are handled. If ``'strict'`` (the " "default), a :exc:`UnicodeError` exception is raised. Other possible values " @@ -3088,16 +3216,12 @@ msgid "" "``'backslashreplace'`` and any other name registered via :func:`codecs." "register_error`. See :ref:`error-handlers` for details." msgstr "" -"Retorna una versión codificada en forma de bytes. La codificación por " -"defecto es ``'utf-8'``. El parámetro *errors* permite especificar diferentes " -"esquemas de gestión de errores. El valor por defecto de *errors* es " -"``'strict'``, que significa que cualquier error en la codificación lanza una " -"excepción de tipo :exc:`UnicodeError`. Otros valores posibles son " -"``'ignore'``, ``'replace'``, ``'xmlcharrefreplace'``, ``'backslashreplace'`` " -"y cualquier otro nombre que se haya registrado mediante la función :func:" -"`codecs.register_error`, véase la sección :ref:`error-handlers`. Para una " -"lista de los posibles sistemas de codificación, véase la sección :ref:" -"`standard-encodings`." +"*errors* controla cómo se manejan los errores de codificación. Si se usa " +"``'strict'`` (el valor predeterminado), se genera una excepción :exc:" +"`UnicodeError`. Otros valores posibles son ``'ignore'``, ``'replace'``, " +"``'xmlcharrefreplace'``, ``'backslashreplace'`` y cualquier otro nombre " +"registrado mediante :func:`codecs.register_error`. Consulte :ref:`error-" +"handlers` para obtener más detalles." #: ../Doc/library/stdtypes.rst:1683 msgid "" @@ -3105,19 +3229,21 @@ msgid "" "unless an encoding error actually occurs, :ref:`devmode` is enabled or a :" "ref:`debug build ` is used." msgstr "" +"Por razones de rendimiento, no se verifica la validez del valor de *errors* " +"a menos que realmente se produzca un error de codificación, se habilite :ref:" +"`devmode` o se utilice :ref:`debug build `." #: ../Doc/library/stdtypes.rst:1688 ../Doc/library/stdtypes.rst:2843 msgid "Added support for keyword arguments." msgstr "Añadido soporte para poder usar parámetros por nombre." #: ../Doc/library/stdtypes.rst:1691 ../Doc/library/stdtypes.rst:2846 -#, fuzzy msgid "" "The value of the *errors* argument is now checked in :ref:`devmode` and in :" "ref:`debug mode `." msgstr "" -"El argumento *errors* ahora se verifica en modo de desarrollo y en una :ref:" -"`compilación de depuración `." +"El valor del argumento *errors* ahora se comprueba en :ref:`devmode` y en :" +"ref:`debug mode `." #: ../Doc/library/stdtypes.rst:1698 msgid "" @@ -3187,6 +3313,8 @@ msgid "" ">>> 'Py' in 'Python'\n" "True" msgstr "" +">>> 'Py' in 'Python'\n" +"True" #: ../Doc/library/stdtypes.rst:1743 msgid "" @@ -3272,7 +3400,6 @@ msgstr "" "isdigit()`` o ``c.isnumeric()``." #: ../Doc/library/stdtypes.rst:1804 -#, fuzzy msgid "" "Return ``True`` if all characters in the string are alphabetic and there is " "at least one character, ``False`` otherwise. Alphabetic characters are " @@ -3283,12 +3410,14 @@ msgid "" "of the Unicode Standard `_." msgstr "" -"Retorna ``True`` si todos los caracteres de la cadena son alfabéticos y hay, " -"al menos, un carácter, en caso contrario, retorna ``False``. Los caracteres " -"alfabéticos son aquellos definidos en la base de datos de Unicode como " -"\"Letter\", es decir, aquellos cuya propiedad de categoría general es " -"\"Lm\", \"Lt\", \"Lu\", \"Ll\" o \"Lo\". Nótese que esta definición de " -"\"Alfabético\" es diferente de la que usa el estándar Unicode." +"Devuelve ``True`` si todos los caracteres de la cadena son alfabéticos y hay " +"al menos un carácter, ``False`` en caso contrario. Los caracteres " +"alfabéticos son aquellos caracteres definidos en la base de datos de " +"caracteres Unicode como \"Letra\", es decir, aquellos cuya propiedad de " +"categoría general es \"Lm\", \"Lt\", \"Lu\", \"Ll\" o \"Lo\". Tenga en " +"cuenta que esto es diferente de `Alphabetic property defined in the section " +"4.10 'Letters, Alphabetic, and Ideographic' of the Unicode Standard `_." #: ../Doc/library/stdtypes.rst:1815 msgid "" @@ -3342,14 +3471,12 @@ msgstr "" "acuerdo a la especificación del lenguaje, véase :ref:`identifiers`." #: ../Doc/library/stdtypes.rst:1847 -#, fuzzy msgid "" ":func:`keyword.iskeyword` can be used to test whether string ``s`` is a " "reserved identifier, such as :keyword:`def` and :keyword:`class`." msgstr "" -"Se puede usar la función :func:`keyword.iskeyword` para comprobar si la " -"cadena ``s`` es un identificador reservado, como :keyword:`def` o :keyword:" -"`class`." +":func:`keyword.iskeyword` se puede utilizar para probar si la cadena ``s`` " +"es un identificador reservado, como :keyword:`def` y :keyword:`class`." #: ../Doc/library/stdtypes.rst:1850 msgid "Example: ::" @@ -3364,6 +3491,12 @@ msgid "" ">>> 'def'.isidentifier(), iskeyword('def')\n" "(True, True)" msgstr "" +">>> from keyword import iskeyword\n" +"\n" +">>> 'hello'.isidentifier(), iskeyword('hello')\n" +"(True, False)\n" +">>> 'def'.isidentifier(), iskeyword('def')\n" +"(True, True)" #: ../Doc/library/stdtypes.rst:1863 msgid "" @@ -3486,14 +3619,14 @@ msgstr "" "minúsculas [4]_." #: ../Doc/library/stdtypes.rst:1944 -#, fuzzy msgid "" "The lowercasing algorithm used is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -"El algoritmo usado para la conversión a minúsculas está descrito en la " -"sección 3.13 del estándar Unicode." +"El algoritmo de minúsculas utilizado es `described in section 3.13 'Default " +"Case Folding' of the Unicode Standard `__." #: ../Doc/library/stdtypes.rst:1951 msgid "" @@ -3516,6 +3649,10 @@ msgid "" ">>> 'www.example.com'.lstrip('cmowz.')\n" "'example.com'" msgstr "" +">>> ' spacious '.lstrip()\n" +"'spacious '\n" +">>> 'www.example.com'.lstrip('cmowz.')\n" +"'example.com'" #: ../Doc/library/stdtypes.rst:1961 msgid "" @@ -3533,6 +3670,10 @@ msgid "" ">>> 'Arthur: three!'.removeprefix('Arthur: ')\n" "'three!'" msgstr "" +">>> 'Arthur: three!'.lstrip('Arthur: ')\n" +"'ee!'\n" +">>> 'Arthur: three!'.removeprefix('Arthur: ')\n" +"'three!'" #: ../Doc/library/stdtypes.rst:1972 msgid "" @@ -3595,6 +3736,10 @@ msgid "" ">>> 'BaseTestCase'.removeprefix('Test')\n" "'BaseTestCase'" msgstr "" +">>> 'TestHook'.removeprefix('Test')\n" +"'Hook'\n" +">>> 'BaseTestCase'.removeprefix('Test')\n" +"'BaseTestCase'" #: ../Doc/library/stdtypes.rst:2009 msgid "" @@ -3613,23 +3758,26 @@ msgid "" ">>> 'TmpDirMixin'.removesuffix('Tests')\n" "'TmpDirMixin'" msgstr "" +">>> 'MiscTests'.removesuffix('Tests')\n" +"'Misc'\n" +">>> 'TmpDirMixin'.removesuffix('Tests')\n" +"'TmpDirMixin'" #: ../Doc/library/stdtypes.rst:2023 -#, fuzzy msgid "" "Return a copy of the string with all occurrences of substring *old* replaced " "by *new*. If *count* is given, only the first *count* occurrences are " "replaced. If *count* is not specified or ``-1``, then all occurrences are " "replaced." msgstr "" -"Retorna una copia de la cadena con todas las ocurrencias de la cadena *old* " -"sustituidas por *new*. Si se utiliza el parámetro *count*, solo se cambian " -"las primeras *count* ocurrencias." +"Devuelve una copia de la cadena con todas las ocurrencias de la subcadena " +"*old* reemplazadas por *new*. Si se proporciona *count*, solo se reemplazan " +"las primeras ocurrencias de *count*. Si no se especifica *count* o ``-1``, " +"se reemplazan todas las ocurrencias." #: ../Doc/library/stdtypes.rst:2027 -#, fuzzy msgid "*count* is now supported as a keyword argument." -msgstr "El parámetro *delete* se puede ahora especificar por nombre." +msgstr "*count* es ahora soportado como argumento de palabra clave." #: ../Doc/library/stdtypes.rst:2033 msgid "" @@ -3712,6 +3860,10 @@ msgid "" ">>> 'mississippi'.rstrip('ipz')\n" "'mississ'" msgstr "" +">>> ' spacious '.rstrip()\n" +"' spacious'\n" +">>> 'mississippi'.rstrip('ipz')\n" +"'mississ'" #: ../Doc/library/stdtypes.rst:2080 msgid "" @@ -3729,6 +3881,10 @@ msgid "" ">>> 'Monty Python'.removesuffix(' Python')\n" "'Monty'" msgstr "" +">>> 'Monty Python'.rstrip(' Python')\n" +"'M'\n" +">>> 'Monty Python'.removesuffix(' Python')\n" +"'Monty'" #: ../Doc/library/stdtypes.rst:2090 msgid "" @@ -3746,7 +3902,6 @@ msgstr "" "número de divisiones a realizar (se harán todas las que se puedan)." #: ../Doc/library/stdtypes.rst:2096 -#, fuzzy msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty strings (for example, ``'1,,2'.split(',')`` returns " @@ -3755,12 +3910,12 @@ msgid "" "split`). Splitting an empty string with a specified separator returns " "``['']``." msgstr "" -"Si se especifica *sep*, las repeticiones de caracteres delimitadores no se " -"agrupan juntos, sino que se considera que están delimitando cadenas vacías " -"(por ejemplo, ``'1,,2'.split(',')`` retorna ``['1', '', '2']``). El " -"parámetro *sep* puede contener más de un carácter (por ejemplo, ``'1<>2<>3'." -"split('<>')`` retorna ``['1', '2', '3']``). Dividir una cadena vacía con un " -"separador determinado retornará ``['']``." +"Si se proporciona *sep*, los delimitadores consecutivos no se agrupan y se " +"consideran que delimitan cadenas vacías (por ejemplo, ``'1,,2'.split(',')`` " +"devuelve ``['1', '', '2']``). El argumento *sep* puede constar de varios " +"caracteres como un único delimitador (para dividir con varios delimitadores, " +"utilice :func:`re.split`). Dividir una cadena vacía con un separador " +"especificado devuelve ``['']``." #: ../Doc/library/stdtypes.rst:2103 ../Doc/library/stdtypes.rst:2121 #: ../Doc/library/stdtypes.rst:2173 ../Doc/library/stdtypes.rst:2241 @@ -3786,6 +3941,14 @@ msgid "" ">>> '1<>2<>3<4'.split('<>')\n" "['1', '2', '3<4']" msgstr "" +">>> '1,2,3'.split(',')\n" +"['1', '2', '3']\n" +">>> '1,2,3'.split(',', maxsplit=1)\n" +"['1', '2,3']\n" +">>> '1,2,,3,'.split(',')\n" +"['1', '2', '', '3', '']\n" +">>> '1<>2<>3<4'.split('<>')\n" +"['1', '2', '3<4']" #: ../Doc/library/stdtypes.rst:2114 msgid "" @@ -3813,6 +3976,12 @@ msgid "" ">>> ' 1 2 3 '.split()\n" "['1', '2', '3']" msgstr "" +">>> '1 2 3'.split()\n" +"['1', '2', '3']\n" +">>> '1 2 3'.split(maxsplit=1)\n" +"['1', '2 3']\n" +">>> ' 1 2 3 '.split()\n" +"['1', '2', '3']" #: ../Doc/library/stdtypes.rst:2136 msgid "" @@ -3941,6 +4110,10 @@ msgid "" ">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" "['ab c\\n', '\\n', 'de fg\\r', 'kl\\r\\n']" msgstr "" +">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" +"['ab c', '', 'de fg', 'kl']\n" +">>> 'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" +"['ab c\\n', '\\n', 'de fg\\r', 'kl\\r\\n']" #: ../Doc/library/stdtypes.rst:2180 msgid "" @@ -3959,6 +4132,10 @@ msgid "" ">>> \"One line\\n\".splitlines()\n" "['One line']" msgstr "" +">>> \"\".splitlines()\n" +"[]\n" +">>> \"One line\\n\".splitlines()\n" +"['One line']" #: ../Doc/library/stdtypes.rst:2189 msgid "For comparison, ``split('\\n')`` gives::" @@ -3971,6 +4148,10 @@ msgid "" ">>> 'Two lines\\n'.split('\\n')\n" "['Two lines', '']" msgstr "" +">>> ''.split('\\n')\n" +"['']\n" +">>> 'Two lines\\n'.split('\\n')\n" +"['Two lines', '']" #: ../Doc/library/stdtypes.rst:2199 msgid "" @@ -4007,6 +4188,10 @@ msgid "" ">>> 'www.example.com'.strip('cmowz.')\n" "'example'" msgstr "" +">>> ' spacious '.strip()\n" +"'spacious'\n" +">>> 'www.example.com'.strip('cmowz.')\n" +"'example'" #: ../Doc/library/stdtypes.rst:2218 msgid "" @@ -4027,6 +4212,9 @@ msgid "" ">>> comment_string.strip('.#! ')\n" "'Section 3.2.1 Issue #32'" msgstr "" +">>> comment_string = '#....... Section 3.2.1 Issue #32 .......'\n" +">>> comment_string.strip('.#! ')\n" +"'Section 3.2.1 Issue #32'" #: ../Doc/library/stdtypes.rst:2231 msgid "" @@ -4051,6 +4239,8 @@ msgid "" ">>> 'Hello world'.title()\n" "'Hello World'" msgstr "" +">>> 'Hello world'.title()\n" +"'Hello World'" #: ../Doc/library/stdtypes.rst:2246 ../Doc/library/stdtypes.rst:3472 msgid "" @@ -4071,6 +4261,8 @@ msgid "" ">>> \"they're bill's friends from the UK\".title()\n" "\"They'Re Bill'S Friends From The Uk\"" msgstr "" +">>> \"they're bill's friends from the UK\".title()\n" +"\"They'Re Bill'S Friends From The Uk\"" #: ../Doc/library/stdtypes.rst:2254 msgid "" @@ -4099,9 +4291,16 @@ msgid "" ">>> titlecase(\"they're bill's friends.\")\n" "\"They're Bill's Friends.\"" msgstr "" +">>> import re\n" +">>> def titlecase(s):\n" +"... return re.sub(r\"[A-Za-z]+('[A-Za-z]+)?\",\n" +"... lambda mo: mo.group(0).capitalize(),\n" +"... s)\n" +"...\n" +">>> titlecase(\"they're bill's friends.\")\n" +"\"They're Bill's Friends.\"" #: ../Doc/library/stdtypes.rst:2272 -#, fuzzy msgid "" "Return a copy of the string in which each character has been mapped through " "the given translation table. The table must be an object that implements " @@ -4112,17 +4311,15 @@ msgid "" "delete the character from the return string; or raise a :exc:`LookupError` " "exception, to map the character to itself." msgstr "" -"Retorna una copia de la cadena en la que cada carácter ha sido sustituido " -"por su equivalente definido en la tabla de traducción dada. La tabla puede " -"ser cualquier objeto que soporta el acceso mediante índices implementado en " -"método :meth:`__getitem__`, normalmente un objeto de tipo :term:" -"`mapa` o :term:`secuencia`. Cuando se accede como índice " -"con un código Unicode (un entero), el objeto tabla puede hacer una de las " -"siguientes cosas: retornar otro código Unicode o retornar una cadena de " -"caracteres, de forma que se usarán uno u otro como reemplazo en la cadena de " -"salida; retorna ``None`` para eliminar el carácter en la cadena de salida, o " -"lanza una excepción de tipo :exc:`LookupError`, que hará que el carácter se " -"copie igual en la cadena de salida." +"Devuelve una copia de la cadena en la que se ha asignado cada carácter a " +"través de la tabla de traducción dada. La tabla debe ser un objeto que " +"implemente la indexación mediante :meth:`~object.__getitem__`, normalmente :" +"term:`mapping` o :term:`sequence`. Cuando se indexa mediante un ordinal " +"Unicode (un entero), el objeto de tabla puede realizar cualquiera de las " +"siguientes acciones: devolver un ordinal Unicode o una cadena, para asignar " +"el carácter a uno o más caracteres; devolver ``None``, para eliminar el " +"carácter de la cadena de retorno; o generar una excepción :exc:" +"`LookupError`, para asignar el carácter a sí mismo." #: ../Doc/library/stdtypes.rst:2281 msgid "" @@ -4156,14 +4353,14 @@ msgstr "" "(Letra, Título)." #: ../Doc/library/stdtypes.rst:2296 -#, fuzzy msgid "" "The uppercasing algorithm used is `described in section 3.13 'Default Case " "Folding' of the Unicode Standard `__." msgstr "" -"El algoritmo de paso a mayúsculas es el descrito en la sección 3.13 del " -"estándar Unicode." +"El algoritmo de mayúsculas utilizado es `described in section 3.13 'Default " +"Case Folding' of the Unicode Standard `__." #: ../Doc/library/stdtypes.rst:2303 msgid "" @@ -4185,6 +4382,10 @@ msgid "" ">>> \"-42\".zfill(5)\n" "'-0042'" msgstr "" +">>> \"42\".zfill(5)\n" +"'00042'\n" +">>> \"-42\".zfill(5)\n" +"'-0042'" #: ../Doc/library/stdtypes.rst:2321 msgid "``printf``-style String Formatting" @@ -4210,7 +4411,6 @@ msgstr "" "extensión." #: ../Doc/library/stdtypes.rst:2342 -#, fuzzy msgid "" "String objects have one unique built-in operation: the ``%`` operator " "(modulo). This is also known as the string *formatting* or *interpolation* " @@ -4219,13 +4419,12 @@ msgid "" "elements of *values*. The effect is similar to using the :c:func:`sprintf` " "function in the C language. For example:" msgstr "" -"Las cadenas de caracteres tienen una operación básica: El operador ``%`` " -"(módulo). Esta operación se conoce también como *formateo* de cadenas y " -"operador de interpolación. Dada la expresión ``formato % valores`` (donde " -"*formato* es una cadena), las especificaciones de conversión indicadas en la " -"cadena con el símbolo ``%`` son reemplazadas por cero o más elementos de " -"*valores*. El efecto es similar a usar la función del lenguaje C :c:func:" -"`sprintf`." +"Los objetos de cadena tienen una única operación incorporada: el operador " +"``%`` (módulo). También se lo conoce como operador de cadena *formatting* o " +"*interpolation*. Dado ``format % values`` (donde *format* es una cadena), " +"las especificaciones de conversión ``%`` en *format* se reemplazan con cero " +"o más elementos de *values*. El efecto es similar al uso de la función :c:" +"func:`sprintf` en el lenguaje C. Por ejemplo:" #: ../Doc/library/stdtypes.rst:2349 #, python-format @@ -4233,6 +4432,8 @@ msgid "" ">>> print('%s has %d quote types.' % ('Python', 2))\n" "Python has 2 quote types." msgstr "" +">>> print('%s has %d quote types.' % ('Python', 2))\n" +"Python has 2 quote types." #: ../Doc/library/stdtypes.rst:2354 msgid "" @@ -4460,7 +4661,6 @@ msgid "``'e'``" msgstr "``'e'``" #: ../Doc/library/stdtypes.rst:2446 ../Doc/library/stdtypes.rst:3665 -#, fuzzy msgid "Floating-point exponential format (lowercase)." msgstr "Formato en coma flotante exponencial (en minúsculas)." @@ -4469,7 +4669,6 @@ msgid "``'E'``" msgstr "``'E'``" #: ../Doc/library/stdtypes.rst:2448 ../Doc/library/stdtypes.rst:3667 -#, fuzzy msgid "Floating-point exponential format (uppercase)." msgstr "Formato en coma flotante exponencial (en mayúsculas)." @@ -4479,7 +4678,6 @@ msgstr "``'f'``" #: ../Doc/library/stdtypes.rst:2450 ../Doc/library/stdtypes.rst:2452 #: ../Doc/library/stdtypes.rst:3669 ../Doc/library/stdtypes.rst:3671 -#, fuzzy msgid "Floating-point decimal format." msgstr "Formato en coma flotante decimal." @@ -4492,28 +4690,26 @@ msgid "``'g'``" msgstr "``'g'``" #: ../Doc/library/stdtypes.rst:2454 ../Doc/library/stdtypes.rst:3673 -#, fuzzy msgid "" "Floating-point format. Uses lowercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -"Formato en coma flotante. Usa formato exponencial con minúsculas si el " -"exponente es menor que -4 o no es menor que la precisión, en caso contrario " -"usa el formato decimal." +"Formato de punto flotante. Utiliza el formato exponencial en minúsculas si " +"el exponente es menor que -4 o igual que la precisión; en caso contrario, " +"utiliza el formato decimal." #: ../Doc/library/stdtypes.rst:2458 ../Doc/library/stdtypes.rst:3677 msgid "``'G'``" msgstr "``'G'``" #: ../Doc/library/stdtypes.rst:2458 ../Doc/library/stdtypes.rst:3677 -#, fuzzy msgid "" "Floating-point format. Uses uppercase exponential format if exponent is less " "than -4 or not less than precision, decimal format otherwise." msgstr "" -"Formato en coma flotante. Usa formato exponencial con mayúsculas si el " -"exponente es menor que -4 o no es menor que la precisión, en caso contrario " -"usa el formato decimal." +"Formato de punto flotante. Utiliza el formato exponencial en mayúsculas si " +"el exponente es menor que -4 o igual que la precisión; en caso contrario, " +"utiliza el formato decimal." #: ../Doc/library/stdtypes.rst:2462 ../Doc/library/stdtypes.rst:3681 msgid "``'c'``" @@ -5052,6 +5248,8 @@ msgid "" "a = \"abc\"\n" "b = a.replace(\"a\", \"f\")" msgstr "" +"a = \"abc\"\n" +"b = a.replace(\"a\", \"f\")" #: ../Doc/library/stdtypes.rst:2742 msgid "and::" @@ -5062,6 +5260,8 @@ msgid "" "a = b\"abc\"\n" "b = a.replace(b\"a\", b\"f\")" msgstr "" +"a = b\"abc\"\n" +"b = a.replace(b\"a\", b\"f\")" #: ../Doc/library/stdtypes.rst:2747 msgid "" @@ -5116,6 +5316,8 @@ msgid "" "If *sub* is empty, returns the number of empty slices between characters " "which is the length of the bytes object plus one." msgstr "" +"Si *sub* está vacío, devuelve el número de porciones vacías entre " +"caracteres, que es la longitud del objeto de bytes más uno." #: ../Doc/library/stdtypes.rst:2771 ../Doc/library/stdtypes.rst:2882 #: ../Doc/library/stdtypes.rst:2895 ../Doc/library/stdtypes.rst:2961 @@ -5140,6 +5342,10 @@ msgid "" ">>> b'BaseTestCase'.removeprefix(b'Test')\n" "b'BaseTestCase'" msgstr "" +">>> b'TestHook'.removeprefix(b'Test')\n" +"b'Hook'\n" +">>> b'BaseTestCase'.removeprefix(b'Test')\n" +"b'BaseTestCase'" #: ../Doc/library/stdtypes.rst:2787 msgid "The *prefix* may be any :term:`bytes-like object`." @@ -5181,6 +5387,10 @@ msgid "" ">>> b'TmpDirMixin'.removesuffix(b'Tests')\n" "b'TmpDirMixin'" msgstr "" +">>> b'MiscTests'.removesuffix(b'Tests')\n" +"b'Misc'\n" +">>> b'TmpDirMixin'.removesuffix(b'Tests')\n" +"b'TmpDirMixin'" #: ../Doc/library/stdtypes.rst:2809 msgid "The *suffix* may be any :term:`bytes-like object`." @@ -5190,7 +5400,7 @@ msgstr "" #: ../Doc/library/stdtypes.rst:2822 msgid "Return the bytes decoded to a :class:`str`." -msgstr "" +msgstr "Devuelve los bytes decodificados a un :class:`str`." #: ../Doc/library/stdtypes.rst:2827 msgid "" @@ -5199,6 +5409,11 @@ msgid "" "are ``'ignore'``, ``'replace'``, and any other name registered via :func:" "`codecs.register_error`. See :ref:`error-handlers` for details." msgstr "" +"*errors* controla cómo se manejan los errores de decodificación. Si se usa " +"``'strict'`` (el valor predeterminado), se genera una excepción :exc:" +"`UnicodeError`. Otros valores posibles son ``'ignore'``, ``'replace'`` y " +"cualquier otro nombre registrado mediante :func:`codecs.register_error`. " +"Consulte :ref:`error-handlers` para obtener más detalles." #: ../Doc/library/stdtypes.rst:2833 msgid "" @@ -5206,17 +5421,19 @@ msgid "" "unless a decoding error actually occurs, :ref:`devmode` is enabled or a :ref:" "`debug build ` is used." msgstr "" +"Por razones de rendimiento, no se verifica la validez del valor de *errors* " +"a menos que realmente se produzca un error de decodificación, se habilite :" +"ref:`devmode` o se utilice :ref:`debug build `." #: ../Doc/library/stdtypes.rst:2839 -#, fuzzy msgid "" "Passing the *encoding* argument to :class:`str` allows decoding any :term:" "`bytes-like object` directly, without needing to make a temporary :class:`!" "bytes` or :class:`!bytearray` object." msgstr "" -"Pasando el parámetro *encoding* a la clase :class:`str` permite decodificar " -"cualquier :term:`objeto tipo binario ` directamente, sin " -"necesidad de crear una objeto temporal de tipo *bytes* o *bytearray*." +"Pasar el argumento *encoding* a :class:`str` permite decodificar cualquier :" +"term:`bytes-like object` directamente, sin necesidad de crear un objeto " +"temporal :class:`!bytes` o :class:`!bytearray`." #: ../Doc/library/stdtypes.rst:2854 msgid "" @@ -5265,6 +5482,8 @@ msgid "" ">>> b'Py' in b'Python'\n" "True" msgstr "" +">>> b'Py' in b'Python'\n" +"True" #: ../Doc/library/stdtypes.rst:2889 msgid "" @@ -5428,6 +5647,8 @@ msgid "" ">>> b'read this short text'.translate(None, b'aeiou')\n" "b'rd ths shrt txt'" msgstr "" +">>> b'read this short text'.translate(None, b'aeiou')\n" +"b'rd ths shrt txt'" #: ../Doc/library/stdtypes.rst:3019 msgid "*delete* is now supported as a keyword argument." @@ -5498,6 +5719,10 @@ msgid "" ">>> b'www.example.com'.lstrip(b'cmowz.')\n" "b'example.com'" msgstr "" +">>> b' spacious '.lstrip()\n" +"b'spacious '\n" +">>> b'www.example.com'.lstrip(b'cmowz.')\n" +"b'example.com'" #: ../Doc/library/stdtypes.rst:3072 msgid "" @@ -5518,6 +5743,10 @@ msgid "" ">>> b'Arthur: three!'.removeprefix(b'Arthur: ')\n" "b'three!'" msgstr "" +">>> b'Arthur: three!'.lstrip(b'Arthur: ')\n" +"b'ee!'\n" +">>> b'Arthur: three!'.removeprefix(b'Arthur: ')\n" +"b'three!'" #: ../Doc/library/stdtypes.rst:3091 msgid "" @@ -5574,6 +5803,10 @@ msgid "" ">>> b'mississippi'.rstrip(b'ipz')\n" "b'mississ'" msgstr "" +">>> b' spacious '.rstrip()\n" +"b' spacious'\n" +">>> b'mississippi'.rstrip(b'ipz')\n" +"b'mississ'" #: ../Doc/library/stdtypes.rst:3128 msgid "" @@ -5594,6 +5827,10 @@ msgid "" ">>> b'Monty Python'.removesuffix(b' Python')\n" "b'Monty'" msgstr "" +">>> b'Monty Python'.rstrip(b' Python')\n" +"b'M'\n" +">>> b'Monty Python'.removesuffix(b' Python')\n" +"b'Monty'" #: ../Doc/library/stdtypes.rst:3147 msgid "" @@ -5611,7 +5848,6 @@ msgstr "" "divisiones (se hacen todas las posibles divisiones)." #: ../Doc/library/stdtypes.rst:3153 -#, fuzzy msgid "" "If *sep* is given, consecutive delimiters are not grouped together and are " "deemed to delimit empty subsequences (for example, ``b'1,,2'.split(b',')`` " @@ -5621,14 +5857,13 @@ msgid "" "the type of object being split. The *sep* argument may be any :term:`bytes-" "like object`." msgstr "" -"Si se especifica *sep*, las repeticiones de caracteres delimitadores no se " -"agrupan juntos, sino que se considera que están delimitando cadenas vacías " -"(por ejemplo, ``b'1,,2'.split(b',')`` retorna ``[b'1', b'', b'2']``). El " -"parámetro *sep* puede contener más de un carácter (por ejemplo, ``b'1<>2<>3'." -"split(b'<>')`` retorna ``[b'1', b'2', b'3']``). Dividir una cadena vacía con " -"un separador determinado retornará ``[b'']`` o ``[bytearray(b'')]`` " -"dependiendo del tipo de objeto dividido. El parámetro *sep* puede ser " -"cualquier :term:`objeto tipo binario `." +"Si se proporciona *sep*, los delimitadores consecutivos no se agrupan y se " +"consideran que delimitan subsecuencias vacías (por ejemplo, ``b'1,,2'." +"split(b',')`` devuelve ``[b'1', b'', b'2']``). El argumento *sep* puede " +"consistir en una secuencia multibyte como un único delimitador. Dividir una " +"secuencia vacía con un separador especificado devuelve ``[b'']`` o " +"``[bytearray(b'')]`` según el tipo de objeto que se esté dividiendo. El " +"argumento *sep* puede ser cualquier :term:`bytes-like object`." #: ../Doc/library/stdtypes.rst:3163 msgid "" @@ -5641,6 +5876,14 @@ msgid "" ">>> b'1<>2<>3<4'.split(b'<>')\n" "[b'1', b'2', b'3<4']" msgstr "" +">>> b'1,2,3'.split(b',')\n" +"[b'1', b'2', b'3']\n" +">>> b'1,2,3'.split(b',', maxsplit=1)\n" +"[b'1', b'2,3']\n" +">>> b'1,2,,3,'.split(b',')\n" +"[b'1', b'2', b'', b'3', b'']\n" +">>> b'1<>2<>3<4'.split(b'<>')\n" +"[b'1', b'2', b'3<4']" #: ../Doc/library/stdtypes.rst:3172 msgid "" @@ -5668,6 +5911,12 @@ msgid "" ">>> b' 1 2 3 '.split()\n" "[b'1', b'2', b'3']" msgstr "" +">>> b'1 2 3'.split()\n" +"[b'1', b'2', b'3']\n" +">>> b'1 2 3'.split(maxsplit=1)\n" +"[b'1', b'2 3']\n" +">>> b' 1 2 3 '.split()\n" +"[b'1', b'2', b'3']" #: ../Doc/library/stdtypes.rst:3193 msgid "" @@ -5694,6 +5943,10 @@ msgid "" ">>> b'www.example.com'.strip(b'cmowz.')\n" "b'example'" msgstr "" +">>> b' spacious '.strip()\n" +"b'spacious'\n" +">>> b'www.example.com'.strip(b'cmowz.')\n" +"b'example'" #: ../Doc/library/stdtypes.rst:3206 msgid "" @@ -5761,6 +6014,10 @@ msgid "" ">>> b'01\\t012\\t0123\\t01234'.expandtabs(4)\n" "b'01 012 0123 01234'" msgstr "" +">>> b'01\\t012\\t0123\\t01234'.expandtabs()\n" +"b'01 012 0123 01234'\n" +">>> b'01\\t012\\t0123\\t01234'.expandtabs(4)\n" +"b'01 012 0123 01234'" #: ../Doc/library/stdtypes.rst:3264 msgid "" @@ -5784,6 +6041,10 @@ msgid "" ">>> b'ABC abc1'.isalnum()\n" "False" msgstr "" +">>> b'ABCabc1'.isalnum()\n" +"True\n" +">>> b'ABC abc1'.isalnum()\n" +"False" #: ../Doc/library/stdtypes.rst:3281 msgid "" @@ -5804,6 +6065,10 @@ msgid "" ">>> b'ABCabc1'.isalpha()\n" "False" msgstr "" +">>> b'ABCabc'.isalpha()\n" +"True\n" +">>> b'ABCabc1'.isalpha()\n" +"False" #: ../Doc/library/stdtypes.rst:3297 msgid "" @@ -5832,6 +6097,10 @@ msgid "" ">>> b'1.23'.isdigit()\n" "False" msgstr "" +">>> b'1234'.isdigit()\n" +"True\n" +">>> b'1.23'.isdigit()\n" +"False" #: ../Doc/library/stdtypes.rst:3322 msgid "" @@ -5849,6 +6118,10 @@ msgid "" ">>> b'Hello world'.islower()\n" "False" msgstr "" +">>> b'hello world'.islower()\n" +"True\n" +">>> b'Hello world'.islower()\n" +"False" #: ../Doc/library/stdtypes.rst:3332 ../Doc/library/stdtypes.rst:3374 #: ../Doc/library/stdtypes.rst:3390 ../Doc/library/stdtypes.rst:3440 @@ -5893,6 +6166,10 @@ msgid "" ">>> b'Hello world'.istitle()\n" "False" msgstr "" +">>> b'Hello World'.istitle()\n" +"True\n" +">>> b'Hello world'.istitle()\n" +"False" #: ../Doc/library/stdtypes.rst:3364 msgid "" @@ -5911,6 +6188,10 @@ msgid "" ">>> b'Hello world'.isupper()\n" "False" msgstr "" +">>> b'HELLO WORLD'.isupper()\n" +"True\n" +">>> b'Hello world'.isupper()\n" +"False" #: ../Doc/library/stdtypes.rst:3382 msgid "" @@ -5925,6 +6206,8 @@ msgid "" ">>> b'Hello World'.lower()\n" "b'hello world'" msgstr "" +">>> b'Hello World'.lower()\n" +"b'hello world'" #: ../Doc/library/stdtypes.rst:3407 msgid "" @@ -5945,6 +6228,10 @@ msgid "" ">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" "[b'ab c\\n', b'\\n', b'de fg\\r', b'kl\\r\\n']" msgstr "" +">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines()\n" +"[b'ab c', b'', b'de fg', b'kl']\n" +">>> b'ab c\\n\\nde fg\\rkl\\r\\n'.splitlines(keepends=True)\n" +"[b'ab c\\n', b'\\n', b'de fg\\r', b'kl\\r\\n']" #: ../Doc/library/stdtypes.rst:3419 msgid "" @@ -5964,6 +6251,10 @@ msgid "" ">>> b\"\".splitlines(), b\"One line\\n\".splitlines()\n" "([], [b'One line'])" msgstr "" +">>> b\"\".split(b'\\n'), b\"Two lines\\n\".split(b'\\n')\n" +"([b''], [b'Two lines', b''])\n" +">>> b\"\".splitlines(), b\"One line\\n\".splitlines()\n" +"([], [b'One line'])" #: ../Doc/library/stdtypes.rst:3432 msgid "" @@ -5979,19 +6270,20 @@ msgid "" ">>> b'Hello World'.swapcase()\n" "b'hELLO wORLD'" msgstr "" +">>> b'Hello World'.swapcase()\n" +"b'hELLO wORLD'" #: ../Doc/library/stdtypes.rst:3444 -#, fuzzy msgid "" "Unlike :func:`str.swapcase`, it is always the case that ``bin.swapcase()." "swapcase() == bin`` for the binary versions. Case conversions are " "symmetrical in ASCII, even though that is not generally true for arbitrary " "Unicode code points." msgstr "" -"Al contrario que la función :func:`str.swapcase()`, en este caso siempre se " -"cumple que ``bin.swapcase().swapcase() == bin`` para las versiones binarias. " -"La conversión de mayúsculas a minúsculas son simétricas en ASCII, aunque " -"esto no es el caso general para códigos de punto Unicode." +"A diferencia de :func:`str.swapcase`, siempre ocurre lo mismo con ``bin." +"swapcase().swapcase() == bin`` para las versiones binarias. Las conversiones " +"de mayúsculas y minúsculas son simétricas en ASCII, aunque esto no suele ser " +"así para puntos de código Unicode arbitrarios." #: ../Doc/library/stdtypes.rst:3458 msgid "" @@ -6008,6 +6300,8 @@ msgid "" ">>> b'Hello world'.title()\n" "b'Hello World'" msgstr "" +">>> b'Hello world'.title()\n" +"b'Hello World'" #: ../Doc/library/stdtypes.rst:3467 msgid "" @@ -6026,6 +6320,8 @@ msgid "" ">>> b\"they're bill's friends from the UK\".title()\n" "b\"They'Re Bill'S Friends From The Uk\"" msgstr "" +">>> b\"they're bill's friends from the UK\".title()\n" +"b\"They'Re Bill'S Friends From The Uk\"" #: ../Doc/library/stdtypes.rst:3480 msgid "" @@ -6046,6 +6342,15 @@ msgid "" ">>> titlecase(b\"they're bill's friends.\")\n" "b\"They're Bill's Friends.\"" msgstr "" +">>> import re\n" +">>> def titlecase(s):\n" +"... return re.sub(rb\"[A-Za-z]+('[A-Za-z]+)?\",\n" +"... lambda mo: mo.group(0)[0:1].upper() +\n" +"... mo.group(0)[1:].lower(),\n" +"... s)\n" +"...\n" +">>> titlecase(b\"they're bill's friends.\")\n" +"b\"They're Bill's Friends.\"" #: ../Doc/library/stdtypes.rst:3501 msgid "" @@ -6060,6 +6365,8 @@ msgid "" ">>> b'Hello World'.upper()\n" "b'HELLO WORLD'" msgstr "" +">>> b'Hello World'.upper()\n" +"b'HELLO WORLD'" #: ../Doc/library/stdtypes.rst:3522 msgid "" @@ -6083,6 +6390,10 @@ msgid "" ">>> b\"-42\".zfill(5)\n" "b'-0042'" msgstr "" +">>> b\"42\".zfill(5)\n" +"b'00042'\n" +">>> b\"-42\".zfill(5)\n" +"b'-0042'" #: ../Doc/library/stdtypes.rst:3544 msgid "``printf``-style Bytes Formatting" @@ -6151,13 +6462,12 @@ msgid "``'b'``" msgstr "``'b'``" #: ../Doc/library/stdtypes.rst:3684 -#, fuzzy msgid "" "Bytes (any object that follows the :ref:`buffer protocol ` or " "has :meth:`~object.__bytes__`)." msgstr "" -"Bytes (cualquier objeto que siga el :ref:`protocolo búfer ` o " -"implemente el método :meth:`__bytes__`)." +"Bytes (cualquier objeto que siga al :ref:`buffer protocol ` o " +"tenga :meth:`~object.__bytes__`)." #: ../Doc/library/stdtypes.rst:3688 msgid "" @@ -6245,18 +6555,25 @@ msgid "" "is the nested list representation of the view. If ``view.ndim = 1``, this is " "equal to the number of elements in the view." msgstr "" +"``len(view)`` es igual a la longitud de :class:`~memoryview.tolist`, que es " +"la representación de lista anidada de la vista. Si es ``view.ndim = 1``, es " +"igual a la cantidad de elementos de la vista." #: ../Doc/library/stdtypes.rst:3772 msgid "" "If ``view.ndim == 0``, ``len(view)`` now raises :exc:`TypeError` instead of " "returning 1." msgstr "" +"Si es ``view.ndim == 0``, ``len(view)`` ahora genera :exc:`TypeError` en " +"lugar de devolver 1." #: ../Doc/library/stdtypes.rst:3775 msgid "" "The :class:`~memoryview.itemsize` attribute will give you the number of " "bytes in a single element." msgstr "" +"El atributo :class:`~memoryview.itemsize` le dará la cantidad de bytes en un " +"solo elemento." #: ../Doc/library/stdtypes.rst:3778 msgid "" @@ -6279,6 +6596,15 @@ msgid "" ">>> bytes(v[1:4])\n" "b'bce'" msgstr "" +">>> v = memoryview(b'abcefg')\n" +">>> v[1]\n" +"98\n" +">>> v[-1]\n" +"103\n" +">>> v[1:4]\n" +"\n" +">>> bytes(v[1:4])\n" +"b'bce'" #: ../Doc/library/stdtypes.rst:3791 msgid "" @@ -6315,6 +6641,15 @@ msgid "" ">>> m[::2].tolist()\n" "[-11111111, -33333333]" msgstr "" +">>> import array\n" +">>> a = array.array('l', [-11111111, 22222222, -33333333, 44444444])\n" +">>> m = memoryview(a)\n" +">>> m[0]\n" +"-11111111\n" +">>> m[-1]\n" +"44444444\n" +">>> m[::2].tolist()\n" +"[-11111111, -33333333]" #: ../Doc/library/stdtypes.rst:3812 msgid "" @@ -6346,17 +6681,34 @@ msgid "" ">>> data\n" "bytearray(b'z1spam')" msgstr "" +">>> data = bytearray(b'abcefg')\n" +">>> v = memoryview(data)\n" +">>> v.readonly\n" +"False\n" +">>> v[0] = ord(b'z')\n" +">>> data\n" +"bytearray(b'zbcefg')\n" +">>> v[1:4] = b'123'\n" +">>> data\n" +"bytearray(b'z123fg')\n" +">>> v[2:3] = b'spam'\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"ValueError: memoryview assignment: lvalue and rvalue have different " +"structures\n" +">>> v[2:6] = b'spam'\n" +">>> data\n" +"bytearray(b'z1spam')" #: ../Doc/library/stdtypes.rst:3833 -#, fuzzy msgid "" "One-dimensional memoryviews of :term:`hashable` (read-only) types with " "formats 'B', 'b' or 'c' are also hashable. The hash is defined as ``hash(m) " "== hash(m.tobytes())``::" msgstr "" -"Los objetos *memoryviews* de una única dimensión que contienen tipos de " -"datos *hashables* (de solo lectura) con formatos 'B', 'b' o 'c' son también " -"*hashables*. El *hash* se define como ``hash(m) == hash(m.tobytes())``::" +"Las vistas de memoria unidimensionales de tipos :term:`hashable` (solo " +"lectura) con formatos 'B', 'b' o 'c' también se pueden codificar en hash. El " +"hash se define como ``hash(m) == hash(m.tobytes())``::" #: ../Doc/library/stdtypes.rst:3837 msgid "" @@ -6368,16 +6720,22 @@ msgid "" ">>> hash(v[::-2]) == hash(b'abcefg'[::-2])\n" "True" msgstr "" +">>> v = memoryview(b'abcefg')\n" +">>> hash(v) == hash(b'abcefg')\n" +"True\n" +">>> hash(v[2:4]) == hash(b'ce')\n" +"True\n" +">>> hash(v[::-2]) == hash(b'abcefg'[::-2])\n" +"True" #: ../Doc/library/stdtypes.rst:3845 -#, fuzzy msgid "" "One-dimensional memoryviews can now be sliced. One-dimensional memoryviews " "with formats 'B', 'b' or 'c' are now :term:`hashable`." msgstr "" -"Los objetos *memoryviews* de una única dimensión pueden ahora ser usados con " -"operaciones de segmentado. Los objetos *memoryviews* de una única dimensión " -"con formatos 'B', 'b' o 'c' son ahora *hashables*." +"Ahora es posible dividir las vistas de memoria unidimensionales. Las vistas " +"de memoria unidimensionales con formatos 'B', 'b' o 'c' ahora son :term:" +"`hashable`." #: ../Doc/library/stdtypes.rst:3849 msgid "" @@ -6434,6 +6792,21 @@ msgid "" ">>> z.tolist() == c.tolist()\n" "True" msgstr "" +">>> import array\n" +">>> a = array.array('I', [1, 2, 3, 4, 5])\n" +">>> b = array.array('d', [1.0, 2.0, 3.0, 4.0, 5.0])\n" +">>> c = array.array('b', [5, 3, 1])\n" +">>> x = memoryview(a)\n" +">>> y = memoryview(b)\n" +">>> x == a == y == b\n" +"True\n" +">>> x.tolist() == a.tolist() == y.tolist() == b.tolist()\n" +"True\n" +">>> z = y[::-2]\n" +">>> z == c\n" +"True\n" +">>> z.tolist() == c.tolist()\n" +"True" #: ../Doc/library/stdtypes.rst:3883 msgid "" @@ -6460,15 +6833,25 @@ msgid "" ">>> a == b\n" "False" msgstr "" +">>> from ctypes import BigEndianStructure, c_long\n" +">>> class BEPoint(BigEndianStructure):\n" +"... _fields_ = [(\"x\", c_long), (\"y\", c_long)]\n" +"...\n" +">>> point = BEPoint(100, 200)\n" +">>> a = memoryview(point)\n" +">>> b = memoryview(point)\n" +">>> a == point\n" +"False\n" +">>> a == b\n" +"False" #: ../Doc/library/stdtypes.rst:3899 -#, fuzzy msgid "" "Note that, as with floating-point numbers, ``v is w`` does *not* imply ``v " "== w`` for memoryview objects." msgstr "" -"Nótese que, al igual que con los números en coma flotante, ``v is w`` *no* " -"implica que ``v == w`` para objetos del tipo *memoryview*." +"Tenga en cuenta que, al igual que con los números de punto flotante, ``v is " +"w`` no implica *not* o ``v == w`` para los objetos de vista de memoria." #: ../Doc/library/stdtypes.rst:3902 msgid "" @@ -6494,6 +6877,11 @@ msgid "" ">>> bytes(m)\n" "b'abc'" msgstr "" +">>> m = memoryview(b\"abc\")\n" +">>> m.tobytes()\n" +"b'abc'\n" +">>> bytes(m)\n" +"b'abc'" #: ../Doc/library/stdtypes.rst:3917 msgid "" @@ -6537,6 +6925,9 @@ msgid "" ">>> m.hex()\n" "'616263'" msgstr "" +">>> m = memoryview(b\"abc\")\n" +">>> m.hex()\n" +"'616263'" #: ../Doc/library/stdtypes.rst:3940 msgid "" @@ -6562,6 +6953,13 @@ msgid "" ">>> m.tolist()\n" "[1.1, 2.2, 3.3]" msgstr "" +">>> memoryview(b'abc').tolist()\n" +"[97, 98, 99]\n" +">>> import array\n" +">>> a = array.array('d', [1.1, 2.2, 3.3])\n" +">>> m = memoryview(a)\n" +">>> m.tolist()\n" +"[1.1, 2.2, 3.3]" #: ../Doc/library/stdtypes.rst:3957 msgid "" @@ -6594,6 +6992,17 @@ msgid "" ">>> mm.tolist()\n" "[43, 98, 99]" msgstr "" +">>> m = memoryview(bytearray(b'abc'))\n" +">>> mm = m.toreadonly()\n" +">>> mm.tolist()\n" +"[97, 98, 99]\n" +">>> mm[0] = 42\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: cannot modify read-only memory\n" +">>> m[0] = 43\n" +">>> mm.tolist()\n" +"[43, 98, 99]" #: ../Doc/library/stdtypes.rst:3983 msgid "" @@ -6611,16 +7020,14 @@ msgstr "" "pronto posible." #: ../Doc/library/stdtypes.rst:3989 -#, fuzzy msgid "" "After this method has been called, any further operation on the view raises " "a :class:`ValueError` (except :meth:`release` itself which can be called " "multiple times)::" msgstr "" -"Después de que se ha llamado a este método, cualquier operación posterior " -"sobre la vista lanzará una excepción de tipo :class:`ValueError` (excepto " -"por el propio método :meth:`release()`, que puede ser llamado las veces que " -"se quiera)::" +"Después de llamar a este método, cualquier operación posterior en la vista " +"genera un :class:`ValueError` (excepto el propio :meth:`release`, que se " +"puede llamar varias veces):" #: ../Doc/library/stdtypes.rst:3993 msgid "" @@ -6631,6 +7038,12 @@ msgid "" " File \"\", line 1, in \n" "ValueError: operation forbidden on released memoryview object" msgstr "" +">>> m = memoryview(b'abc')\n" +">>> m.release()\n" +">>> m[0]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"ValueError: operation forbidden on released memoryview object" #: ../Doc/library/stdtypes.rst:4000 msgid "" @@ -6651,6 +7064,14 @@ msgid "" " File \"\", line 1, in \n" "ValueError: operation forbidden on released memoryview object" msgstr "" +">>> with memoryview(b'abc') as m:\n" +"... m[0]\n" +"...\n" +"97\n" +">>> m[0]\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"ValueError: operation forbidden on released memoryview object" #: ../Doc/library/stdtypes.rst:4016 msgid "" @@ -6667,17 +7088,17 @@ msgstr "" "pueden ser 1D -> C-:term:`contiguo` y C-contiguo -> 1D." #: ../Doc/library/stdtypes.rst:4022 -#, fuzzy msgid "" "The destination format is restricted to a single element native format in :" "mod:`struct` syntax. One of the formats must be a byte format ('B', 'b' or " "'c'). The byte length of the result must be the same as the original length. " "Note that all byte lengths may depend on the operating system." msgstr "" -"El formato de destino está restringido a un único elemento de formato nativo " -"en la sintaxis de :mod:`struct`. Uno de los formatos debe ser un formato de " -"byte ('B', 'b' o 'c'). La longitud en bytes del resultado debe coincidir con " -"la longitud original." +"El formato de destino está restringido a un formato nativo de un solo " +"elemento en la sintaxis :mod:`struct`. Uno de los formatos debe ser un " +"formato de bytes ('B', 'b' o 'c'). La longitud en bytes del resultado debe " +"ser la misma que la longitud original. Tenga en cuenta que todas las " +"longitudes en bytes pueden depender del sistema operativo." #: ../Doc/library/stdtypes.rst:4028 msgid "Cast 1D/long to 1D/unsigned bytes::" @@ -6706,6 +7127,26 @@ msgid "" ">>> y.nbytes\n" "24" msgstr "" +">>> import array\n" +">>> a = array.array('l', [1,2,3])\n" +">>> x = memoryview(a)\n" +">>> x.format\n" +"'l'\n" +">>> x.itemsize\n" +"8\n" +">>> len(x)\n" +"3\n" +">>> x.nbytes\n" +"24\n" +">>> y = x.cast('B')\n" +">>> y.format\n" +"'B'\n" +">>> y.itemsize\n" +"1\n" +">>> len(y)\n" +"24\n" +">>> y.nbytes\n" +"24" #: ../Doc/library/stdtypes.rst:4051 msgid "Cast 1D/unsigned bytes to 1D/char::" @@ -6724,6 +7165,16 @@ msgid "" ">>> b\n" "bytearray(b'ayz')" msgstr "" +">>> b = bytearray(b'zyz')\n" +">>> x = memoryview(b)\n" +">>> x[0] = b'a'\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: memoryview: invalid type for format 'B'\n" +">>> y = x.cast('c')\n" +">>> y[0] = b'a'\n" +">>> b\n" +"bytearray(b'ayz')" #: ../Doc/library/stdtypes.rst:4064 msgid "Cast 1D/bytes to 3D/ints to 1D/signed char::" @@ -6755,6 +7206,29 @@ msgid "" ">>> z.nbytes\n" "48" msgstr "" +">>> import struct\n" +">>> buf = struct.pack(\"i\"*12, *list(range(12)))\n" +">>> x = memoryview(buf)\n" +">>> y = x.cast('i', shape=[2,2,3])\n" +">>> y.tolist()\n" +"[[[0, 1, 2], [3, 4, 5]], [[6, 7, 8], [9, 10, 11]]]\n" +">>> y.format\n" +"'i'\n" +">>> y.itemsize\n" +"4\n" +">>> len(y)\n" +"2\n" +">>> y.nbytes\n" +"48\n" +">>> z = y.cast('b')\n" +">>> z.format\n" +"'b'\n" +">>> z.itemsize\n" +"1\n" +">>> len(z)\n" +"48\n" +">>> z.nbytes\n" +"48" #: ../Doc/library/stdtypes.rst:4090 msgid "Cast 1D/unsigned long to 2D/unsigned long::" @@ -6772,6 +7246,15 @@ msgid "" ">>> y.tolist()\n" "[[0, 1, 2], [3, 4, 5]]" msgstr "" +">>> buf = struct.pack(\"L\"*6, *list(range(6)))\n" +">>> x = memoryview(buf)\n" +">>> y = x.cast('L', shape=[2,3])\n" +">>> len(y)\n" +"2\n" +">>> y.nbytes\n" +"48\n" +">>> y.tolist()\n" +"[[0, 1, 2], [3, 4, 5]]" #: ../Doc/library/stdtypes.rst:4104 msgid "The source format is no longer restricted when casting to a byte view." @@ -6794,6 +7277,10 @@ msgid "" ">>> m.obj is b\n" "True" msgstr "" +">>> b = bytearray(b'xyz')\n" +">>> m = memoryview(b)\n" +">>> m.obj is b\n" +"True" #: ../Doc/library/stdtypes.rst:4122 msgid "" @@ -6822,6 +7309,20 @@ msgid "" ">>> len(y.tobytes())\n" "12" msgstr "" +">>> import array\n" +">>> a = array.array('i', [1,2,3,4,5])\n" +">>> m = memoryview(a)\n" +">>> len(m)\n" +"5\n" +">>> m.nbytes\n" +"20\n" +">>> y = m[::2]\n" +">>> len(y)\n" +"3\n" +">>> y.nbytes\n" +"12\n" +">>> len(y.tobytes())\n" +"12" #: ../Doc/library/stdtypes.rst:4141 msgid "Multi-dimensional arrays::" @@ -6840,6 +7341,16 @@ msgid "" ">>> y.nbytes\n" "96" msgstr "" +">>> import struct\n" +">>> buf = struct.pack(\"d\"*12, *[1.5*x for x in range(12)])\n" +">>> x = memoryview(buf)\n" +">>> y = x.cast('d', shape=[3,4])\n" +">>> y.tolist()\n" +"[[0.0, 1.5, 3.0, 4.5], [6.0, 7.5, 9.0, 10.5], [12.0, 13.5, 15.0, 16.5]]\n" +">>> len(y)\n" +"3\n" +">>> y.nbytes\n" +"96" #: ../Doc/library/stdtypes.rst:4158 msgid "A bool indicating whether the memory is read only." @@ -6882,6 +7393,14 @@ msgid "" ">>> struct.calcsize('H') == m.itemsize\n" "True" msgstr "" +">>> import array, struct\n" +">>> m = memoryview(array.array('H', [32000, 32001, 32002]))\n" +">>> m.itemsize\n" +"2\n" +">>> m[0]\n" +"32000\n" +">>> struct.calcsize('H') == m.itemsize\n" +"True" #: ../Doc/library/stdtypes.rst:4186 msgid "" @@ -7278,15 +7797,15 @@ msgstr "" "`symmetric_difference_update` aceptan cualquier iterable como parámetro." #: ../Doc/library/stdtypes.rst:4424 -#, fuzzy msgid "" "Note, the *elem* argument to the :meth:`~object.__contains__`, :meth:" "`remove`, and :meth:`discard` methods may be a set. To support searching " "for an equivalent frozenset, a temporary one is created from *elem*." msgstr "" -"Nótese que el parámetro *elem* de los métodos :meth:`__contains__`, :meth:" -"`remove` y :meth:`discard` puede ser un conjunto. Para soportar la búsqueda " -"por un *frozenset* equivalente se crea uno temporal a partir de *elem*." +"Tenga en cuenta que el argumento *elem* de los métodos :meth:`~object." +"__contains__`, :meth:`remove` y :meth:`discard` puede ser un conjunto. Para " +"facilitar la búsqueda de un conjunto congelado equivalente, se crea uno " +"temporal a partir de *elem*." #: ../Doc/library/stdtypes.rst:4433 msgid "Mapping Types --- :class:`dict`" @@ -7308,7 +7827,6 @@ msgstr "" "`collections`)." #: ../Doc/library/stdtypes.rst:4449 -#, fuzzy msgid "" "A dictionary's keys are *almost* arbitrary values. Values that are not :" "term:`hashable`, that is, values containing lists, dictionaries or other " @@ -7316,16 +7834,12 @@ msgid "" "may not be used as keys. Values that compare equal (such as ``1``, ``1.0``, " "and ``True``) can be used interchangeably to index the same dictionary entry." msgstr "" -"Las claves de un diccionario pueden ser *casi* de cualquier tipo. Los " -"valores que no son :term:`hashable`, como por ejemplo valores que contengan " -"listas, diccionarios u otros tipo mutables (que son comparados por valor, no " -"por referencia) no se pueden usar como claves. Los tipos numéricos, cuando " -"se usan como claves siguen las reglas habituales de la comparación numérica: " -"si dos números se consideran iguales (como ``1`` y ``1.0``), ambos valores " -"pueden ser usados indistintamente para acceder al mismo valor. (Pero hay que " -"tener en cuenta que los ordenadores almacenan algunos números en coma " -"flotante como aproximaciones, por lo que normalmente no es recomendable " -"usarlos como claves)." +"Las claves de un diccionario son valores arbitrarios *almost*. Los valores " +"que no sean :term:`hashable`, es decir, los valores que contienen listas, " +"diccionarios u otros tipos mutables (que se comparan por valor en lugar de " +"por identidad de objeto) no se pueden utilizar como claves. Los valores que " +"se comparan como iguales (como ``1``, ``1.0`` y ``True``) se pueden utilizar " +"indistintamente para indexar la misma entrada de diccionario." #: ../Doc/library/stdtypes.rst:4460 msgid "" @@ -7412,6 +7926,14 @@ msgid "" ">>> a == b == c == d == e == f\n" "True" msgstr "" +">>> a = dict(one=1, two=2, three=3)\n" +">>> b = {'one': 1, 'two': 2, 'three': 3}\n" +">>> c = dict(zip(['one', 'two', 'three'], [1, 2, 3]))\n" +">>> d = dict([('two', 2), ('one', 1), ('three', 3)])\n" +">>> e = dict({'three': 3, 'one': 1, 'two': 2})\n" +">>> f = dict({'one': 1, 'three': 3}, two=2)\n" +">>> a == b == c == d == e == f\n" +"True" #: ../Doc/library/stdtypes.rst:4498 msgid "" @@ -7480,6 +8002,16 @@ msgid "" ">>> c['red']\n" "1" msgstr "" +">>> class Counter(dict):\n" +"... def __missing__(self, key):\n" +"... return 0\n" +"...\n" +">>> c = Counter()\n" +">>> c['red']\n" +"0\n" +">>> c['red'] += 1\n" +">>> c['red']\n" +"1" #: ../Doc/library/stdtypes.rst:4539 msgid "" @@ -7678,6 +8210,9 @@ msgid "" ">>> d.values() == d.values()\n" "False" msgstr "" +">>> d = {'a': 1}\n" +">>> d.values() == d.values()\n" +"False" #: ../Doc/library/stdtypes.rst:4656 msgid "" @@ -7737,6 +8272,20 @@ msgid "" ">>> d\n" "{'one': 42, 'three': 3, 'four': 4, 'two': None}" msgstr "" +">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" +">>> d\n" +"{'one': 1, 'two': 2, 'three': 3, 'four': 4}\n" +">>> list(d)\n" +"['one', 'two', 'three', 'four']\n" +">>> list(d.values())\n" +"[1, 2, 3, 4]\n" +">>> d[\"one\"] = 42\n" +">>> d\n" +"{'one': 42, 'two': 2, 'three': 3, 'four': 4}\n" +">>> del d[\"two\"]\n" +">>> d[\"two\"] = None\n" +">>> d\n" +"{'one': 42, 'three': 3, 'four': 4, 'two': None}" #: ../Doc/library/stdtypes.rst:4692 msgid "" @@ -7765,6 +8314,15 @@ msgid "" ">>> list(reversed(d.items()))\n" "[('four', 4), ('three', 3), ('two', 2), ('one', 1)]" msgstr "" +">>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\n" +">>> d\n" +"{'one': 1, 'two': 2, 'three': 3, 'four': 4}\n" +">>> list(reversed(d))\n" +"['four', 'three', 'two', 'one']\n" +">>> list(reversed(d.values()))\n" +"[4, 3, 2, 1]\n" +">>> list(reversed(d.items()))\n" +"[('four', 4), ('three', 3), ('two', 2), ('one', 1)]" #: ../Doc/library/stdtypes.rst:4708 msgid "Dictionaries are now reversible." @@ -7869,7 +8427,6 @@ msgstr "" "original al que se refiere la vista." #: ../Doc/library/stdtypes.rst:4770 -#, fuzzy msgid "" "Keys views are set-like since their entries are unique and :term:`hashable`. " "Items views also have set-like operations since the (key, value) pairs are " @@ -7882,15 +8439,19 @@ msgid "" "any iterable as the other operand, unlike sets which only accept sets as the " "input." msgstr "" -"Las vistas de claves son similares a conjuntos, dado que todas las claves " -"deben ser únicas y *hashables*. Si todos los valores son también " -"*hashables*, de forma que las parejas ``(key, value)`` son también únicas y " -"*hashables*, entonces la vista *items* es también similar a un conjunto. (La " -"vista *values* no son consideradas similar a un conjunto porque las valores " -"almacenados en el diccionario no tiene que ser únicos). Las vistas similares " -"a conjuntos pueden usar todas las operaciones definidas en la clase " -"abstracta :class:`collections.abc.Set` (como por ejemplo ``==``, ``<`` o " -"``^``)." +"Las vistas de claves son similares a conjuntos, ya que sus entradas son " +"únicas y :term:`hashable`. Las vistas de elementos también tienen " +"operaciones similares a conjuntos, ya que los pares (clave, valor) son " +"únicos y las claves se pueden codificar en hash. Si todos los valores de una " +"vista de elementos también se pueden codificar en hash, la vista de " +"elementos puede interoperar con otros conjuntos. (Las vistas de valores no " +"se tratan como similares a conjuntos, ya que las entradas generalmente no " +"son únicas). Para las vistas similares a conjuntos, están disponibles todas " +"las operaciones definidas para la clase base abstracta :class:`collections." +"abc.Set` (por ejemplo, ``==``, ``<`` o ``^``). Al utilizar operadores de " +"conjunto, las vistas similares a conjuntos aceptan cualquier iterable como " +"el otro operando, a diferencia de los conjuntos que solo aceptan conjuntos " +"como entrada." #: ../Doc/library/stdtypes.rst:4782 msgid "An example of dictionary view usage::" @@ -7936,6 +8497,44 @@ msgid "" ">>> values.mapping['spam']\n" "500" msgstr "" +">>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, 'spam': 500}\n" +">>> keys = dishes.keys()\n" +">>> values = dishes.values()\n" +"\n" +">>> # iteration\n" +">>> n = 0\n" +">>> for val in values:\n" +"... n += val\n" +"...\n" +">>> print(n)\n" +"504\n" +"\n" +">>> # Las llaves y los valores se iteran en el mismo orden (orden de " +"inserción)\n" +">>> list(keys)\n" +"['eggs', 'sausage', 'bacon', 'spam']\n" +">>> list(values)\n" +"[2, 1, 1, 500]\n" +"\n" +">>> # Los objetos vista son dinámicos y reflejan cambios de diccionario.\n" +">>> del dishes['eggs']\n" +">>> del dishes['sausage']\n" +">>> list(keys)\n" +"['bacon', 'spam']\n" +"\n" +">>> # operaciones de conjunto\n" +">>> keys & {'eggs', 'bacon', 'salad'}\n" +"{'bacon'}\n" +">>> keys ^ {'sausage', 'juice'} == {'juice', 'sausage', 'bacon', 'spam'}\n" +"True\n" +">>> keys | ['juice', 'juice', 'juice'] == {'bacon', 'spam', 'juice'}\n" +"True\n" +"\n" +">>> # recuperar un proxy de solo lectura para el diccionario original\n" +">>> values.mapping\n" +"mappingproxy({'bacon': 1, 'spam': 500})\n" +">>> values.mapping['spam']\n" +"500" #: ../Doc/library/stdtypes.rst:4826 msgid "Context Manager Types" @@ -8028,7 +8627,6 @@ msgstr "" "el cuerpo del :keyword:`!with`." #: ../Doc/library/stdtypes.rst:4872 -#, fuzzy msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -8036,11 +8634,11 @@ msgid "" "context management code to easily detect whether or not an :meth:`~object." "__exit__` method has actually failed." msgstr "" -"La excepción pasada nunca debe volver a lanzarse explícitamente; en vez de " -"eso, el método debería retornar un valor falso para indicar que el método ha " -"terminado de ejecutarse sin problemas y que no se desea suprimir la " -"excepción. Esto permite a los gestores de contexto detectar fácilmente si el " -"método :meth:`__exit__` ha podido terminar o no." +"La excepción que se pasa nunca debe volver a generarse explícitamente; en su " +"lugar, este método debe devolver un valor falso para indicar que el método " +"se completó correctamente y no desea suprimir la excepción generada. Esto " +"permite que el código de administración de contexto detecte fácilmente si un " +"método :meth:`~object.__exit__` ha fallado o no." #: ../Doc/library/stdtypes.rst:4878 msgid "" @@ -8224,6 +8822,8 @@ msgid "" "def average(values: list[float]) -> float:\n" " return sum(values) / len(values)" msgstr "" +"def average(values: list[float]) -> float:\n" +" return sum(values) / len(values)" #: ../Doc/library/stdtypes.rst:4971 msgid "" @@ -8242,6 +8842,8 @@ msgid "" "def send_post_request(url: str, body: dict[str, int]) -> None:\n" " ..." msgstr "" +"def send_post_request(url: str, body: dict[str, int]) -> None:\n" +" ..." #: ../Doc/library/stdtypes.rst:4979 msgid "" @@ -8258,6 +8860,10 @@ msgid "" " File \"\", line 1, in \n" "TypeError: isinstance() argument 2 cannot be a parameterized generic" msgstr "" +">>> isinstance([1, 2], list[str])\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: isinstance() argument 2 cannot be a parameterized generic" #: ../Doc/library/stdtypes.rst:4987 msgid "" @@ -8279,6 +8885,9 @@ msgid "" ">>> t([1, 2, 3])\n" "[1, 2, 3]" msgstr "" +">>> t = list[str]\n" +">>> t([1, 2, 3])\n" +"[1, 2, 3]" #: ../Doc/library/stdtypes.rst:4997 msgid "" @@ -8298,6 +8907,13 @@ msgid "" ">>> type(l)\n" "" msgstr "" +">>> t = list[str]\n" +">>> type(t)\n" +"\n" +"\n" +">>> l = t()\n" +">>> type(l)\n" +"" #: ../Doc/library/stdtypes.rst:5008 msgid "" @@ -8315,6 +8931,11 @@ msgid "" ">>> str(list[int])\n" "'list[int]'" msgstr "" +">>> repr(list[int])\n" +"'list[int]'\n" +"\n" +">>> str(list[int])\n" +"'list[int]'" #: ../Doc/library/stdtypes.rst:5016 msgid "" @@ -8331,6 +8952,10 @@ msgid "" " ...\n" "TypeError: dict[str] is not a generic class" msgstr "" +">>> dict[str][str]\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: dict[str] is not a generic class" # Tipo u objeto 'type'? #: ../Doc/library/stdtypes.rst:5024 @@ -8351,6 +8976,10 @@ msgid "" ">>> dict[str, Y][int]\n" "dict[str, int]" msgstr "" +">>> from typing import TypeVar\n" +">>> Y = TypeVar('Y')\n" +">>> dict[str, Y][int]\n" +"dict[str, int]" #: ../Doc/library/stdtypes.rst:5035 msgid "Standard Generic Classes" @@ -8599,6 +9228,8 @@ msgid "" ">>> list[int].__origin__\n" "" msgstr "" +">>> list[int].__origin__\n" +"" #: ../Doc/library/stdtypes.rst:5112 msgid "" @@ -8615,6 +9246,8 @@ msgid "" ">>> dict[str, list[int]].__args__\n" "(, list[int])" msgstr "" +">>> dict[str, list[int]].__args__\n" +"(, list[int])" #: ../Doc/library/stdtypes.rst:5122 msgid "" @@ -8632,6 +9265,11 @@ msgid "" ">>> list[T].__parameters__\n" "(~T,)" msgstr "" +">>> from typing import TypeVar\n" +"\n" +">>> T = TypeVar('T')\n" +">>> list[T].__parameters__\n" +"(~T,)" #: ../Doc/library/stdtypes.rst:5133 msgid "" @@ -8725,7 +9363,9 @@ msgstr "" msgid "" "def square(number: int | float) -> int | float:\n" " return number ** 2" -msgstr "" +msgstr "" +"def square(number: int | float) -> int | float:\n" +" return number ** 2" #: ../Doc/library/stdtypes.rst:5189 msgid "" @@ -8735,6 +9375,12 @@ msgid "" "For unions which include forward references, present the whole expression as " "a string, e.g. ``\"int | Foo\"``." msgstr "" +"El operando ``|`` no se puede utilizar en tiempo de ejecución para definir " +"uniones en las que uno o más miembros sean una referencia hacia delante. Por " +"ejemplo, ``int | \"Foo\"``, donde ``\"Foo\"`` es una referencia a una clase " +"que aún no se ha definido, fallará en tiempo de ejecución. Para las uniones " +"que incluyen referencias hacia delante, presente la expresión completa como " +"una cadena, por ejemplo, ``\"int | Foo\"``." #: ../Doc/library/stdtypes.rst:5197 msgid "" @@ -8749,7 +9395,7 @@ msgstr "Las conversiones de conversión se aplanan::" #: ../Doc/library/stdtypes.rst:5201 msgid "(int | str) | float == int | str | float" -msgstr "" +msgstr "(int | str) | float == int | str | float" #: ../Doc/library/stdtypes.rst:5203 msgid "Redundant types are removed::" @@ -8757,7 +9403,7 @@ msgstr "Se eliminan los tipos redundantes::" #: ../Doc/library/stdtypes.rst:5205 msgid "int | str | int == int | str" -msgstr "" +msgstr "int | str | int == int | str" #: ../Doc/library/stdtypes.rst:5207 msgid "When comparing unions, the order is ignored::" @@ -8765,7 +9411,7 @@ msgstr "Al comparar conversiones, se ignora el orden::" #: ../Doc/library/stdtypes.rst:5209 msgid "int | str == str | int" -msgstr "" +msgstr "int | str == str | int" #: ../Doc/library/stdtypes.rst:5211 msgid "It is compatible with :data:`typing.Union`::" @@ -8773,7 +9419,7 @@ msgstr "Es compatible con :data:`typing.Union`::" #: ../Doc/library/stdtypes.rst:5213 msgid "int | str == typing.Union[int, str]" -msgstr "" +msgstr "int | str == typing.Union[int, str]" #: ../Doc/library/stdtypes.rst:5215 msgid "Optional types can be spelled as a union with ``None``::" @@ -8781,7 +9427,7 @@ msgstr "Los tipos opcionales se pueden escribir como una unión con ``None``::" #: ../Doc/library/stdtypes.rst:5217 msgid "str | None == typing.Optional[str]" -msgstr "" +msgstr "str | None == typing.Optional[str]" #: ../Doc/library/stdtypes.rst:5222 msgid "" @@ -8796,15 +9442,16 @@ msgid "" ">>> isinstance(\"\", int | str)\n" "True" msgstr "" +">>> isinstance(\"\", int | str)\n" +"True" #: ../Doc/library/stdtypes.rst:5228 -#, fuzzy msgid "" "However, :ref:`parameterized generics ` in union objects " "cannot be checked::" msgstr "" -"Sin embargo, los objetos de unión que contienen :ref:`genéricos " -"parametrizados ` no se pueden utilizar::" +"Sin embargo, no se puede comprobar :ref:`parameterized generics ` en objetos de unión:" #: ../Doc/library/stdtypes.rst:5231 msgid "" @@ -8815,6 +9462,12 @@ msgid "" " ...\n" "TypeError: isinstance() argument 2 cannot be a parameterized generic" msgstr "" +">>> isinstance(1, int | list[int]) # short-circuit evaluation\n" +"True\n" +">>> isinstance([1], int | list[int])\n" +"Traceback (most recent call last):\n" +" ...\n" +"TypeError: isinstance() argument 2 cannot be a parameterized generic" #: ../Doc/library/stdtypes.rst:5238 msgid "" @@ -8836,17 +9489,23 @@ msgid "" " File \"\", line 1, in \n" "TypeError: cannot create 'types.UnionType' instances" msgstr "" +">>> import types\n" +">>> isinstance(int | str, types.UnionType)\n" +"True\n" +">>> types.UnionType()\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"TypeError: cannot create 'types.UnionType' instances" #: ../Doc/library/stdtypes.rst:5251 -#, fuzzy msgid "" "The :meth:`!__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`!__or__`, the Union may " "override it:" msgstr "" -"Se agregó el método :meth:`__or__` para objetos de tipo para admitir la " -"sintaxis ``X | Y``. Si una metaclase implementa :meth:`__or__`, la " -"Conversión puede anularlo::" +"Se agregó el método :meth:`!__or__` para objetos de tipo para admitir la " +"sintaxis ``X | Y``. Si una metaclase implementa :meth:`!__or__`, la Unión " +"puede anularlo:" #: ../Doc/library/stdtypes.rst:5255 msgid "" @@ -8862,6 +9521,17 @@ msgid "" ">>> int | C\n" "int | C" msgstr "" +">>> class M(type):\n" +"... def __or__(self, other):\n" +"... return \"Hello\"\n" +"...\n" +">>> class C(metaclass=M):\n" +"... pass\n" +"...\n" +">>> C | int\n" +"'Hello'\n" +">>> int | C\n" +"int | C" #: ../Doc/library/stdtypes.rst:5271 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." @@ -8973,20 +9643,18 @@ msgid "Methods" msgstr "Métodos" #: ../Doc/library/stdtypes.rst:5340 -#, fuzzy msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: :ref:`built-in methods ` (such as :meth:" "`append` on lists) and :ref:`class instance method `. " "Built-in methods are described with the types that support them." msgstr "" -"Los métodos son funciones que se llaman usando la notación de atributos. Hay " -"de dos tipos: métodos básicos o predefinidos (como el método :meth:`append` " -"en las listas) y métodos de instancia de clase. Los métodos básicos o " -"predefinidos se describen junto con los tipos que los soportan." +"Los métodos son funciones que se llaman mediante la notación de atributos. " +"Hay dos tipos: :ref:`built-in methods ` (como :meth:" +"`append` en listas) y :ref:`class instance method `. Los " +"métodos integrados se describen con los tipos que los admiten." #: ../Doc/library/stdtypes.rst:5345 -#, fuzzy msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :ref:" @@ -8998,18 +9666,18 @@ msgid "" "is completely equivalent to calling ``m.__func__(m.__self__, arg-1, " "arg-2, ..., arg-n)``." msgstr "" -"Si se accede a un método (una función definida dentro de un espacio de " -"nombres de una clase) a través de una instancia, se obtiene un objeto " -"especial, un :dfn:`bound method` (también llamado :dfn:`instance method`). " -"Cuando se llama, se añade automáticamente el parámetro ``self`` a la lista " -"de parámetros. Los métodos ligados tienen dos atributos especiales de solo " -"lectura: ``m.__self__`` es el objeto sobre el que está operando el método, y " -"``m.__func__`` es la función que implementa el método. Llamar ``m(arg-1, " -"arg-2, ..., arg-n)`` es completamente equivalente a llamar ``m.__func__(m." -"__self__, arg-1, arg-2, ..., arg-n)``." +"Si accede a un método (una función definida en un espacio de nombres de " +"clase) a través de una instancia, obtendrá un objeto especial: un objeto :" +"dfn:`método enlazado` (también llamado :ref:`instance method `). Cuando se lo llama, agregará el argumento ``self`` a la lista de " +"argumentos. Los métodos enlazados tienen dos atributos especiales de solo " +"lectura: :attr:`m.__self__ ` es el objeto en el que opera " +"el método y :attr:`m.__func__ ` es la función que " +"implementa el método. Llamar a ``m(arg-1, arg-2, ..., arg-n)`` es " +"completamente equivalente a llamar a ``m.__func__(m.__self__, arg-1, " +"arg-2, ..., arg-n)``." #: ../Doc/library/stdtypes.rst:5356 -#, fuzzy msgid "" "Like :ref:`function objects `, bound method objects " "support getting arbitrary attributes. However, since method attributes are " @@ -9019,13 +9687,14 @@ msgid "" "In order to set a method attribute, you need to explicitly set it on the " "underlying function object:" msgstr "" -"Al igual que los objetos de tipo función, los métodos ligados o de instancia " -"soportan asignación de atributos arbitrarios. Sin embargo, como los " -"atributos de los métodos se almacenan en la función subyacente (``meth." -"__func__``), definir cualquier atributo en métodos ligados está " -"desaconsejado. Intentar asignar un atributo a un método produce que se lance " -"una excepción de tipo :exc:`AttributeError`. Para poder definir un atributo " -"a un método, este debe ser definido explícitamente en la función subyacente::" +"Al igual que :ref:`function objects `, los objetos de " +"método enlazados admiten la obtención de atributos arbitrarios. Sin embargo, " +"dado que los atributos de método se almacenan en realidad en el objeto de " +"función subyacente (:attr:`method.__func__`), no se permite configurar " +"atributos de método en métodos enlazados. Intentar configurar un atributo en " +"un método da como resultado que se genere un :exc:`AttributeError`. Para " +"configurar un atributo de método, debe configurarlo explícitamente en el " +"objeto de función subyacente:" #: ../Doc/library/stdtypes.rst:5364 msgid "" @@ -9042,18 +9711,28 @@ msgid "" ">>> c.method.whoami\n" "'my name is method'" msgstr "" +">>> class C:\n" +"... def method(self):\n" +"... pass\n" +"...\n" +">>> c = C()\n" +">>> c.method.whoami = 'my name is method' # can't set on the method\n" +"Traceback (most recent call last):\n" +" File \"\", line 1, in \n" +"AttributeError: 'method' object has no attribute 'whoami'\n" +">>> c.method.__func__.whoami = 'my name is method'\n" +">>> c.method.whoami\n" +"'my name is method'" #: ../Doc/library/stdtypes.rst:5379 -#, fuzzy msgid "See :ref:`instance-methods` for more information." -msgstr "Véase :ref:`types` para más información." +msgstr "Véase :ref:`instance-methods` para más información." #: ../Doc/library/stdtypes.rst:5387 msgid "Code Objects" msgstr "Objetos código" #: ../Doc/library/stdtypes.rst:5393 -#, fuzzy msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -9062,23 +9741,22 @@ msgid "" "function and can be extracted from function objects through their :attr:" "`~function.__code__` attribute. See also the :mod:`code` module." msgstr "" -"Los objetos de tipo código son usados por la implementación del lenguaje " -"para representar código ejecutable \"pseudo-compilado\", como por ejemplo el " -"cuerpo de una función. A diferencia de los objetos de tipo función, no " -"contienen una referencia a un entorno global de ejecución. Los objetos de " -"tipo código se pueden obtener usando la función básica :func:`compile` o se " -"pueden extraer a partir de objetos de tipo función a través de su atributo :" -"attr:`__code__`. Para más detalle véase el módulo :mod:`code`." +"La implementación utiliza objetos de código para representar código Python " +"ejecutable \"pseudocompilado\", como el cuerpo de una función. Se " +"diferencian de los objetos de función porque no contienen una referencia a " +"su entorno de ejecución global. Los objetos de código son devueltos por la " +"función :func:`compile` incorporada y se pueden extraer de los objetos de " +"función a través de su atributo :attr:`~function.__code__`. Consulte también " +"el módulo :mod:`code`." #: ../Doc/library/stdtypes.rst:5400 -#, fuzzy msgid "" "Accessing :attr:`~function.__code__` raises an :ref:`auditing event " "` ``object.__getattr__`` with arguments ``obj`` and " "``\"__code__\"``." msgstr "" -"Al acceder a ``__code__`` se lanza un :ref:`evento de auditoría ` " -"``object.__getattr__`` con argumentos ``obj`` y ``\"__code__\"``." +"Al acceder a :attr:`~function.__code__` se genera un :ref:`auditing event " +"` ``object.__getattr__`` con argumentos ``obj`` y ``\"__code__\"``." #: ../Doc/library/stdtypes.rst:5407 msgid "" @@ -9160,38 +9838,35 @@ msgid "The NotImplemented Object" msgstr "El objeto *NotImplemented*" #: ../Doc/library/stdtypes.rst:5461 -#, fuzzy msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " "more information. There is exactly one :data:`NotImplemented` object. :code:" "`type(NotImplemented)()` produces the singleton instance." msgstr "" -"Este objeto se retorna en todas las operaciones binarias y comparaciones " -"cuando se intenta operar con tipos que no están soportados. Véase :ref:" -"`comparisons` para más información. Solo existe un objeto de tipo " -"``NotImplemented``. La expresión ``type(NotImplemented)()`` produce el mismo " -"objeto, esto se conoce como *Singleton*." +"Este objeto se devuelve a partir de comparaciones y operaciones binarias " +"cuando se les pide que operen en tipos que no admiten. Consulte :ref:" +"`comparisons` para obtener más información. Hay exactamente un objeto :data:" +"`NotImplemented`. :code:`type(NotImplemented)()` produce la instancia " +"singleton." #: ../Doc/library/stdtypes.rst:5466 -#, fuzzy msgid "It is written as :code:`NotImplemented`." -msgstr "Se escribe ``NotImplemented``." +msgstr "Se escribe como :code:`NotImplemented`." #: ../Doc/library/stdtypes.rst:5472 msgid "Internal Objects" msgstr "Objetos internos" #: ../Doc/library/stdtypes.rst:5474 -#, fuzzy msgid "" "See :ref:`types` for this information. It describes :ref:`stack frame " "objects `, :ref:`traceback objects `, and " "slice objects." msgstr "" -"Véase la sección :ref:`types` para saber más de estos objetos. Se describen " -"los objetos marco de pila, los objetos de traza de ejecución (*traceback*) y " -"los objetos de tipo segmento (*slice*)." +"Consulte :ref:`types` para obtener esta información. Describe :ref:`stack " +"frame objects `, :ref:`traceback objects ` " +"y los objetos de sector." #: ../Doc/library/stdtypes.rst:5482 msgid "Special Attributes" @@ -9223,12 +9898,14 @@ msgstr "" #: ../Doc/library/stdtypes.rst:5505 msgid "The name of the module in which a class or function was defined." -msgstr "" +msgstr "El nombre del módulo en el que se definió una clase o función." #: ../Doc/library/stdtypes.rst:5510 msgid "" "The documentation string of a class or function, or ``None`` if undefined." msgstr "" +"La cadena de documentación de una clase o función, o ``None`` si no está " +"definida." #: ../Doc/library/stdtypes.rst:5515 msgid "" @@ -9236,6 +9913,9 @@ msgid "" "ref:`type aliases `. For classes and functions that are not " "generic, this will be an empty tuple." msgstr "" +":ref:`type parameters ` de clases y funciones genéricas y :ref:" +"`type aliases `. Para clases y funciones que no sean " +"genéricas, será una tupla vacía." #: ../Doc/library/stdtypes.rst:5525 msgid "Integer string conversion length limitation" @@ -9255,7 +9935,6 @@ msgstr "" "configurar el límite." #: ../Doc/library/stdtypes.rst:5532 -#, fuzzy msgid "" "The :class:`int` type in CPython is an arbitrary length number stored in " "binary form (commonly known as a \"bignum\"). There exists no algorithm that " @@ -9264,23 +9943,20 @@ msgid "" "algorithms for base 10 have sub-quadratic complexity. Converting a large " "value such as ``int('1' * 500_000)`` can take over a second on a fast CPU." msgstr "" -"El tipo :class:`int` en CPython es un número con longitud arbitrario que se " -"almacena en forma binaria (se conoce comúnmente como \"bignum\"). No existe " -"ningún algoritmo que pueda convertir una cadena de caracteres a un entero " -"binario o un entero binario a una cadena de caracteres en tiempo lineal, *a " -"menos* que la base sea una potencia de 2. Incluso los algoritmos más " -"conocidos para la base a 10 tienen una complejidad subcuadrática. Convertir " -"un valor grande como ``int('1' * 500_000)`` puede tomar más de un segundo en " -"una CPU rápida." +"El tipo :class:`int` en CPython es un número de longitud arbitraria " +"almacenado en formato binario (comúnmente conocido como \"bignum\"). No " +"existe ningún algoritmo que pueda convertir una cadena en un entero binario " +"o un entero binario en una cadena en tiempo lineal; *unless* tiene como base " +"una potencia de 2. Incluso los algoritmos más conocidos para la base 10 " +"tienen una complejidad subcuadrática. Convertir un valor grande como " +"``int('1' * 500_000)`` puede llevar más de un segundo en una CPU rápida." #: ../Doc/library/stdtypes.rst:5539 -#, fuzzy msgid "" "Limiting conversion size offers a practical way to avoid :cve:`2020-10735`." msgstr "" -"Limitar el tamaño de la conversión ofrece una forma práctica para evitar " -"`CVE-2020-10735 `_." +"Limitar el tamaño de la conversión ofrece una forma práctica de evitar :cve:" +"`2020-10735`." #: ../Doc/library/stdtypes.rst:5541 msgid "" @@ -9322,6 +9998,27 @@ msgid "" "7144\n" ">>> assert int(hex(i_squared), base=16) == i*i # Hexadecimal is unlimited." msgstr "" +">>> import sys\n" +">>> sys.set_int_max_str_digits(4300) # Illustrative, this is the default.\n" +">>> _ = int('2' * 5432)\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: Exceeds the limit (4300 digits) for integer string conversion: " +"value has 5432 digits; use sys.set_int_max_str_digits() to increase the " +"limit\n" +">>> i = int('2' * 4300)\n" +">>> len(str(i))\n" +"4300\n" +">>> i_squared = i*i\n" +">>> len(str(i_squared))\n" +"Traceback (most recent call last):\n" +"...\n" +"ValueError: Exceeds the limit (4300 digits) for integer string conversion; " +"use sys.set_int_max_str_digits() to increase the limit\n" +">>> len(hex(i_squared))\n" +"7144\n" +">>> assert int(hex(i_squared), base=16) == i*i # Hexadecimal no tiene " +"límite." #: ../Doc/library/stdtypes.rst:5567 msgid "" @@ -9349,6 +10046,13 @@ msgid "" "... '571186405732').to_bytes(53, 'big')\n" "..." msgstr "" +">>> import sys\n" +">>> assert sys.int_info.default_max_str_digits == 4300, sys.int_info\n" +">>> assert sys.int_info.str_digits_check_threshold == 640, sys.int_info\n" +">>> msg = int('578966293710682886880994035146873798396722250538762761564'\n" +"... '9252925514383915483333812743580549779436104706260696366600'\n" +"... '571186405732').to_bytes(53, 'big')\n" +"..." #: ../Doc/library/stdtypes.rst:5587 msgid "Affected APIs" @@ -9376,9 +10080,8 @@ msgid "``str(integer)``." msgstr "``str(integer)``." #: ../Doc/library/stdtypes.rst:5595 -#, fuzzy msgid "``repr(integer)``." -msgstr "``repr(integer)``" +msgstr "``repr(integer)``." #: ../Doc/library/stdtypes.rst:5596 #, python-format @@ -9448,7 +10151,6 @@ msgstr "" "int_max_str_digits=640``" #: ../Doc/library/stdtypes.rst:5619 -#, fuzzy msgid "" ":data:`sys.flags.int_max_str_digits` contains the value of :envvar:" "`PYTHONINTMAXSTRDIGITS` or :option:`-X int_max_str_digits <-X>`. If both the " @@ -9458,10 +10160,10 @@ msgid "" msgstr "" ":data:`sys.flags.int_max_str_digits` contiene el valor de :envvar:" "`PYTHONINTMAXSTRDIGITS` o :option:`-X int_max_str_digits <-X>`. Si tanto la " -"variable env como la opción ``-X`` están configuradas, la opción ``-X`` " -"tiene prioridad. Un valor de *-1* indica que ambos no están configurados, " -"por lo que se usó un valor de :data:`sys.int_info.default_max_str_digits` " -"durante la inicialización." +"variable de entorno como la opción ``-X`` están configuradas, la opción ``-" +"X`` tiene prioridad. Un valor de *-1* indica que ambas opciones no estaban " +"configuradas, por lo que se utilizó un valor de :data:`sys.int_info." +"default_max_str_digits` durante la inicialización." #: ../Doc/library/stdtypes.rst:5625 msgid "" @@ -9482,13 +10184,12 @@ msgstr "" "subintérpretes tienen su propio límite." #: ../Doc/library/stdtypes.rst:5632 -#, fuzzy msgid "" "Information about the default and minimum can be found in :data:`sys." "int_info`:" msgstr "" -"La información sobre el valor predeterminado y mínimo se puede encontrar en :" -"attr:`sys.int_info`:" +"La información sobre los valores predeterminados y mínimos se puede " +"encontrar en :data:`sys.int_info`:" #: ../Doc/library/stdtypes.rst:5634 msgid "" @@ -9545,7 +10246,6 @@ msgid "Recommended configuration" msgstr "Configuración recomendada" #: ../Doc/library/stdtypes.rst:5660 -#, fuzzy msgid "" "The default :data:`sys.int_info.default_max_str_digits` is expected to be " "reasonable for most applications. If your application requires a different " @@ -9554,10 +10254,10 @@ msgid "" msgstr "" "Se espera que el valor predeterminado :data:`sys.int_info." "default_max_str_digits` sea razonable para la mayoría de las aplicaciones. " -"Si tu aplicación requiere un límite diferente, configúralo desde el punto de " -"entrada principal utilizando el código independiente de la versión de " -"Python, ya que estas APIs se agregaron en versiones de parches de seguridad " -"en versiones anteriores a la 3.11." +"Si su aplicación requiere un límite diferente, configúrelo desde el punto de " +"entrada principal mediante un código independiente de la versión de Python, " +"ya que estas API se agregaron en versiones de parches de seguridad " +"anteriores a la 3.12." #: ../Doc/library/stdtypes.rst:5665 msgid "Example::" @@ -9575,6 +10275,15 @@ msgid "" "... elif current_limit < lower_bound:\n" "... sys.set_int_max_str_digits(lower_bound)" msgstr "" +">>> import sys\n" +">>> if hasattr(sys, \"set_int_max_str_digits\"):\n" +"... upper_bound = 68000\n" +"... lower_bound = 4004\n" +"... current_limit = sys.get_int_max_str_digits()\n" +"... if current_limit == 0 or current_limit > upper_bound:\n" +"... sys.set_int_max_str_digits(upper_bound)\n" +"... elif current_limit < lower_bound:\n" +"... sys.set_int_max_str_digits(lower_bound)" #: ../Doc/library/stdtypes.rst:5677 msgid "If you need to disable it entirely, set it to ``0``." @@ -9625,148 +10334,134 @@ msgstr "" "un único elemento, que sería la tupla a ser formateada." #: ../Doc/library/stdtypes.rst:13 -#, fuzzy msgid "built-in" -msgstr "Tipos integrados" +msgstr "integrados" #: ../Doc/library/stdtypes.rst:13 ../Doc/library/stdtypes.rst:316 #: ../Doc/library/stdtypes.rst:393 ../Doc/library/stdtypes.rst:950 #: ../Doc/library/stdtypes.rst:1117 ../Doc/library/stdtypes.rst:1139 #: ../Doc/library/stdtypes.rst:1154 ../Doc/library/stdtypes.rst:4435 #: ../Doc/library/stdtypes.rst:5418 -#, fuzzy msgid "types" -msgstr "Tuplas" +msgstr "tipos" #: ../Doc/library/stdtypes.rst:34 ../Doc/library/stdtypes.rst:1154 #: ../Doc/library/stdtypes.rst:4435 msgid "statement" -msgstr "" +msgstr "statement" #: ../Doc/library/stdtypes.rst:34 msgid "if" -msgstr "" +msgstr "if" #: ../Doc/library/stdtypes.rst:34 msgid "while" -msgstr "" +msgstr "while" #: ../Doc/library/stdtypes.rst:34 msgid "truth" -msgstr "" +msgstr "truth" #: ../Doc/library/stdtypes.rst:34 msgid "value" -msgstr "" +msgstr "value" #: ../Doc/library/stdtypes.rst:34 ../Doc/library/stdtypes.rst:81 #: ../Doc/library/stdtypes.rst:208 ../Doc/library/stdtypes.rst:817 -#, fuzzy msgid "Boolean" -msgstr "Valores booleanos" +msgstr "Boolean" #: ../Doc/library/stdtypes.rst:34 ../Doc/library/stdtypes.rst:81 #: ../Doc/library/stdtypes.rst:393 -#, fuzzy msgid "operations" -msgstr "Operación" +msgstr "operaciones" #: ../Doc/library/stdtypes.rst:34 msgid "false" -msgstr "" +msgstr "false" #: ../Doc/library/stdtypes.rst:44 -#, fuzzy msgid "true" -msgstr "Tuplas" +msgstr "verdad" #: ../Doc/library/stdtypes.rst:52 -#, fuzzy msgid "None (Built-in object)" -msgstr "Otros tipos predefinidos" +msgstr "None (objecto integrado)" #: ../Doc/library/stdtypes.rst:52 msgid "False (Built-in object)" -msgstr "" +msgstr "False (Built-in object)" #: ../Doc/library/stdtypes.rst:64 ../Doc/library/stdtypes.rst:98 #: ../Doc/library/stdtypes.rst:123 ../Doc/library/stdtypes.rst:195 #: ../Doc/library/stdtypes.rst:246 ../Doc/library/stdtypes.rst:393 #: ../Doc/library/stdtypes.rst:950 -#, fuzzy msgid "operator" -msgstr "Operación" +msgstr "operador" #: ../Doc/library/stdtypes.rst:64 ../Doc/library/stdtypes.rst:98 msgid "or" -msgstr "" +msgstr "or" #: ../Doc/library/stdtypes.rst:64 ../Doc/library/stdtypes.rst:98 -#, fuzzy msgid "and" -msgstr "y::" +msgstr "and" #: ../Doc/library/stdtypes.rst:64 ../Doc/library/stdtypes.rst:817 msgid "False" -msgstr "" +msgstr "False" #: ../Doc/library/stdtypes.rst:64 ../Doc/library/stdtypes.rst:817 -#, fuzzy msgid "True" -msgstr "Tuplas" +msgstr "True" #: ../Doc/library/stdtypes.rst:98 -#, fuzzy msgid "not" -msgstr "Notas" +msgstr "not" #: ../Doc/library/stdtypes.rst:123 -#, fuzzy msgid "chaining" -msgstr "Significado" +msgstr "encadenamiento" #: ../Doc/library/stdtypes.rst:123 -#, fuzzy msgid "comparisons" -msgstr "Comparaciones" +msgstr "comparaciones" #: ../Doc/library/stdtypes.rst:123 -#, fuzzy msgid "comparison" -msgstr "Comparaciones" +msgstr "comparación" #: ../Doc/library/stdtypes.rst:123 msgid "==" -msgstr "" +msgstr "==" #: ../Doc/library/stdtypes.rst:123 msgid "< (less)" -msgstr "" +msgstr "< (menor)" #: ../Doc/library/stdtypes.rst:123 msgid "<=" -msgstr "" +msgstr "<=" #: ../Doc/library/stdtypes.rst:123 msgid "> (greater)" -msgstr "" +msgstr "> (mayor)" #: ../Doc/library/stdtypes.rst:123 msgid ">=" -msgstr "" +msgstr ">=" #: ../Doc/library/stdtypes.rst:123 msgid "!=" -msgstr "" +msgstr "!=" #: ../Doc/library/stdtypes.rst:123 msgid "is" -msgstr "" +msgstr "is" #: ../Doc/library/stdtypes.rst:123 -#, fuzzy msgid "is not" -msgstr "``is not``" +msgstr "is not" #: ../Doc/library/stdtypes.rst:163 ../Doc/library/stdtypes.rst:208 #: ../Doc/library/stdtypes.rst:934 ../Doc/library/stdtypes.rst:1117 @@ -9778,668 +10473,609 @@ msgstr "``is not``" #: ../Doc/library/stdtypes.rst:4435 ../Doc/library/stdtypes.rst:4913 #: ../Doc/library/stdtypes.rst:5168 ../Doc/library/stdtypes.rst:5338 #: ../Doc/library/stdtypes.rst:5382 -#, fuzzy msgid "object" -msgstr "Objetos Tipo" +msgstr "object" #: ../Doc/library/stdtypes.rst:163 ../Doc/library/stdtypes.rst:208 #: ../Doc/library/stdtypes.rst:229 ../Doc/library/stdtypes.rst:316 #: ../Doc/library/stdtypes.rst:335 msgid "numeric" -msgstr "" +msgstr "numeric" #: ../Doc/library/stdtypes.rst:163 -#, fuzzy msgid "objects" -msgstr "Objetos Tipo" +msgstr "objectos" #: ../Doc/library/stdtypes.rst:163 -#, fuzzy msgid "comparing" -msgstr "Comparaciones" +msgstr "comparando" #: ../Doc/library/stdtypes.rst:173 msgid "__eq__() (instance method)" -msgstr "" +msgstr "__eq__() (método instancia)" #: ../Doc/library/stdtypes.rst:173 msgid "__ne__() (instance method)" -msgstr "" +msgstr "__ne__() (método instancia)" #: ../Doc/library/stdtypes.rst:173 msgid "__lt__() (instance method)" -msgstr "" +msgstr "__lt__() (método instancia)" #: ../Doc/library/stdtypes.rst:173 msgid "__le__() (instance method)" -msgstr "" +msgstr "__le__() (método instancia)" #: ../Doc/library/stdtypes.rst:173 msgid "__gt__() (instance method)" -msgstr "" +msgstr "__gt__() (método instancia)" #: ../Doc/library/stdtypes.rst:173 msgid "__ge__() (instance method)" -msgstr "" +msgstr "__ge__() (método instancia)" #: ../Doc/library/stdtypes.rst:195 ../Doc/library/stdtypes.rst:950 msgid "in" -msgstr "" +msgstr "in" #: ../Doc/library/stdtypes.rst:195 ../Doc/library/stdtypes.rst:950 -#, fuzzy msgid "not in" -msgstr "``x not in s``" +msgstr "not in" #: ../Doc/library/stdtypes.rst:208 ../Doc/library/stdtypes.rst:229 #: ../Doc/library/stdtypes.rst:393 msgid "integer" -msgstr "" +msgstr "integer" #: ../Doc/library/stdtypes.rst:208 ../Doc/library/stdtypes.rst:229 -#, fuzzy msgid "floating-point" -msgstr "Formato en coma flotante decimal." +msgstr "coma flotante" #: ../Doc/library/stdtypes.rst:208 ../Doc/library/stdtypes.rst:229 msgid "complex number" -msgstr "" +msgstr "complex number" #: ../Doc/library/stdtypes.rst:208 msgid "C" -msgstr "" +msgstr "C" #: ../Doc/library/stdtypes.rst:208 msgid "language" -msgstr "" +msgstr "languaje" #: ../Doc/library/stdtypes.rst:229 msgid "literals" -msgstr "" +msgstr "literales" #: ../Doc/library/stdtypes.rst:229 msgid "hexadecimal" -msgstr "" +msgstr "hexadecimal" #: ../Doc/library/stdtypes.rst:229 msgid "octal" -msgstr "" +msgstr "octal" #: ../Doc/library/stdtypes.rst:229 msgid "binary" -msgstr "" +msgstr "binario" #: ../Doc/library/stdtypes.rst:246 msgid "arithmetic" -msgstr "" +msgstr "aritmética" #: ../Doc/library/stdtypes.rst:246 ../Doc/library/stdtypes.rst:950 #: ../Doc/library/stdtypes.rst:1117 ../Doc/library/stdtypes.rst:4435 #: ../Doc/library/stdtypes.rst:5389 ../Doc/library/stdtypes.rst:5403 #: ../Doc/library/stdtypes.rst:5418 -#, fuzzy msgid "built-in function" -msgstr "Tipos integrados" +msgstr "función integrada" #: ../Doc/library/stdtypes.rst:246 msgid "int" -msgstr "" +msgstr "int" #: ../Doc/library/stdtypes.rst:246 -#, fuzzy msgid "float" -msgstr "Flag" +msgstr "float" #: ../Doc/library/stdtypes.rst:246 -#, fuzzy msgid "complex" -msgstr ":func:`complex`" +msgstr "complejo" #: ../Doc/library/stdtypes.rst:246 ../Doc/library/stdtypes.rst:2402 #: ../Doc/library/stdtypes.rst:3621 msgid "+ (plus)" -msgstr "" +msgstr "+ (más)" #: ../Doc/library/stdtypes.rst:246 -#, fuzzy msgid "unary operator" -msgstr "Separador de grupo" +msgstr "operador unario" #: ../Doc/library/stdtypes.rst:246 -#, fuzzy msgid "binary operator" -msgstr "Separador de grupo" +msgstr "operador binario" #: ../Doc/library/stdtypes.rst:246 ../Doc/library/stdtypes.rst:2402 #: ../Doc/library/stdtypes.rst:3621 msgid "- (minus)" -msgstr "" +msgstr "- (menos)" #: ../Doc/library/stdtypes.rst:246 ../Doc/library/stdtypes.rst:2359 #: ../Doc/library/stdtypes.rst:3578 msgid "* (asterisk)" -msgstr "" +msgstr "* (asterisco)" #: ../Doc/library/stdtypes.rst:246 msgid "/ (slash)" -msgstr "" +msgstr "/ (slash)" #: ../Doc/library/stdtypes.rst:246 msgid "//" -msgstr "" +msgstr "//" #: ../Doc/library/stdtypes.rst:246 ../Doc/library/stdtypes.rst:2323 #: ../Doc/library/stdtypes.rst:3546 msgid "% (percent)" -msgstr "" +msgstr "% (porcentaje)" #: ../Doc/library/stdtypes.rst:246 msgid "**" -msgstr "" +msgstr "**" #: ../Doc/library/stdtypes.rst:316 ../Doc/library/stdtypes.rst:393 #: ../Doc/library/stdtypes.rst:950 ../Doc/library/stdtypes.rst:1154 #: ../Doc/library/stdtypes.rst:4435 -#, fuzzy msgid "operations on" -msgstr "Operación" +msgstr "operaciones sobre" #: ../Doc/library/stdtypes.rst:316 -#, fuzzy msgid "conjugate() (complex number method)" -msgstr "conjugado del número complejo *c*" +msgstr "conjugate() (método número complejo)" #: ../Doc/library/stdtypes.rst:335 ../Doc/library/stdtypes.rst:1606 #: ../Doc/library/stdtypes.rst:2526 ../Doc/library/stdtypes.rst:5418 -#, fuzzy msgid "module" -msgstr "Módulos" +msgstr "módulo" #: ../Doc/library/stdtypes.rst:335 msgid "math" -msgstr "" +msgstr "math" #: ../Doc/library/stdtypes.rst:335 msgid "floor() (in module math)" -msgstr "" +msgstr "floor() (en el módulo math)" #: ../Doc/library/stdtypes.rst:335 msgid "ceil() (in module math)" -msgstr "" +msgstr "ceil() (en el módulo math)" #: ../Doc/library/stdtypes.rst:335 msgid "trunc() (in module math)" -msgstr "" +msgstr "trunc() (en el módulo math)" #: ../Doc/library/stdtypes.rst:335 -#, fuzzy msgid "conversions" -msgstr "Conversión" +msgstr "conversiones" #: ../Doc/library/stdtypes.rst:393 msgid "bitwise" -msgstr "" +msgstr "bitwise" #: ../Doc/library/stdtypes.rst:393 msgid "shifting" -msgstr "" +msgstr "deslizamiento" #: ../Doc/library/stdtypes.rst:393 -#, fuzzy msgid "masking" -msgstr "Significado" +msgstr "enmascaramiento" #: ../Doc/library/stdtypes.rst:393 msgid "| (vertical bar)" -msgstr "" +msgstr "| (barra vertical)" #: ../Doc/library/stdtypes.rst:393 msgid "^ (caret)" -msgstr "" +msgstr "^ (caret)" #: ../Doc/library/stdtypes.rst:393 msgid "& (ampersand)" -msgstr "" +msgstr "& (ampersand)" #: ../Doc/library/stdtypes.rst:393 msgid "<<" -msgstr "" +msgstr "<<" #: ../Doc/library/stdtypes.rst:393 msgid ">>" -msgstr "" +msgstr ">>" #: ../Doc/library/stdtypes.rst:393 msgid "~ (tilde)" -msgstr "" +msgstr "~ (tilde)" #: ../Doc/library/stdtypes.rst:817 -#, fuzzy msgid "values" -msgstr "Valores booleanos" +msgstr "valores" #: ../Doc/library/stdtypes.rst:847 -#, fuzzy msgid "iterator protocol" -msgstr "Tipos de iteradores" +msgstr "protocolo de iterador" #: ../Doc/library/stdtypes.rst:847 ../Doc/library/stdtypes.rst:4828 msgid "protocol" -msgstr "" +msgstr "protocolo" #: ../Doc/library/stdtypes.rst:847 -#, fuzzy msgid "iterator" -msgstr "Tipos de iteradores" +msgstr "iterador" #: ../Doc/library/stdtypes.rst:847 ../Doc/library/stdtypes.rst:934 #: ../Doc/library/stdtypes.rst:950 ../Doc/library/stdtypes.rst:1117 #: ../Doc/library/stdtypes.rst:1139 ../Doc/library/stdtypes.rst:1154 msgid "sequence" -msgstr "" +msgstr "sequence" #: ../Doc/library/stdtypes.rst:847 -#, fuzzy msgid "iteration" -msgstr "Operación" +msgstr "iteración" #: ../Doc/library/stdtypes.rst:847 msgid "container" -msgstr "" +msgstr "container" #: ../Doc/library/stdtypes.rst:847 -#, fuzzy msgid "iteration over" -msgstr "Operación" +msgstr "iteración sobre" #: ../Doc/library/stdtypes.rst:950 ../Doc/library/stdtypes.rst:4435 msgid "len" -msgstr "" +msgstr "len" #: ../Doc/library/stdtypes.rst:950 -#, fuzzy msgid "min" -msgstr "Significado" +msgstr "min" #: ../Doc/library/stdtypes.rst:950 msgid "max" -msgstr "" +msgstr "max" #: ../Doc/library/stdtypes.rst:950 -#, fuzzy msgid "concatenation" -msgstr "Operación" +msgstr "concatenación" #: ../Doc/library/stdtypes.rst:950 -#, fuzzy msgid "operation" -msgstr "Operación" +msgstr "operación" #: ../Doc/library/stdtypes.rst:950 -#, fuzzy msgid "repetition" -msgstr "Representación" +msgstr "repetición" #: ../Doc/library/stdtypes.rst:950 ../Doc/library/stdtypes.rst:1154 -#, fuzzy msgid "subscript" -msgstr "Descripción" +msgstr "subscript" #: ../Doc/library/stdtypes.rst:950 ../Doc/library/stdtypes.rst:1154 msgid "slice" -msgstr "" +msgstr "slice" #: ../Doc/library/stdtypes.rst:950 msgid "count() (sequence method)" -msgstr "" +msgstr "count() (sequence method)" #: ../Doc/library/stdtypes.rst:950 msgid "index() (sequence method)" -msgstr "" +msgstr "index() (sequence method)" #: ../Doc/library/stdtypes.rst:1006 msgid "loop" -msgstr "" +msgstr "loop" #: ../Doc/library/stdtypes.rst:1006 -#, fuzzy msgid "over mutable sequence" -msgstr "Tipos de secuencia mutables" +msgstr "sobre secuencia mutable" #: ../Doc/library/stdtypes.rst:1006 -#, fuzzy msgid "mutable sequence" -msgstr "Tipos de secuencia mutables" +msgstr "secuencia mutable" #: ../Doc/library/stdtypes.rst:1006 msgid "loop over" -msgstr "" +msgstr "loop over" #: ../Doc/library/stdtypes.rst:1117 msgid "immutable" -msgstr "" +msgstr "immutable" #: ../Doc/library/stdtypes.rst:1117 ../Doc/library/stdtypes.rst:1339 -#, fuzzy msgid "tuple" -msgstr "Tuplas" +msgstr "tuple" #: ../Doc/library/stdtypes.rst:1117 msgid "hash" -msgstr "" +msgstr "hash" #: ../Doc/library/stdtypes.rst:1139 msgid "mutable" -msgstr "" +msgstr "mutable" #: ../Doc/library/stdtypes.rst:1139 ../Doc/library/stdtypes.rst:1154 #: ../Doc/library/stdtypes.rst:1260 -#, fuzzy msgid "list" -msgstr "Listas" +msgstr "list" #: ../Doc/library/stdtypes.rst:1139 ../Doc/library/stdtypes.rst:2526 #: ../Doc/library/stdtypes.rst:2652 ../Doc/library/stdtypes.rst:2724 #: ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "bytearray" -msgstr "Objetos de tipo *Bytearray*" +msgstr "bytearray" #: ../Doc/library/stdtypes.rst:1154 ../Doc/library/stdtypes.rst:4435 #: ../Doc/library/stdtypes.rst:5168 ../Doc/library/stdtypes.rst:5418 -#, fuzzy msgid "type" -msgstr "Tuplas" +msgstr "type" #: ../Doc/library/stdtypes.rst:1154 msgid "assignment" -msgstr "" +msgstr "asignación" #: ../Doc/library/stdtypes.rst:1154 ../Doc/library/stdtypes.rst:4435 msgid "del" -msgstr "" +msgstr "del" #: ../Doc/library/stdtypes.rst:1154 msgid "append() (sequence method)" -msgstr "" +msgstr "append() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "clear() (sequence method)" -msgstr "" +msgstr "clear() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "copy() (sequence method)" -msgstr "" +msgstr "copy() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "extend() (sequence method)" -msgstr "" +msgstr "extend() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "insert() (sequence method)" -msgstr "" +msgstr "insert() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "pop() (sequence method)" -msgstr "" +msgstr "pop() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "remove() (sequence method)" -msgstr "" +msgstr "remove() (sequence method)" #: ../Doc/library/stdtypes.rst:1154 msgid "reverse() (sequence method)" -msgstr "" +msgstr "reverse() (sequence method)" #: ../Doc/library/stdtypes.rst:1383 -#, fuzzy msgid "range" -msgstr "Rangos" +msgstr "range" #: ../Doc/library/stdtypes.rst:1504 ../Doc/library/stdtypes.rst:1553 #: ../Doc/library/stdtypes.rst:1598 ../Doc/library/stdtypes.rst:2323 -#, fuzzy msgid "string" -msgstr "Métodos de las cadenas de caracteres" +msgstr "string" #: ../Doc/library/stdtypes.rst:1504 -#, fuzzy msgid "text sequence type" -msgstr "Tipos de secuencia mutables" +msgstr "tipo de secuencia de texto" #: ../Doc/library/stdtypes.rst:1504 ../Doc/library/stdtypes.rst:1553 #: ../Doc/library/stdtypes.rst:1571 -#, fuzzy msgid "str (built-in class)" -msgstr "Otros tipos predefinidos" +msgstr "str (clase incorporada)" #: ../Doc/library/stdtypes.rst:1504 msgid "(see also string)" -msgstr "" +msgstr "(Vea también string)" #: ../Doc/library/stdtypes.rst:1540 msgid "io.StringIO" -msgstr "" +msgstr "io.StringIO" #: ../Doc/library/stdtypes.rst:1571 ../Doc/library/stdtypes.rst:2518 msgid "buffer protocol" -msgstr "" +msgstr "buffer protocol" #: ../Doc/library/stdtypes.rst:1571 ../Doc/library/stdtypes.rst:2526 #: ../Doc/library/stdtypes.rst:2545 ../Doc/library/stdtypes.rst:2724 #: ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "bytes" -msgstr "Notas" +msgstr "bytes" #: ../Doc/library/stdtypes.rst:1598 ../Doc/library/stdtypes.rst:2724 -#, fuzzy msgid "methods" -msgstr "Métodos" +msgstr "métodos" #: ../Doc/library/stdtypes.rst:1606 msgid "re" -msgstr "" +msgstr "re" #: ../Doc/library/stdtypes.rst:2131 ../Doc/library/stdtypes.rst:3400 msgid "universal newlines" -msgstr "" +msgstr "universal newlines" #: ../Doc/library/stdtypes.rst:2131 -#, fuzzy msgid "str.splitlines method" -msgstr "Métodos de las cadenas de caracteres" +msgstr "método str.splitlines" #: ../Doc/library/stdtypes.rst:2323 msgid "formatting, string (%)" -msgstr "" +msgstr "formatting, string (%)" #: ../Doc/library/stdtypes.rst:2323 msgid "interpolation, string (%)" -msgstr "" +msgstr "interpolation, string (%)" #: ../Doc/library/stdtypes.rst:2323 msgid "formatting, printf" -msgstr "" +msgstr "formatting, printf" #: ../Doc/library/stdtypes.rst:2323 msgid "interpolation, printf" -msgstr "" +msgstr "interpolation, printf" #: ../Doc/library/stdtypes.rst:2323 ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "printf-style formatting" -msgstr "Usando el formateo tipo ``printf`` con bytes" +msgstr "formateo estilo printf" #: ../Doc/library/stdtypes.rst:2323 ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "sprintf-style formatting" -msgstr "Usando el formateo tipo ``printf`` con bytes" +msgstr "formateo con estilo sprintf" #: ../Doc/library/stdtypes.rst:2359 ../Doc/library/stdtypes.rst:3578 msgid "() (parentheses)" -msgstr "" +msgstr "() (paréntesis)" #: ../Doc/library/stdtypes.rst:2359 ../Doc/library/stdtypes.rst:2402 #: ../Doc/library/stdtypes.rst:3578 ../Doc/library/stdtypes.rst:3621 -#, fuzzy msgid "in printf-style formatting" -msgstr "Usando el formateo tipo ``printf`` con bytes" +msgstr "en formateo con estilo printf" #: ../Doc/library/stdtypes.rst:2359 ../Doc/library/stdtypes.rst:3578 msgid ". (dot)" -msgstr "" +msgstr ". (punto)" #: ../Doc/library/stdtypes.rst:2402 ../Doc/library/stdtypes.rst:3621 msgid "# (hash)" -msgstr "" +msgstr "# (hash)" #: ../Doc/library/stdtypes.rst:2402 ../Doc/library/stdtypes.rst:3621 msgid "space" -msgstr "" +msgstr "space" #: ../Doc/library/stdtypes.rst:2518 -#, fuzzy msgid "binary sequence types" -msgstr "Tipos de secuencia inmutables" +msgstr "tipo de secuencia binaria" #: ../Doc/library/stdtypes.rst:2526 -#, fuzzy msgid "memoryview" -msgstr "Vistas de memoria" +msgstr "memoryview" #: ../Doc/library/stdtypes.rst:2526 msgid "array" -msgstr "" +msgstr "array" #: ../Doc/library/stdtypes.rst:3400 msgid "bytes.splitlines method" -msgstr "" +msgstr "bytes.splitlines method" #: ../Doc/library/stdtypes.rst:3400 msgid "bytearray.splitlines method" -msgstr "" +msgstr "bytearray.splitlines method" #: ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "formatting" -msgstr "Operación" +msgstr "formateado" #: ../Doc/library/stdtypes.rst:3546 msgid "bytes (%)" -msgstr "" +msgstr "bytes (%)" #: ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "bytearray (%)" -msgstr "Objetos de tipo *Bytearray*" +msgstr "bytearray (%)" #: ../Doc/library/stdtypes.rst:3546 -#, fuzzy msgid "interpolation" -msgstr "Tabulación de línea" +msgstr "interpolación" #: ../Doc/library/stdtypes.rst:4233 msgid "set" -msgstr "" +msgstr "conjunto" #: ../Doc/library/stdtypes.rst:4435 -#, fuzzy msgid "mapping" -msgstr "Significado" +msgstr "mapeado" #: ../Doc/library/stdtypes.rst:4435 -#, fuzzy msgid "dictionary" -msgstr "Objetos tipos vista de diccionario" +msgstr "diccionario" #: ../Doc/library/stdtypes.rst:4518 msgid "__missing__()" -msgstr "" +msgstr "__missing__()" #: ../Doc/library/stdtypes.rst:4828 -#, fuzzy msgid "context manager" -msgstr "Tipos gestores de contexto" +msgstr "gestor de contexto" #: ../Doc/library/stdtypes.rst:4828 -#, fuzzy msgid "context management protocol" -msgstr "Tipos gestores de contexto" +msgstr "protocolo gestor de contexto" #: ../Doc/library/stdtypes.rst:4828 -#, fuzzy msgid "context management" -msgstr "Tipos gestores de contexto" +msgstr "gestión de contexto" #: ../Doc/library/stdtypes.rst:4901 -#, fuzzy msgid "annotation" -msgstr "Operación" +msgstr "anotación" #: ../Doc/library/stdtypes.rst:4901 msgid "type annotation; type hint" -msgstr "" +msgstr "type annotation; type hint" #: ../Doc/library/stdtypes.rst:4913 -#, fuzzy msgid "GenericAlias" -msgstr "Tipo Alias Genérico" +msgstr "GenericAlias" #: ../Doc/library/stdtypes.rst:4913 msgid "Generic" -msgstr "" +msgstr "Generic" #: ../Doc/library/stdtypes.rst:4913 -#, fuzzy msgid "Alias" -msgstr "Listas" +msgstr "Alias" #: ../Doc/library/stdtypes.rst:5168 -#, fuzzy msgid "Union" -msgstr "Funciones" +msgstr "Unión" #: ../Doc/library/stdtypes.rst:5168 -#, fuzzy msgid "union" -msgstr "Funciones" +msgstr "unión" #: ../Doc/library/stdtypes.rst:5338 -#, fuzzy msgid "method" -msgstr "Métodos" +msgstr "método" #: ../Doc/library/stdtypes.rst:5382 msgid "code" -msgstr "" +msgstr "code" #: ../Doc/library/stdtypes.rst:5382 -#, fuzzy msgid "code object" -msgstr "Objetos código" +msgstr "Objetos code" #: ../Doc/library/stdtypes.rst:5389 msgid "compile" -msgstr "" +msgstr "compile" #: ../Doc/library/stdtypes.rst:5389 msgid "__code__ (function object attribute)" -msgstr "" +msgstr "__code__ (function object attribute)" #: ../Doc/library/stdtypes.rst:5403 msgid "exec" -msgstr "" +msgstr "exec" #: ../Doc/library/stdtypes.rst:5403 -#, fuzzy msgid "eval" -msgstr "igual que" +msgstr "eval" #: ../Doc/library/stdtypes.rst:5442 msgid "..." -msgstr "" +msgstr "..." #: ../Doc/library/stdtypes.rst:5442 msgid "ellipsis literal" -msgstr "" +msgstr "ellipsis literal"