@@ -11,7 +11,7 @@ msgstr ""
11
11
"Project-Id-Version : Python 3.8\n "
12
12
"Report-Msgid-Bugs-To : \n "
13
13
"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 "
15
15
"
Last-Translator :
Juan Ignacio Rodríguez de León <[email protected] >\n "
16
16
"Language-Team : python-doc-es\n "
17
17
"MIME-Version : 1.0\n "
@@ -981,10 +981,9 @@ msgid ""
981
981
"given, an :exc:`OverflowError` is raised. The default value for *signed* is "
982
982
"``False``."
983
983
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``."
988
987
989
988
#: ../Doc/library/stdtypes.rst:517
990
989
msgid "Return the integer represented by the given array of bytes."
@@ -1003,37 +1002,54 @@ msgid ""
1003
1002
"The *signed* argument indicates whether two's complement is used to "
1004
1003
"represent the integer."
1005
1004
msgstr ""
1005
+ "El argumento *signed* determina si se representará el número entero usando "
1006
+ "complemento a dos."
1006
1007
1007
1008
#: ../Doc/library/stdtypes.rst:547
1009
+ #, fuzzy
1008
1010
msgid ""
1009
1011
"Return a pair of integers whose ratio is exactly equal to the original "
1010
1012
"integer and with a positive denominator. The integer ratio of integers "
1011
1013
"(whole numbers) is always the integer as the numerator and ``1`` as the "
1012
1014
"denominator."
1013
1015
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."
1014
1020
1015
1021
#: ../Doc/library/stdtypes.rst:555
1016
1022
msgid "Additional Methods on Float"
1017
- msgstr ""
1023
+ msgstr "Métodos adicionales de Float "
1018
1024
1025
+ # Verificar que el glosario el termino aparezca como clase base abstracta
1019
1026
#: ../Doc/library/stdtypes.rst:557
1027
+ #, fuzzy
1020
1028
msgid ""
1021
1029
"The float type implements the :class:`numbers.Real` :term:`abstract base "
1022
1030
"class`. float also has the following additional methods."
1023
1031
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:"
1024
1034
1025
1035
#: ../Doc/library/stdtypes.rst:562
1026
1036
msgid ""
1027
1037
"Return a pair of integers whose ratio is exactly equal to the original float "
1028
1038
"and with a positive denominator. Raises :exc:`OverflowError` on infinities "
1029
1039
"and a :exc:`ValueError` on NaNs."
1030
1040
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`."
1031
1045
1032
1046
#: ../Doc/library/stdtypes.rst:569
1033
1047
msgid ""
1034
1048
"Return ``True`` if the float instance is finite with integral value, and "
1035
1049
"``False`` otherwise::"
1036
1050
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::"
1037
1053
1038
1054
#: ../Doc/library/stdtypes.rst:577
1039
1055
msgid ""
@@ -1044,29 +1060,44 @@ msgid ""
1044
1060
"of floating-point numbers. This can be useful when debugging, and in "
1045
1061
"numerical work."
1046
1062
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."
1047
1070
1048
1071
#: ../Doc/library/stdtypes.rst:588
1049
1072
msgid ""
1050
1073
"Return a representation of a floating-point number as a hexadecimal string. "
1051
1074
"For finite floating-point numbers, this representation will always include a "
1052
1075
"leading ``0x`` and a trailing ``p`` and exponent."
1053
1076
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."
1054
1080
1055
1081
#: ../Doc/library/stdtypes.rst:596
1056
1082
msgid ""
1057
1083
"Class method to return the float represented by a hexadecimal string *s*. "
1058
1084
"The string *s* may have leading and trailing whitespace."
1059
1085
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."
1060
1089
1061
1090
#: ../Doc/library/stdtypes.rst:601
1062
1091
msgid ""
1063
1092
"Note that :meth:`float.hex` is an instance method, while :meth:`float."
1064
1093
"fromhex` is a class method."
1065
1094
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."
1066
1097
1067
1098
#: ../Doc/library/stdtypes.rst:604
1068
1099
msgid "A hexadecimal string takes the form::"
1069
- msgstr ""
1100
+ msgstr "Una cadena de texto en hexadecimal sigue este formato:: "
1070
1101
1071
1102
#: ../Doc/library/stdtypes.rst:608
1072
1103
msgid ""
@@ -1081,6 +1112,17 @@ msgid ""
1081
1112
"by C's ``%a`` format character or Java's ``Double.toHexString`` are accepted "
1082
1113
"by :meth:`float.fromhex`."
1083
1114
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`."
1084
1126
1085
1127
#: ../Doc/library/stdtypes.rst:621
1086
1128
msgid ""
@@ -1089,16 +1131,23 @@ msgid ""
1089
1131
"example, the hexadecimal string ``0x3.a7p10`` represents the floating-point "
1090
1132
"number ``(3 + 10./16 + 7./16**2) * 2.0**10``, or ``3740.0``::"
1091
1133
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``::"
1092
1139
1093
1140
#: ../Doc/library/stdtypes.rst:631
1094
1141
msgid ""
1095
1142
"Applying the reverse conversion to ``3740.0`` gives a different hexadecimal "
1096
1143
"string representing the same number::"
1097
1144
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::"
1098
1147
1099
1148
#: ../Doc/library/stdtypes.rst:641
1100
1149
msgid "Hashing of numeric types"
1101
- msgstr ""
1150
+ msgstr "Calculo del *hash* de tipos numéricos "
1102
1151
1103
1152
#: ../Doc/library/stdtypes.rst:643
1104
1153
msgid ""
@@ -1115,37 +1164,62 @@ msgid ""
1115
1164
"is made available to Python as the :attr:`modulus` attribute of :data:`sys."
1116
1165
"hash_info`."
1117
1166
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`."
1118
1180
1119
1181
#: ../Doc/library/stdtypes.rst:658
1120
1182
msgid ""
1121
1183
"Currently, the prime used is ``P = 2**31 - 1`` on machines with 32-bit C "
1122
1184
"longs and ``P = 2**61 - 1`` on machines with 64-bit C longs."
1123
1185
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."
1124
1188
1125
1189
#: ../Doc/library/stdtypes.rst:661
1126
1190
msgid "Here are the rules in detail:"
1127
- msgstr ""
1191
+ msgstr "Aquí están las reglas en detalle: "
1128
1192
1129
1193
#: ../Doc/library/stdtypes.rst:663
1130
1194
msgid ""
1131
1195
"If ``x = m / n`` is a nonnegative rational number and ``n`` is not divisible "
1132
1196
"by ``P``, define ``hash(x)`` as ``m * invmod(n, P) % P``, where ``invmod(n, "
1133
1197
"P)`` gives the inverse of ``n`` modulo ``P``."
1134
1198
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``."
1135
1202
1136
1203
#: ../Doc/library/stdtypes.rst:667
1204
+ #, fuzzy
1137
1205
msgid ""
1138
1206
"If ``x = m / n`` is a nonnegative rational number and ``n`` is divisible by "
1139
1207
"``P`` (but ``m`` is not) then ``n`` has no inverse modulo ``P`` and the rule "
1140
1208
"above doesn't apply; in this case define ``hash(x)`` to be the constant "
1141
1209
"value ``sys.hash_info.inf``."
1142
1210
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``."
1143
1215
1144
1216
#: ../Doc/library/stdtypes.rst:672
1145
1217
msgid ""
1146
1218
"If ``x = m / n`` is a negative rational number define ``hash(x)`` as ``-"
1147
1219
"hash(-x)``. If the resulting hash is ``-1``, replace it with ``-2``."
1148
1220
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``."
1149
1223
1150
1224
#: ../Doc/library/stdtypes.rst:676
1151
1225
msgid ""
@@ -1154,6 +1228,10 @@ msgid ""
1154
1228
"negative infinity, or nans (respectively). (All hashable nans have the same "
1155
1229
"hash value.)"
1156
1230
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*)."
1157
1235
1158
1236
#: ../Doc/library/stdtypes.rst:681
1159
1237
msgid ""
@@ -1163,17 +1241,27 @@ msgid ""
1163
1241
"lies in ``range(-2**(sys.hash_info.width - 1), 2**(sys.hash_info.width - "
1164
1242
"1))``. Again, if the result is ``-1``, it's replaced with ``-2``."
1165
1243
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``."
1166
1251
1167
1252
#: ../Doc/library/stdtypes.rst:689
1168
1253
msgid ""
1169
1254
"To clarify the above rules, here's some example Python code, equivalent to "
1170
1255
"the built-in hash, for computing the hash of a rational number, :class:"
1171
1256
"`float`, or :class:`complex`::"
1172
1257
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`::"
1173
1261
1174
1262
#: ../Doc/library/stdtypes.rst:744
1175
1263
msgid "Iterator Types"
1176
- msgstr ""
1264
+ msgstr "Tipos de iteradores "
1177
1265
1178
1266
#: ../Doc/library/stdtypes.rst:752
1179
1267
msgid ""
@@ -1182,14 +1270,21 @@ msgid ""
1182
1270
"support iteration. Sequences, described below in more detail, always "
1183
1271
"support the iteration methods."
1184
1272
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."
1185
1277
1186
1278
#: ../Doc/library/stdtypes.rst:757
1187
1279
msgid ""
1188
1280
"One method needs to be defined for container objects to provide iteration "
1189
1281
"support:"
1190
1282
msgstr ""
1283
+ "Para que un objeto contenedor soporte iteración, debe definir un método:"
1191
1284
1285
+ # Como traducimos slot?
1192
1286
#: ../Doc/library/stdtypes.rst:764
1287
+ #, fuzzy
1193
1288
msgid ""
1194
1289
"Return an iterator object. The object is required to support the iterator "
1195
1290
"protocol described below. If a container supports different types of "
@@ -1200,12 +1295,22 @@ msgid ""
1200
1295
"member:`~PyTypeObject.tp_iter` slot of the type structure for Python objects "
1201
1296
"in the Python/C API."
1202
1297
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."
1203
1306
1204
1307
#: ../Doc/library/stdtypes.rst:773
1205
1308
msgid ""
1206
1309
"The iterator objects themselves are required to support the following two "
1207
1310
"methods, which together form the :dfn:`iterator protocol`:"
1208
1311
msgstr ""
1312
+ "Los objetos iteradores en si necesitan definir los siguientes dos métodos, "
1313
+ "que forma juntos el :dfn:`protocolo iterador`:"
1209
1314
1210
1315
#: ../Doc/library/stdtypes.rst:779
1211
1316
msgid ""
@@ -1214,6 +1319,11 @@ msgid ""
1214
1319
"`in` statements. This method corresponds to the :c:member:`~PyTypeObject."
1215
1320
"tp_iter` slot of the type structure for Python objects in the Python/C API."
1216
1321
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."
1217
1327
1218
1328
#: ../Doc/library/stdtypes.rst:787
1219
1329
msgid ""
@@ -1222,6 +1332,10 @@ msgid ""
1222
1332
"member:`~PyTypeObject.tp_iternext` slot of the type structure for Python "
1223
1333
"objects in the Python/C API."
1224
1334
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."
1225
1339
1226
1340
#: ../Doc/library/stdtypes.rst:792
1227
1341
msgid ""
0 commit comments