Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e28ba1

Browse files
committed
Traducido hasta iteradores (20% aprox)
1 parent ffc8a79 commit 9e28ba1

File tree

1 file changed

+124
-10
lines changed

1 file changed

+124
-10
lines changed

library/stdtypes.po

Lines changed: 124 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgstr ""
1111
"Project-Id-Version: Python 3.8\n"
1212
"Report-Msgid-Bugs-To: \n"
1313
"POT-Creation-Date: 2020-05-05 12:54+0200\n"
14-
"PO-Revision-Date: 2020-05-10 20:13+0100\n"
14+
"PO-Revision-Date: 2020-05-13 18:54+0100\n"
1515
"Last-Translator: Juan Ignacio Rodríguez de León <[email protected]>\n"
1616
"Language-Team: python-doc-es\n"
1717
"MIME-Version: 1.0\n"
@@ -981,10 +981,9 @@ msgid ""
981981
"given, an :exc:`OverflowError` is raised. The default value for *signed* is "
982982
"``False``."
983983
msgstr ""
984-
"El argumento *signed* determina si se representará el signo usando "
985-
"complemento a dos. Si *signed* es ``False``, y se usa un valor entero "
986-
"negativo, se elevará la excepción :exec:`OverflowError`. El valor por "
987-
"defecto para *signed* es ``False``."
984+
"cazz Si *signed* es ``False``, y se usa un valor entero negativo, se elevará "
985+
"la excepción :exec:`OverflowError`. El valor por defecto para *signed* es "
986+
"``False``."
988987

989988
#: ../Doc/library/stdtypes.rst:517
990989
msgid "Return the integer represented by the given array of bytes."
@@ -1003,37 +1002,54 @@ msgid ""
10031002
"The *signed* argument indicates whether two's complement is used to "
10041003
"represent the integer."
10051004
msgstr ""
1005+
"El argumento *signed* determina si se representará el número entero usando "
1006+
"complemento a dos."
10061007

10071008
#: ../Doc/library/stdtypes.rst:547
1009+
#, fuzzy
10081010
msgid ""
10091011
"Return a pair of integers whose ratio is exactly equal to the original "
10101012
"integer and with a positive denominator. The integer ratio of integers "
10111013
"(whole numbers) is always the integer as the numerator and ``1`` as the "
10121014
"denominator."
10131015
msgstr ""
1016+
"Devuelve una pareja de números enteros cuya proporción es igual a la del "
1017+
"numero entero original, y con un denominador positivo. En el caso de números "
1018+
"enteros, la proporción siempre es el número original y ``1`` en el "
1019+
"denominador."
10141020

10151021
#: ../Doc/library/stdtypes.rst:555
10161022
msgid "Additional Methods on Float"
1017-
msgstr ""
1023+
msgstr "Métodos adicionales de Float"
10181024

1025+
# Verificar que el glosario el termino aparezca como clase base abstracta
10191026
#: ../Doc/library/stdtypes.rst:557
1027+
#, fuzzy
10201028
msgid ""
10211029
"The float type implements the :class:`numbers.Real` :term:`abstract base "
10221030
"class`. float also has the following additional methods."
10231031
msgstr ""
1032+
"El tipo float implementa la clase :class:`numbers.Real` :term:`clase base "
1033+
"abstracta`. Los números float tienen además los siguientes métodos:"
10241034

10251035
#: ../Doc/library/stdtypes.rst:562
10261036
msgid ""
10271037
"Return a pair of integers whose ratio is exactly equal to the original float "
10281038
"and with a positive denominator. Raises :exc:`OverflowError` on infinities "
10291039
"and a :exc:`ValueError` on NaNs."
10301040
msgstr ""
1041+
"Devuelve una pareja de números enteros cuya proporción es exactamente igual "
1042+
"que la del valor en coma flotante original, con un denominador positivo. Si "
1043+
"se usa con valores infinitos o NaN (*NotANumber*) eleva una excepción de "
1044+
"tipo :exec:`OverflowError`."
10311045

10321046
#: ../Doc/library/stdtypes.rst:569
10331047
msgid ""
10341048
"Return ``True`` if the float instance is finite with integral value, and "
10351049
"``False`` otherwise::"
10361050
msgstr ""
1051+
"Devuelve ``True`` si el valor en coma flotante se puede representar sin "
1052+
"perdida con un número entero, y ``False`` si no se puede::"
10371053

10381054
#: ../Doc/library/stdtypes.rst:577
10391055
msgid ""
@@ -1044,29 +1060,44 @@ msgid ""
10441060
"of floating-point numbers. This can be useful when debugging, and in "
10451061
"numerical work."
10461062
msgstr ""
1063+
"Hay dos métodos que convierten desde y hacia cadenas de texto en "
1064+
"hexadecimal. Como los valores en coma flotante en Python se almacenan "
1065+
"internamente en binario, las conversiones desde o hacia cadenas de texto "
1066+
"*decimales* pueden implicar un pequeño error de redondeo. Pero con cadenas "
1067+
"de texto en hexadecimal, las cadenas se corresponden y permiten representar "
1068+
"de forma exacta los números en coma flotante. Esto puede ser útil, ya sea a "
1069+
"la hora de depurar errores, o en procesos numéricos."
10471070

10481071
#: ../Doc/library/stdtypes.rst:588
10491072
msgid ""
10501073
"Return a representation of a floating-point number as a hexadecimal string. "
10511074
"For finite floating-point numbers, this representation will always include a "
10521075
"leading ``0x`` and a trailing ``p`` and exponent."
10531076
msgstr ""
1077+
"Devuelve la representación de un valor en coma flotante en forma de cadena "
1078+
"de texto en hexadecimal. Para números finitos, la representación siempre "
1079+
"empieza con el prefijo ``0x``, y con una ``p`` justo antes del exponente."
10541080

10551081
#: ../Doc/library/stdtypes.rst:596
10561082
msgid ""
10571083
"Class method to return the float represented by a hexadecimal string *s*. "
10581084
"The string *s* may have leading and trailing whitespace."
10591085
msgstr ""
1086+
"Método de clase que devuelve el valor en coma flotante representado por la "
1087+
"cadena de texto en hexadecimal en *s*. La cadena *s* puede tener espacios en "
1088+
"blanco al principio o al final."
10601089

10611090
#: ../Doc/library/stdtypes.rst:601
10621091
msgid ""
10631092
"Note that :meth:`float.hex` is an instance method, while :meth:`float."
10641093
"fromhex` is a class method."
10651094
msgstr ""
1095+
"Nótese que :meth:`float.hex` es un método de instancia, mientras que :meth:"
1096+
"`float.fromhex` es un método de clase."
10661097

10671098
#: ../Doc/library/stdtypes.rst:604
10681099
msgid "A hexadecimal string takes the form::"
1069-
msgstr ""
1100+
msgstr "Una cadena de texto en hexadecimal sigue este formato::"
10701101

10711102
#: ../Doc/library/stdtypes.rst:608
10721103
msgid ""
@@ -1081,6 +1112,17 @@ msgid ""
10811112
"by C's ``%a`` format character or Java's ``Double.toHexString`` are accepted "
10821113
"by :meth:`float.fromhex`."
10831114
msgstr ""
1115+
"Donde el componente opcional ``sign`` puede ser o bien ``+`` o ``-``. Las "
1116+
"componentes ``integer`` y ``fraction`` son cadenas de texto que solo usan "
1117+
"dígitos hexadecimales, y ``exponent`` es un número decimal, precedido con un "
1118+
"signo opcional. No se distingue entre mayúsculas y minúsculas, y debe haber "
1119+
"al menos un dígito hexadecimal tanto en la parte entera como en la fracción. "
1120+
"Esta sintaxis es similar a la sintaxis especificada en la sección 6.4.4.2 "
1121+
"del estándar C99, y es también la sintaxis usada en Java desde la versión "
1122+
"1.5. En particular, la salida de :meth:`float.hex` se puede usar como una "
1123+
"cadena de texto en hexadecimal en código C o Java, y las cadenas de texto "
1124+
"hexadecimal producidas por el carácter de formato ``%a``en C, o por el "
1125+
"método Java, ``Double.toHexString``, son aceptadas por :meth:`float.fromhex`."
10841126

10851127
#: ../Doc/library/stdtypes.rst:621
10861128
msgid ""
@@ -1089,16 +1131,23 @@ msgid ""
10891131
"example, the hexadecimal string ``0x3.a7p10`` represents the floating-point "
10901132
"number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::"
10911133
msgstr ""
1134+
"Nótese que el valor del exponente está expresado en decimal, no en "
1135+
"hexadecimal, e indica la potencia de 2 por la que debemos multiplicar el "
1136+
"coeficiente. Por ejemplo, la cadena de texto hexadecimal ``0x3.a7p10`` "
1137+
"representa el número en coma flotante ``(3 + 10./16 + 7./16**2) * 2.0**10``, "
1138+
"o ``3740.0``::"
10921139

10931140
#: ../Doc/library/stdtypes.rst:631
10941141
msgid ""
10951142
"Applying the reverse conversion to ``3740.0`` gives a different hexadecimal "
10961143
"string representing the same number::"
10971144
msgstr ""
1145+
"Si aplicamos la operación inversa a ``3740.0`` devuelve una cadena de texto "
1146+
"hexadecimal diferente que, aun así, representa el mismo número::"
10981147

10991148
#: ../Doc/library/stdtypes.rst:641
11001149
msgid "Hashing of numeric types"
1101-
msgstr ""
1150+
msgstr "Calculo del *hash* de tipos numéricos"
11021151

11031152
#: ../Doc/library/stdtypes.rst:643
11041153
msgid ""
@@ -1115,37 +1164,62 @@ msgid ""
11151164
"is made available to Python as the :attr:`modulus` attribute of :data:`sys."
11161165
"hash_info`."
11171166
msgstr ""
1167+
"Para dos números ``x`` e ``y``, posiblemente de tipos diferentes, se "
1168+
"requiere que ``hash(x) == hash(y)`` sea verdadero siempre que ``x == y`` "
1169+
"(Véase la documentación sobre el método :meth:`__hash__` para más detalles). "
1170+
"Por razones tanto de eficiencia como de facilidad de implementación entre "
1171+
"los tipos numéricos diferentes (Incluyendo :class:`int`, :class:`float`, :"
1172+
"class:`decimal.Decimal` y :class:`fractions.Fraction`), el método de *hash* "
1173+
"de Python se basa en una función matemática sencilla que está definida para "
1174+
"cualquier número racional, con lo cual se puede aplicar a todas las "
1175+
"instancias de :class:`int` y :class:`fractions.Fraction`, y a todas las "
1176+
"instancias finitas de :class:`float` y :class:`decimal.Decimal`. En esencia, "
1177+
"lo que hace esta función es una reducción modulo ``P`` para un valor fijo "
1178+
"del número primo ``P``. El valor de ``P`` está disponible en Python como "
1179+
"atributo de :data:`sys.hash_info` con el nombre de :attr:`modulus`."
11181180

11191181
#: ../Doc/library/stdtypes.rst:658
11201182
msgid ""
11211183
"Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C "
11221184
"longs and ``P = 2**61 - 1`` on machines with 64-bit C longs."
11231185
msgstr ""
1186+
"Actualmente, el número primo usado es ``P = 2**31 - 1`` para máquinas de 32 "
1187+
"bits, y ``P = 2**61 - 1`` en máquinas de 64 bits."
11241188

11251189
#: ../Doc/library/stdtypes.rst:661
11261190
msgid "Here are the rules in detail:"
1127-
msgstr ""
1191+
msgstr "Aquí están las reglas en detalle:"
11281192

11291193
#: ../Doc/library/stdtypes.rst:663
11301194
msgid ""
11311195
"If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible "
11321196
"by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n, "
11331197
"P)`` gives the inverse of ``n`` modulo ``P``."
11341198
msgstr ""
1199+
"Si ``x = m / n`` es un número racional no negativo y ``n`` no es divisible "
1200+
"por ``P``, se define ``hash(x)`` como ``m * invmod(n, P) % P``, donde "
1201+
"``invmod(n, P)`` devuelve la inversa de ``n`` modulo ``P``."
11351202

11361203
#: ../Doc/library/stdtypes.rst:667
1204+
#, fuzzy
11371205
msgid ""
11381206
"If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by "
11391207
"``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule "
11401208
"above doesn't apply; in this case define ``hash(x)`` to be the constant "
11411209
"value ``sys.hash_info.inf``."
11421210
msgstr ""
1211+
"Si ``x = m / n`` es un número racional no negativo y ``n`` es divisible por "
1212+
"``P`` (Pero no así ``m``), entonces ``n`` no tiene módulo inverso de ``P`` y "
1213+
"no se puede aplicar la regla anterior; en este caso, ``hash(x)``devuelve el "
1214+
"valor constante definido en ``sys.hash_info.inf``."
11431215

11441216
#: ../Doc/library/stdtypes.rst:672
11451217
msgid ""
11461218
"If ``x = m / n`` is a negative rational number define ``hash(x)`` as ``-"
11471219
"hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``."
11481220
msgstr ""
1221+
"Si ``x = m / n`` es un número racional negativo se define ``hash(x)`` como "
1222+
"``-hash(x)``. Si el resultado fuera ``-1``, lo cambia por ``-2``."
11491223

11501224
#: ../Doc/library/stdtypes.rst:676
11511225
msgid ""
@@ -1154,6 +1228,10 @@ msgid ""
11541228
"negative infinity, or nans (respectively). (All hashable nans have the same "
11551229
"hash value.)"
11561230
msgstr ""
1231+
"Los valores concretos ``sys.hash_info.inf``, ``-sys.hash_info.inf`` y ``sys."
1232+
"hash_info.nan`` se usan como valores *hash* de \n"
1233+
"infinito positivo, infinito negativo y NaN (*Not a Number*), "
1234+
"respectivamente. (Todos los valores NaN comparten el mismo valor de *hash*)."
11571235

11581236
#: ../Doc/library/stdtypes.rst:681
11591237
msgid ""
@@ -1163,17 +1241,27 @@ msgid ""
11631241
"lies in ``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width - "
11641242
"1))``. Again, if the result is ``-1``, it's replaced with ``-2``."
11651243
msgstr ""
1244+
"Para un número complejo ``z`` (Una instancia de la clase :class:`complex`), "
1245+
"el valor de *hash* se calcula combinando los valores de *hash* de la parte "
1246+
"real e imaginaria, usando la fórmula ``hash(z.real) + sys.hash_info.imag * "
1247+
"hash(z.imag)``, módulo reducido ``2**sys.hash_info.width``, de forma que el "
1248+
"valor obtenido esté en en rango ``range(-2**(sys.hash_info.width - 1), "
1249+
"2**(sys.hash_info.width - 1))``. De nuevo, si el resultado fuera ``-1``, se "
1250+
"reemplaza por ``-2``."
11661251

11671252
#: ../Doc/library/stdtypes.rst:689
11681253
msgid ""
11691254
"To clarify the above rules, here's some example Python code, equivalent to "
11701255
"the built-in hash, for computing the hash of a rational number, :class:"
11711256
"`float`, or :class:`complex`::"
11721257
msgstr ""
1258+
"Para clarificar las reglas previas, aquí mostramos un ejemplo de código "
1259+
"Python, equivalente al cálculo realizado en la función *hash*, para calcular "
1260+
"el *hash* de un número racional, de tipo :class:`float`, o :class:`complex`::"
11731261

11741262
#: ../Doc/library/stdtypes.rst:744
11751263
msgid "Iterator Types"
1176-
msgstr ""
1264+
msgstr "Tipos de iteradores"
11771265

11781266
#: ../Doc/library/stdtypes.rst:752
11791267
msgid ""
@@ -1182,14 +1270,21 @@ msgid ""
11821270
"support iteration. Sequences, described below in more detail, always "
11831271
"support the iteration methods."
11841272
msgstr ""
1273+
"Python soporta el concepto de iteradores sobre contenedores. Esto se "
1274+
"implementa usando dos métodos diferentes: Estos son usados por las clases "
1275+
"definidas por el usuario para soportar iteración. Las secuencias, que se "
1276+
"describirán con mayor detalle, siempre soportan la iteracion."
11851277

11861278
#: ../Doc/library/stdtypes.rst:757
11871279
msgid ""
11881280
"One method needs to be defined for container objects to provide iteration "
11891281
"support:"
11901282
msgstr ""
1283+
"Para que un objeto contenedor soporte iteración, debe definir un método:"
11911284

1285+
# Como traducimos slot?
11921286
#: ../Doc/library/stdtypes.rst:764
1287+
#, fuzzy
11931288
msgid ""
11941289
"Return an iterator object. The object is required to support the iterator "
11951290
"protocol described below. If a container supports different types of "
@@ -1200,12 +1295,22 @@ msgid ""
12001295
"member:`~PyTypeObject.tp_iter` slot of the type structure for Python objects "
12011296
"in the Python/C API."
12021297
msgstr ""
1298+
"Devuelve un objeto iterador. Este objeto es requerido para soportar el "
1299+
"protocolo de iteración que se describe a continuación. Si un contenedor "
1300+
"soporta diferentes tipos de iteración, se pueden implementar métodos "
1301+
"adicionales para estos iteradores (por ejemplo, un tipo de contenedor que "
1302+
"puede soportar distintas formas de iteración podría ser una estructura de "
1303+
"tipo árbol que proporcione a la vez un recorrido en profundidad o en "
1304+
"anchura). Este método se corresponde al *slot* :c:member:`~PyTypeObject."
1305+
"tp_iter`de la estructura usada para los objetos Python en la API Python/C."
12031306

12041307
#: ../Doc/library/stdtypes.rst:773
12051308
msgid ""
12061309
"The iterator objects themselves are required to support the following two "
12071310
"methods, which together form the :dfn:`iterator protocol`:"
12081311
msgstr ""
1312+
"Los objetos iteradores en si necesitan definir los siguientes dos métodos, "
1313+
"que forma juntos el :dfn:`protocolo iterador`:"
12091314

12101315
#: ../Doc/library/stdtypes.rst:779
12111316
msgid ""
@@ -1214,6 +1319,11 @@ msgid ""
12141319
"`in` statements. This method corresponds to the :c:member:`~PyTypeObject."
12151320
"tp_iter` slot of the type structure for Python objects in the Python/C API."
12161321
msgstr ""
1322+
"Devuelve el propio objeto iterador. Este método es necesario para permitir "
1323+
"tanto a los contendores como a los iterados usar la palabras clave :keyword:"
1324+
"`for` e :keyword:`in`. Este método se corresponde con el *slot* :c:member:"
1325+
"`~PyTypeObject.tp_iter`de la estructura usada para los objetos Python en la "
1326+
"API Python/C."
12171327

12181328
#: ../Doc/library/stdtypes.rst:787
12191329
msgid ""
@@ -1222,6 +1332,10 @@ msgid ""
12221332
"member:`~PyTypeObject.tp_iternext` slot of the type structure for Python "
12231333
"objects in the Python/C API."
12241334
msgstr ""
1335+
"Devuelve el siguiente elemento del contenedor. Si no hubiera más elementos, "
1336+
"eleva la excepción :exc:`StopIteration`. Este método se corresponde con el "
1337+
"*slot* :c:member:`~PyTypeObject.tp_iternext`de la estructura usada para los "
1338+
"objetos Python en la API Python/C."
12251339

12261340
#: ../Doc/library/stdtypes.rst:792
12271341
msgid ""

0 commit comments

Comments
 (0)