diff --git a/TRANSLATORS b/TRANSLATORS index 2c658c4e9e..8dffa55f61 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -1,10 +1,10 @@ Juan Alegría (@zejiran) +Juan Diego Alfonso Ocampo (@halcolo) Nahuel Ambrosini (@ambro17) Gabriel Anguita (@gabrielanguita) Paula Aragón (@pandrearro) -Emmanuel Arias (@eamanu) Constanza Areal (@geekcoty) -Paula Aragón (@pandrearro +Emmanuel Arias (@eamanu) Jhonatan Barrera (@iam3mer) Reinny Almonte Ramos (@jighdan) Brian Bokser (@brianbok) @@ -17,15 +17,20 @@ Douglas I Cueva Jr (@itisDouglas) Raúl Cumplido (@raulcd) Fabrizio Damicelli (@fabridamicelli) Javier Daza (@javierdaza) -Juan Diego Alfonso Ocampo (@halcolo) +Carlos Joel Delgado Pizarro (@c0x6a) Sergio Delgado Quintero (@sdelquin) Nicolás Demarchi (@gilgamezh) Ignacio Dopazo (@ignaciodopazo) Nahuel Espinosa (@nahueespinosa) Xavi Francisco (@srxavi) +Santiago E Fraire Willemoes (@Woile) +Leonardo Gomez (@gomezgleonardob) +María Camila Guerrero Giraldo (@macaguegi) +José Miguel Hernández Cabrera (@miguelheca) Sergio Infante (@neosergio) Martín Gaitán (@mgaitan) Manuel Kaufmann (@humitos) +Luis Llave (@llaveluis) Pablo Lobariñas (@Qkolnek) Alvar Maciel (@alvarmaciel @amaciel) Briceida Mariscal (@BriceidaMars) @@ -35,7 +40,6 @@ Cristian Andrés Maximiliano Mayuti (@mayuti) Omar Mendo (@beejeke) Darwing Medina Lacayo (@darwing1210) Claudia Millán Nebot (@clacri @cheshireminima) -Carlos Joel Delgado Pizarro (@c0x6a) María José Molina Contreras (@mjmolina) Marco Moresi (@mrcmoresi) Federico Jurío (@FedericoJurio) @@ -46,10 +50,12 @@ Cristian Rengifo (@ingrengifo) Juan Ignacio Rodríguez de León (@euribates) Pablo Lobariñas (@Qkolnek) Santiago Piccinini (@spiccinini) -Sergio Delgado Quintero (@sdelquin) -Silvina Tamburini (@silvinabt87) -David Trigo Chávez (@dtrinf) +Julián Pérez (@jcpmmx) Agustina Quiros (@qagustina) +Xavi Rambla Centellas (@xavirambla) +Cristian Rengifo (@ingrengifo) +Marco Richetta (@marcorichetta) +Adolfo Hristo David Roque Gámez (@hristoroque) Luis Llave (@llaveluis) Marcos Sánchez Provencio (@rapto) Francisco Jesús Sevilla García (@fjsevilla-dev) @@ -59,10 +65,13 @@ Carlos Bernad (@carlos-bernad) María Andrea Vignau (@mavignau @marian-vignau) Leonardo Gomez (@gomezgleonardob) Luis Sánchez (@LuisAISanchez) +Marcos Sánchez Provencio (@rapto) +David Trigo Chávez (@dtrinf) Esteban Solórzano (@estebansolo) José Miguel Hernández Cabrera (@miguelheca) Camilo Baquero (@camilooob) Naryie Vásquez Martínez (@narvmtz) +María Andrea Vignau (@mavignau @marian-vignau) David Revillas (@r3v1) Xavi Rambla Centellas (@xavirambla) Santiago E Fraire Willemoes (@Woile) diff --git a/dictionaries/library_itertools.txt b/dictionaries/library_itertools.txt new file mode 100644 index 0000000000..6c98b8e062 --- /dev/null +++ b/dictionaries/library_itertools.txt @@ -0,0 +1,6 @@ +álgebra +Haskell +pred +seq +itn +step diff --git a/library/itertools.po b/library/itertools.po index 0db808799a..32a43c25cf 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -6,23 +6,26 @@ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-08-10 10:42-0500\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Last-Translator: Julián Pérez (@jcpmmx)\n" +"Language: es\n" +"X-Generator: Poedit 2.4\n" #: ../Doc/library/itertools.rst:2 msgid ":mod:`itertools` --- Functions creating iterators for efficient looping" msgstr "" +":mod:`itertools` --- Funciones que crean iteradores para bucles eficientes" #: ../Doc/library/itertools.rst:16 msgid "" @@ -30,6 +33,9 @@ msgid "" "by constructs from APL, Haskell, and SML. Each has been recast in a form " "suitable for Python." msgstr "" +"Este módulo implementa un número de piezas básicas :term:`iterator` " +"inspiradas en *constructs* de APL, Haskell y SML. Cada pieza ha sido " +"reconvertida a una forma apropiada para Python." #: ../Doc/library/itertools.rst:20 msgid "" @@ -38,6 +44,10 @@ msgid "" "algebra\" making it possible to construct specialized tools succinctly and " "efficiently in pure Python." msgstr "" +"El módulo estandariza un conjunto base de herramientas rápidas y eficientes " +"en memoria, útiles por sí mismas o en combinación con otras. Juntas, forman " +"un “álbegra de iteradores”, haciendo posible la construcción de herramientas " +"especializadas, sucintas y eficientes, en Python puro." #: ../Doc/library/itertools.rst:25 msgid "" @@ -45,6 +55,10 @@ msgid "" "a sequence ``f(0), f(1), ...``. The same effect can be achieved in Python " "by combining :func:`map` and :func:`count` to form ``map(f, count())``." msgstr "" +"Por ejemplo, SML provee una herramienta de tabulación ``tabulate(f)``, que " +"produce una secuencia ``f(0), f(1), ...``. En Python, se puede lograr el " +"mismo efecto al combinar :func:`map` y :func:`count` para formar ``map(f, " +"count())``." #: ../Doc/library/itertools.rst:29 msgid "" @@ -53,338 +67,344 @@ msgid "" "multiplication operator can be mapped across two vectors to form an " "efficient dot-product: ``sum(map(operator.mul, vector1, vector2))``." msgstr "" +"Estas herramientas y sus contrapartes incorporadas también funcionan bien " +"con funciones de alta velocidad del módulo :mod:`operator`. Por ejemplo, el " +"operador de multiplicación se puede mapear a lo largo de dos vectores para " +"formar un eficiente producto escalar: ``sum(map(operator.mul, vector1, " +"vector2))``." #: ../Doc/library/itertools.rst:35 msgid "**Infinite iterators:**" -msgstr "" +msgstr "**Iteradores infinitos:**" #: ../Doc/library/itertools.rst:38 ../Doc/library/itertools.rst:48 #: ../Doc/library/itertools.rst:67 msgid "Iterator" -msgstr "" +msgstr "Iterador" #: ../Doc/library/itertools.rst:38 ../Doc/library/itertools.rst:48 #: ../Doc/library/itertools.rst:67 msgid "Arguments" -msgstr "" +msgstr "Argumentos" #: ../Doc/library/itertools.rst:38 ../Doc/library/itertools.rst:48 #: ../Doc/library/itertools.rst:67 ../Doc/library/itertools.rst:76 msgid "Results" -msgstr "" +msgstr "Resultados" #: ../Doc/library/itertools.rst:38 ../Doc/library/itertools.rst:48 msgid "Example" -msgstr "" +msgstr "Ejemplo" #: ../Doc/library/itertools.rst:40 msgid ":func:`count`" -msgstr "" +msgstr ":func:`count`" #: ../Doc/library/itertools.rst:40 msgid "start, [step]" -msgstr "" +msgstr "start, [step]" #: ../Doc/library/itertools.rst:40 msgid "start, start+step, start+2*step, ..." -msgstr "" +msgstr "start, start+step, start+2*step, ..." #: ../Doc/library/itertools.rst:40 msgid "``count(10) --> 10 11 12 13 14 ...``" -msgstr "" +msgstr "``count(10) --> 10 11 12 13 14 ...``" #: ../Doc/library/itertools.rst:41 msgid ":func:`cycle`" -msgstr "" +msgstr ":func:`cycle`" #: ../Doc/library/itertools.rst:41 msgid "p" -msgstr "" +msgstr "p" #: ../Doc/library/itertools.rst:41 msgid "p0, p1, ... plast, p0, p1, ..." -msgstr "" +msgstr "p0, p1, ... pfinal, p0, p1, ..." #: ../Doc/library/itertools.rst:41 msgid "``cycle('ABCD') --> A B C D A B C D ...``" -msgstr "" +msgstr "``cycle('ABCD') --> A B C D A B C D ...``" #: ../Doc/library/itertools.rst:42 msgid ":func:`repeat`" -msgstr "" +msgstr ":func:`repeat`" #: ../Doc/library/itertools.rst:42 msgid "elem [,n]" -msgstr "" +msgstr "elem [,n]" #: ../Doc/library/itertools.rst:42 msgid "elem, elem, elem, ... endlessly or up to n times" -msgstr "" +msgstr "elem, elem, elem, ... indefinidamente o hasta n veces" #: ../Doc/library/itertools.rst:42 msgid "``repeat(10, 3) --> 10 10 10``" -msgstr "" +msgstr "``repeat(10, 3) --> 10 10 10``" #: ../Doc/library/itertools.rst:45 msgid "**Iterators terminating on the shortest input sequence:**" -msgstr "" +msgstr "**Iteradores que terminan en la secuencia de entrada más corta:**" #: ../Doc/library/itertools.rst:50 msgid ":func:`accumulate`" -msgstr "" +msgstr ":func:`accumulate`" #: ../Doc/library/itertools.rst:50 msgid "p [,func]" -msgstr "" +msgstr "p [,func]" #: ../Doc/library/itertools.rst:50 msgid "p0, p0+p1, p0+p1+p2, ..." -msgstr "" +msgstr "p0, p0+p1, p0+p1+p2, ..." #: ../Doc/library/itertools.rst:50 msgid "``accumulate([1,2,3,4,5]) --> 1 3 6 10 15``" -msgstr "" +msgstr "``accumulate([1,2,3,4,5]) --> 1 3 6 10 15``" #: ../Doc/library/itertools.rst:51 msgid ":func:`chain`" -msgstr "" +msgstr ":func:`chain`" #: ../Doc/library/itertools.rst:51 ../Doc/library/itertools.rst:61 msgid "p, q, ..." -msgstr "" +msgstr "p, q, ..." #: ../Doc/library/itertools.rst:51 ../Doc/library/itertools.rst:52 msgid "p0, p1, ... plast, q0, q1, ..." -msgstr "" +msgstr "p0, p1, ... pfinal, q0, q1, ..." #: ../Doc/library/itertools.rst:51 msgid "``chain('ABC', 'DEF') --> A B C D E F``" -msgstr "" +msgstr "``chain('ABC', 'DEF') --> A B C D E F``" #: ../Doc/library/itertools.rst:52 msgid ":func:`chain.from_iterable`" -msgstr "" +msgstr ":func:`chain.from_iterable`" #: ../Doc/library/itertools.rst:52 msgid "iterable" -msgstr "" +msgstr "iterable" #: ../Doc/library/itertools.rst:52 msgid "``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F``" -msgstr "" +msgstr "``chain.from_iterable(['ABC', 'DEF']) --> A B C D E F``" #: ../Doc/library/itertools.rst:53 msgid ":func:`compress`" -msgstr "" +msgstr ":func:`compress`" #: ../Doc/library/itertools.rst:53 msgid "data, selectors" -msgstr "" +msgstr "data, selectors" #: ../Doc/library/itertools.rst:53 msgid "(d[0] if s[0]), (d[1] if s[1]), ..." -msgstr "" +msgstr "(d[0] if s[0]), (d[1] if s[1]), ..." #: ../Doc/library/itertools.rst:53 msgid "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" -msgstr "" +msgstr "``compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F``" #: ../Doc/library/itertools.rst:54 msgid ":func:`dropwhile`" -msgstr "" +msgstr ":func:`dropwhile`" #: ../Doc/library/itertools.rst:54 ../Doc/library/itertools.rst:55 #: ../Doc/library/itertools.rst:59 msgid "pred, seq" -msgstr "" +msgstr "pred, seq" #: ../Doc/library/itertools.rst:54 msgid "seq[n], seq[n+1], starting when pred fails" -msgstr "" +msgstr "seq[n], seq[n+1], comenzando cuando pred falla" #: ../Doc/library/itertools.rst:54 msgid "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" -msgstr "" +msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1``" #: ../Doc/library/itertools.rst:55 msgid ":func:`filterfalse`" -msgstr "" +msgstr ":func:`filterfalse`" #: ../Doc/library/itertools.rst:55 msgid "elements of seq where pred(elem) is false" -msgstr "" +msgstr "elementos de seq donde pred(elem) es falso" #: ../Doc/library/itertools.rst:55 msgid "``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" -msgstr "" +msgstr "``filterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8``" #: ../Doc/library/itertools.rst:56 msgid ":func:`groupby`" -msgstr "" +msgstr ":func:`groupby`" #: ../Doc/library/itertools.rst:56 msgid "iterable[, key]" -msgstr "" +msgstr "iterable[, key]" #: ../Doc/library/itertools.rst:56 msgid "sub-iterators grouped by value of key(v)" -msgstr "" +msgstr "sub-iteradores agrupados según el valor de key(v)" #: ../Doc/library/itertools.rst:57 msgid ":func:`islice`" -msgstr "" +msgstr ":func:`islice`" #: ../Doc/library/itertools.rst:57 msgid "seq, [start,] stop [, step]" -msgstr "" +msgstr "seq, [start,] stop [, step]" #: ../Doc/library/itertools.rst:57 msgid "elements from seq[start:stop:step]" -msgstr "" +msgstr "elementos de seq[start:stop:step]" #: ../Doc/library/itertools.rst:57 msgid "``islice('ABCDEFG', 2, None) --> C D E F G``" -msgstr "" +msgstr "``islice('ABCDEFG', 2, None) --> C D E F G``" #: ../Doc/library/itertools.rst:58 msgid ":func:`starmap`" -msgstr "" +msgstr ":func:`starmap`" #: ../Doc/library/itertools.rst:58 msgid "func, seq" -msgstr "" +msgstr "func, seq" #: ../Doc/library/itertools.rst:58 msgid "func(\\*seq[0]), func(\\*seq[1]), ..." -msgstr "" +msgstr "func(\\*seq[0]), func(\\*seq[1]), ..." #: ../Doc/library/itertools.rst:58 msgid "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" -msgstr "" +msgstr "``starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000``" #: ../Doc/library/itertools.rst:59 msgid ":func:`takewhile`" -msgstr "" +msgstr ":func:`takewhile`" #: ../Doc/library/itertools.rst:59 msgid "seq[0], seq[1], until pred fails" -msgstr "" +msgstr "seq[0], seq[1], hasta que pred falle" #: ../Doc/library/itertools.rst:59 msgid "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" -msgstr "" +msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4``" #: ../Doc/library/itertools.rst:60 msgid ":func:`tee`" -msgstr "" +msgstr ":func:`tee`" #: ../Doc/library/itertools.rst:60 msgid "it, n" -msgstr "" +msgstr "it, n" #: ../Doc/library/itertools.rst:60 msgid "it1, it2, ... itn splits one iterator into n" -msgstr "" +msgstr "it1, it2, ... itn divide un iterador en n" #: ../Doc/library/itertools.rst:61 msgid ":func:`zip_longest`" -msgstr "" +msgstr ":func:`zip_longest`" #: ../Doc/library/itertools.rst:61 msgid "(p[0], q[0]), (p[1], q[1]), ..." -msgstr "" +msgstr "(p[0], q[0]), (p[1], q[1]), ..." #: ../Doc/library/itertools.rst:61 msgid "``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" -msgstr "" +msgstr "``zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-``" #: ../Doc/library/itertools.rst:64 msgid "**Combinatoric iterators:**" -msgstr "" +msgstr "**Iteradores combinatorios:**" #: ../Doc/library/itertools.rst:69 msgid ":func:`product`" -msgstr "" +msgstr ":func:`product`" #: ../Doc/library/itertools.rst:69 msgid "p, q, ... [repeat=1]" -msgstr "" +msgstr "p, q, ... [repeat=1]" #: ../Doc/library/itertools.rst:69 msgid "cartesian product, equivalent to a nested for-loop" -msgstr "" +msgstr "producto cartesiano, equivalente a un bucle `for` anidado" #: ../Doc/library/itertools.rst:70 msgid ":func:`permutations`" -msgstr "" +msgstr ":func:`permutations`" #: ../Doc/library/itertools.rst:70 msgid "p[, r]" -msgstr "" +msgstr "p[, r]" #: ../Doc/library/itertools.rst:70 msgid "r-length tuples, all possible orderings, no repeated elements" msgstr "" +"tuplas de longitud r, en todas los órdenes posibles, sin elementos repetidos" #: ../Doc/library/itertools.rst:71 msgid ":func:`combinations`" -msgstr "" +msgstr ":func:`combinations`" #: ../Doc/library/itertools.rst:71 ../Doc/library/itertools.rst:72 msgid "p, r" -msgstr "" +msgstr "p, r" #: ../Doc/library/itertools.rst:71 msgid "r-length tuples, in sorted order, no repeated elements" -msgstr "" +msgstr "tuplas de longitud r, ordenadas, sin elementos repetidos" #: ../Doc/library/itertools.rst:72 msgid ":func:`combinations_with_replacement`" -msgstr "" +msgstr ":func:`combinations_with_replacement`" #: ../Doc/library/itertools.rst:72 msgid "r-length tuples, in sorted order, with repeated elements" -msgstr "" +msgstr "tuplas de longitud r, ordenadas, con elementos repetidos" #: ../Doc/library/itertools.rst:76 msgid "Examples" -msgstr "" +msgstr "Ejemplos" #: ../Doc/library/itertools.rst:78 msgid "``product('ABCD', repeat=2)``" -msgstr "" +msgstr "``product('ABCD', repeat=2)``" #: ../Doc/library/itertools.rst:78 msgid "``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``" -msgstr "" +msgstr "``AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD``" #: ../Doc/library/itertools.rst:79 msgid "``permutations('ABCD', 2)``" -msgstr "" +msgstr "``permutations('ABCD', 2)``" #: ../Doc/library/itertools.rst:79 msgid "``AB AC AD BA BC BD CA CB CD DA DB DC``" -msgstr "" +msgstr "``AB AC AD BA BC BD CA CB CD DA DB DC``" #: ../Doc/library/itertools.rst:80 msgid "``combinations('ABCD', 2)``" -msgstr "" +msgstr "``combinations('ABCD', 2)``" #: ../Doc/library/itertools.rst:80 msgid "``AB AC AD BC BD CD``" -msgstr "" +msgstr "``AB AC AD BC BD CD``" #: ../Doc/library/itertools.rst:81 msgid "``combinations_with_replacement('ABCD', 2)``" -msgstr "" +msgstr "``combinations_with_replacement('ABCD', 2)``" #: ../Doc/library/itertools.rst:81 msgid "``AA AB AC AD BB BC BD CC CD DD``" -msgstr "" +msgstr "``AA AB AC AD BB BC BD CC CD DD``" #: ../Doc/library/itertools.rst:88 msgid "Itertool functions" -msgstr "" +msgstr "Funciones de itertools" #: ../Doc/library/itertools.rst:90 msgid "" @@ -392,12 +412,17 @@ msgid "" "provide streams of infinite length, so they should only be accessed by " "functions or loops that truncate the stream." msgstr "" +"Todas las funciones del siguiente módulo construyen y retornan iteradores. " +"Algunas proveen flujos infinitos, por lo que deberían ser sólo manipuladas " +"por funciones o bucles que cortan el flujo." #: ../Doc/library/itertools.rst:96 msgid "" "Make an iterator that returns accumulated sums, or accumulated results of " "other binary functions (specified via the optional *func* argument)." msgstr "" +"Crea un iterador que retorna sumas acumuladas o resultados acumulados de " +"otra función binaria (especificada a través del argumento opcional *func*)." #: ../Doc/library/itertools.rst:100 msgid "" @@ -407,6 +432,12 @@ msgid "" "be any addable type including :class:`~decimal.Decimal` or :class:" "`~fractions.Fraction`.)" msgstr "" +"Si *func* es definido, debería ser una función de 2 argumentos. Los " +"elementos de entrada de *iterable* pueden ser de cualquier tipo que puedan " +"ser aceptados como argumentos de *func*. (Por ejemplo, con la operación por " +"defecto –adición, los elementos pueden ser cualquier tipo que sea " +"adicionable, incluyendo :class:`~decimal.Decimal` o :class:`~fractions." +"Fraction`.)" #: ../Doc/library/itertools.rst:107 msgid "" @@ -415,12 +446,16 @@ msgid "" "with the *initial* value so that the output has one more element than the " "input iterable." msgstr "" +"Usualmente el número de elementos de salida corresponde con el número de " +"elementos del iterador de entrada. Sin embargo, si el argumento clave " +"*initial* es suministrado, la acumulación empieza con *initial* como valor " +"inicial y el resultado contiene un elemento más que el iterador de entrada." #: ../Doc/library/itertools.rst:112 ../Doc/library/itertools.rst:210 #: ../Doc/library/itertools.rst:259 ../Doc/library/itertools.rst:495 #: ../Doc/library/itertools.rst:574 ../Doc/library/itertools.rst:627 msgid "Roughly equivalent to::" -msgstr "" +msgstr "Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:131 msgid "" @@ -432,20 +467,30 @@ msgid "" "modeled by supplying the initial value in the iterable and using only the " "accumulated total in *func* argument::" msgstr "" +"Hay un número de usos para el argumento *func*. Se le puede asignar :func:" +"`min` para calcular un mínimo acumulado, :func:`max` para un máximo " +"acumulado, o :func:`operator.mul` para un producto acumulado. Se pueden " +"crear tablas de amortización al acumular intereses y aplicando pagos. " +"`Relaciones de recurrencias `_ de primer orden se puede modelar al proveer el " +"valor inicial en el iterable y utilizando sólo el total acumulado en el " +"argumento *func*::" #: ../Doc/library/itertools.rst:161 msgid "" "See :func:`functools.reduce` for a similar function that returns only the " "final accumulated value." msgstr "" +"Para una función similar que retorne únicamente el valor final acumulado, " +"revisa :func:`functools.reduce`." #: ../Doc/library/itertools.rst:166 msgid "Added the optional *func* parameter." -msgstr "" +msgstr "Adicionó el argumento opcional *func*." #: ../Doc/library/itertools.rst:169 msgid "Added the optional *initial* parameter." -msgstr "" +msgstr "Adicionó el argumento opcional *initial*." #: ../Doc/library/itertools.rst:174 msgid "" @@ -454,16 +499,25 @@ msgid "" "are exhausted. Used for treating consecutive sequences as a single " "sequence. Roughly equivalent to::" msgstr "" +"Crea un iterador que retorna elementos del primer iterable hasta que es " +"consumido, para luego proceder con el siguiente iterable, hasta que todos " +"los iterables son consumidos. Se utiliza para tratar secuencias " +"consecutivas como unas sola secuencia. Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:188 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" +"Constructor alternativo para :func:`chain`. Obtiene entradas enlazadas de " +"un mismo argumento que se evalúa perezosamente. Aproximadamente equivalente " +"a::" #: ../Doc/library/itertools.rst:200 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "" +"Retorna subsecuencias de longitud *r* con elementos del *iterable* de " +"entrada." #: ../Doc/library/itertools.rst:202 ../Doc/library/itertools.rst:251 msgid "" @@ -471,6 +525,9 @@ msgid "" "*iterable* is sorted, the combination tuples will be produced in sorted " "order." msgstr "" +"Las combinaciones se emiten en orden lexicográfico. De esta manera, si el " +"*iterable* de entrada está ordenado, las tuplas de permutación producidas " +"estarán ordenadas." #: ../Doc/library/itertools.rst:206 msgid "" @@ -478,6 +535,9 @@ msgid "" "So if the input elements are unique, there will be no repeat values in each " "combination." msgstr "" +"Los elementos son tratados como únicos basados en su posición, no en su " +"valor. De esta manera, si los elementos de entrada son únicos, no habrá " +"valores repetidos en cada combinación." #: ../Doc/library/itertools.rst:232 msgid "" @@ -485,18 +545,27 @@ msgid "" "func:`permutations` after filtering entries where the elements are not in " "sorted order (according to their position in the input pool)::" msgstr "" +"El código para :func:`combinations` se puede expresar también como una " +"subsecuencia de :func:`permutations`, luego de filtrar entradas donde los " +"elementos no están ordenados (de acuerdo a su posición en el conjunto de " +"entrada)::" #: ../Doc/library/itertools.rst:243 msgid "" "The number of items returned is ``n! / r! / (n-r)!`` when ``0 <= r <= n`` or " "zero when ``r > n``." msgstr "" +"El número de elementos retornados es ``n! / r! / (n-r)!`` cuando ``0 <= r <= " +"n`` o cero cuando ``r > n``." #: ../Doc/library/itertools.rst:248 msgid "" "Return *r* length subsequences of elements from the input *iterable* " "allowing individual elements to be repeated more than once." msgstr "" +"Retorna subsecuencias, de longitud *r*, con elementos del *iterable* de " +"entrada, permitiendo que haya elementos individuales repetidos más de una " +"vez." #: ../Doc/library/itertools.rst:255 msgid "" @@ -504,6 +573,9 @@ msgid "" "So if the input elements are unique, the generated combinations will also be " "unique." msgstr "" +"Los elementos son tratados como únicos basados en su posición, no en su " +"valor. De esta manera, si los elementos de entrada son únicos, las " +"combinaciones generadas también serán únicas." #: ../Doc/library/itertools.rst:278 msgid "" @@ -511,11 +583,17 @@ msgid "" "a subsequence of :func:`product` after filtering entries where the elements " "are not in sorted order (according to their position in the input pool)::" msgstr "" +"El código para :func:`combinations_with_replacement` se puede expresar " +"también como una subsecuencia de :func:`product`, luego de filtrar entradas " +"donde los elementos no están ordenados (de acuerdo a su posición en el " +"conjunto de entrada)::" #: ../Doc/library/itertools.rst:289 msgid "" "The number of items returned is ``(n+r-1)! / r! / (n-1)!`` when ``n > 0``." msgstr "" +"El número de elementos retornados es ``(n+r-1)! / r! / (n-1)!`` cuando ``n > " +"0``." #: ../Doc/library/itertools.rst:296 msgid "" @@ -524,6 +602,10 @@ msgid "" "Stops when either the *data* or *selectors* iterables has been exhausted. " "Roughly equivalent to::" msgstr "" +"Crea un iterador que filtra elementos de *data*, retornando sólo aquellos " +"que tienen un elemento correspondiente en *selectors* que evalúa a ``True``. " +"El iterador se detiene cuando alguno de los iterables (*data* o *selectors*) " +"ha sido consumido. Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:310 msgid "" @@ -532,6 +614,10 @@ msgid "" "data points. Also, used with :func:`zip` to add sequence numbers. Roughly " "equivalent to::" msgstr "" +"Crea un iterador que retorna valores espaciados uniformemente, comenzando " +"con el número *start*. Usualmente se utiliza como argumento en :func:`map` " +"para generar puntos de datos consecutivos. También se utiliza en :func:`zip` " +"para agregar secuencias de números. Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:322 msgid "" @@ -539,10 +625,15 @@ msgid "" "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" +"Cuando se hace conteo con números de punto flotante, se puede lograr una " +"mejor precisión al sustituir código multiplicativo como: ``(start + step * i " +"for i in count())``." #: ../Doc/library/itertools.rst:326 msgid "Added *step* argument and allowed non-integer arguments." msgstr "" +"Se adicionó el argumento *step* y se permitieron argumentos diferentes a " +"enteros." #: ../Doc/library/itertools.rst:331 msgid "" @@ -550,12 +641,17 @@ msgid "" "each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" +"Crea un iterador que retorna elementos del iterable y hace una copia de cada " +"uno. Cuando el iterable es consumido, retornar los elementos de la copia " +"almacenada. Se repite indefinidamente. Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:345 msgid "" "Note, this member of the toolkit may require significant auxiliary storage " "(depending on the length of the iterable)." msgstr "" +"Ten en cuenta, este miembro del conjunto de herramientas puede requerir " +"almacenamiento auxiliar importante (dependiendo de la longitud del iterable)." #: ../Doc/library/itertools.rst:351 msgid "" @@ -564,6 +660,11 @@ msgid "" "does not produce *any* output until the predicate first becomes false, so it " "may have a lengthy start-up time. Roughly equivalent to::" msgstr "" +"Crea un iterador que descarta elementos del iterable, siempre y cuando el " +"predicado sea verdadero; después, retorna cada elemento. Ten en cuenta, el " +"iterador no produce *ningún* resultado hasta que el predicado se hace falso, " +"pudiendo incurrir en un tiempo de arranque extenso. Aproximadamente " +"equivalente a::" #: ../Doc/library/itertools.rst:368 msgid "" @@ -571,6 +672,10 @@ msgid "" "for which the predicate is ``False``. If *predicate* is ``None``, return the " "items that are false. Roughly equivalent to::" msgstr "" +"Crea un iterador que filtra elementos de un iterable, retornando sólo " +"aquellos para los cuales el predicado es ``False``. Si *predicate* es " +"``None``, retorna los elementos que son falsos. Aproximadamente equivalente " +"a::" #: ../Doc/library/itertools.rst:383 msgid "" @@ -580,6 +685,11 @@ msgid "" "returns the element unchanged. Generally, the iterable needs to already be " "sorted on the same key function." msgstr "" +"Crea un iterador que retorna claves consecutivas y grupos del *iterable*. " +"*key* es una función que calcula un valor clave para cada elemento. Si no " +"se especifica o es ``None``, *key* es una función de identidad por defecto y " +"retorna el elemento sin cambios. Generalmente, el iterable necesita estar " +"ordenado con la misma función *key*." #: ../Doc/library/itertools.rst:389 msgid "" @@ -589,6 +699,11 @@ msgid "" "the same key function). That behavior differs from SQL's GROUP BY which " "aggregates common elements regardless of their input order." msgstr "" +"El funcionamiento de :func:`groupby` es similar al del filtro ``uniq`` en " +"Unix. Genera un salto o un nuevo grupo cada vez que el valor de la función " +"clave cambia (por lo que usualmente es necesario ordenar los datos usando la " +"misma función clave). Ese comportamiento difiere del de GROUP BY de SQL, el " +"cual agrega elementos comunes sin importar el orden de entrada." #: ../Doc/library/itertools.rst:395 msgid "" @@ -597,10 +712,14 @@ msgid "" "`groupby` object is advanced, the previous group is no longer visible. So, " "if that data is needed later, it should be stored as a list::" msgstr "" +"El grupo retornado es un iterador mismo que comparte el iterable subyacente " +"con :func:`groupby`. Al compartir la fuente, cuando el objeto :func:" +"`groupby` se avanza, el grupo previo deja de ser visible. En ese caso, si " +"los datos se necesitan posteriormente, se deberían almacenar como lista::" #: ../Doc/library/itertools.rst:407 msgid ":func:`groupby` is roughly equivalent to::" -msgstr "" +msgstr ":func:`groupby` es aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:440 msgid "" @@ -615,23 +734,42 @@ msgid "" "the internal structure has been flattened (for example, a multi-line report " "may list a name field on every third line). Roughly equivalent to::" msgstr "" +"Crea un iterador que retorna los elementos seleccionados del iterable. Si " +"*start* es diferente a cero, los elementos del iterable son ignorados hasta " +"que se llegue a *start*. Después de eso, los elementos son retornados " +"consecutivamente a menos que *step* posea un valor tan alto que permita que " +"algunos elementos sean ignordos. Si *stop* es ``None``, la iteración " +"continúa hasta que el iterador sea consumido (si es que llega a ocurrir); de " +"lo contrario, se detiene en la posición especificada. A diferencia de la " +"segmentación normal, :func:`islice` no soporta valores negativos para " +"*start*, *stop*, o *step*. Puede usarse para extraer campos relacionados de " +"estructuras de datos que internamente has sido simplificadas (por ejemplo, " +"un reporte milti-línea puede contener un nombre de campo cada tres líneas). " +"Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:475 msgid "" "If *start* is ``None``, then iteration starts at zero. If *step* is " "``None``, then the step defaults to one." msgstr "" +"Si *start* es ``None``, la iteración empieza en cero. Si *step* es ``None``, " +"step se establece en uno por defecto." #: ../Doc/library/itertools.rst:481 msgid "" "Return successive *r* length permutations of elements in the *iterable*." msgstr "" +"Retorna permutaciones de elementos sucesivas de longitud *r* en el " +"*iterable*." #: ../Doc/library/itertools.rst:483 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" +"Si *r* no es especificado o si es ``None``, entonces por defecto *r* será " +"igual a la longitud de *iterable* y todas las permutaciones de máxima " +"longitud serán generadas." #: ../Doc/library/itertools.rst:487 msgid "" @@ -639,6 +777,9 @@ msgid "" "*iterable* is sorted, the permutation tuples will be produced in sorted " "order." msgstr "" +"Las permutaciones son emitidas en orden lexicográfico. De esta manera, si " +"el *iterable* de entrada esta ordenado, las tuplas de permutación producidas " +"estarán ordenadas." #: ../Doc/library/itertools.rst:491 msgid "" @@ -646,6 +787,9 @@ msgid "" "So if the input elements are unique, there will be no repeat values in each " "permutation." msgstr "" +"Los elementos son tratados como únicos según su posición, y no su valor. " +"Por ende, no habrá elementos repetidos en cada permutación si los elementos " +"de entrada son únicos." #: ../Doc/library/itertools.rst:522 msgid "" @@ -653,16 +797,22 @@ msgid "" "func:`product`, filtered to exclude entries with repeated elements (those " "from the same position in the input pool)::" msgstr "" +"El código para :func:`permutations` también se puede expresar como una " +"subsecuencia de :func:`product`, filtrado para excluir registros con " +"elementos repetidos (aquellos en la misma posición que en el conjunto de " +"entrada)::" #: ../Doc/library/itertools.rst:534 msgid "" "The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " "when ``r > n``." msgstr "" +"El número de elementos retornados es ``n! / (n-r)!`` cuando ``0 <= r <= n`` " +"o cero cuando ``r > n``." #: ../Doc/library/itertools.rst:539 msgid "Cartesian product of input iterables." -msgstr "" +msgstr "Producto cartesiano de los iterables de entrada." #: ../Doc/library/itertools.rst:541 msgid "" @@ -670,6 +820,9 @@ msgid "" "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" +"Aproximadamente equivalente a tener bucles `for` anidados en un generador. " +"Por ejemplo, ``product(A, B)`` es equivalente a ``((x,y) for x in A for y in " +"B)``." #: ../Doc/library/itertools.rst:544 msgid "" @@ -678,6 +831,10 @@ msgid "" "if the input's iterables are sorted, the product tuples are emitted in " "sorted order." msgstr "" +"Los bucles anidados hacen ciclos como un cuentapasos o taxímetro, con el " +"elemento más hacia la derecha avanzando en cada iteración. Este patrón crea " +"un orden lexicográfico en el que, si los iterables de entrada están " +"ordenados, las tuplas producidas son emitidas de manera ordenada." #: ../Doc/library/itertools.rst:549 msgid "" @@ -685,12 +842,17 @@ msgid "" "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" +"Para calcular el producto de un iterable consigo mismo, especifica el número " +"de repeticiones con el argumento opcional *repeat*. Por ejemplo, " +"``product(A, repeat=4)`` es equivalente a ``product(A, A, A, A)``." #: ../Doc/library/itertools.rst:553 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" +"Esta función es aproximadamente equivalente al código siguiente, exceptuando " +"que la implementación real no acumula resultados intermedios en memoria::" #: ../Doc/library/itertools.rst:569 msgid "" @@ -699,12 +861,19 @@ msgid "" "func:`map` for invariant parameters to the called function. Also used with :" "func:`zip` to create an invariant part of a tuple record." msgstr "" +"Crea un iterador que retorna *object* una y otra vez. Se ejecuta " +"indefinidamente a menos que se especifique el argumento *times*. Se utiliza " +"como argumento de :func:`map` para argumentos invariantes de la función " +"invocada. También se usa con :func:`zip` para crear una parte invariante de " +"una tupla." #: ../Doc/library/itertools.rst:585 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*::" msgstr "" +"Un uso común de *repeat* es el de proporcionar un flujo de valores " +"constantes a *map* o *zip*::" #: ../Doc/library/itertools.rst:593 msgid "" @@ -715,16 +884,24 @@ msgid "" "the distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" +"Crea un iterador que calcula la función utilizando argumentos obtenidos del " +"iterable. Se usa en lugar de :func:`map` cuando los argumentos ya están " +"agrupados en tuplas de un mismo iterable (los datos ya han sido \"pre-" +"comprimidos”). La diferencia entre :func:`map` y :func:`starmap` es similar " +"a la distinción entre ``function(a,b)`` y ``function(*c)``. Aproximadamente " +"equivalente a::" #: ../Doc/library/itertools.rst:607 msgid "" "Make an iterator that returns elements from the iterable as long as the " "predicate is true. Roughly equivalent to::" msgstr "" +"Crea un iterador que retorna elementos del iterador siempre y cuando el " +"predicado sea cierto. Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:621 msgid "Return *n* independent iterators from a single iterable." -msgstr "" +msgstr "Retorna *n* iteradores independientes de un mismo iterador." #: ../Doc/library/itertools.rst:623 msgid "" @@ -732,6 +909,9 @@ msgid "" "implementation is more complex and uses only a single underlying :abbr:`FIFO " "(first-in, first-out)` queue)." msgstr "" +"El código Python a continuación ayuda a explicar el funcionamiento de *tee* " +"(aunque la implementación real es mucho más compleja y usa sólo una cola :" +"abbr:`FIFO (first-in, first-out)` subyacente)." #: ../Doc/library/itertools.rst:644 msgid "" @@ -739,6 +919,9 @@ msgid "" "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" +"Una vez que :func:`tee` ha hecho un corte, el *iterable* original no se " +"debería usar en otro lugar. De lo contrario, el *iterable* podría avanzarse " +"sin informar a los objetos *tee*." #: ../Doc/library/itertools.rst:648 msgid "" @@ -746,6 +929,10 @@ msgid "" "when using simultaneously iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" +"Los iteradores ``tee`` no son *threadsafe*. :exc:`RuntimeError` puede " +"ocurrir si se usan simultáneamente iteradores retornados por la misma " +"llamada a :func:`tee` call, aún cuando el *iterable* original sea " +"*threadsafe*." #: ../Doc/library/itertools.rst:652 msgid "" @@ -754,6 +941,11 @@ msgid "" "most or all of the data before another iterator starts, it is faster to use :" "func:`list` instead of :func:`tee`." msgstr "" +"Esta herramienta de iteración puede requerir almacenamiento auxiliar " +"significativo (dependiendo de qué tantos datos necesitan ser almacenados). " +"En general, si un iterador utiliza todos o la mayoría de los datos antes que " +"otro iterador comience, es más rápido utilizar :func:`list` en vez de :func:" +"`tee`." #: ../Doc/library/itertools.rst:660 msgid "" @@ -762,6 +954,10 @@ msgid "" "*fillvalue*. Iteration continues until the longest iterable is exhausted. " "Roughly equivalent to::" msgstr "" +"Crea un iterador que agrega elementos de cada uno de los iterables. Si los " +"iterables tiene longitud impar, los valores sin encontrar serán iguales a " +"*fillvalue*. La iteración continúa hasta que el iterable más largo sea " +"consumido. Aproximadamente equivalente a::" #: ../Doc/library/itertools.rst:684 msgid "" @@ -770,16 +966,22 @@ msgid "" "number of calls (for example :func:`islice` or :func:`takewhile`). If not " "specified, *fillvalue* defaults to ``None``." msgstr "" +"Si alguno de los iterables es potencialmente infinito, la función :func:" +"`zip_longest` debería ser recubierta por otra que limite el número de " +"llamadas (por ejemplo, :func:`islice` o :func:`takewhile`). Si no se " +"especifica, *fillvalue* es ``None`` por defecto." #: ../Doc/library/itertools.rst:693 msgid "Itertools Recipes" -msgstr "" +msgstr "Fórmulas con itertools" #: ../Doc/library/itertools.rst:695 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" +"Esta sección muestra fórmulas para crear un conjunto de herramientas " +"extendido usando las herramientas de itertools como piezas básicas." #: ../Doc/library/itertools.rst:698 msgid "" @@ -787,6 +989,9 @@ msgid "" "from the `more-itertools project `_ found on the Python Package Index::" msgstr "" +"De manera considerable, todas estas fórmulas y muchos otras se pueden " +"instalar desde el `proyecto more-itertools `_, ubicado en el Python Package Index::" #: ../Doc/library/itertools.rst:704 msgid "" @@ -798,3 +1003,10 @@ msgid "" "preferring \"vectorized\" building blocks over the use of for-loops and :" "term:`generator`\\s which incur interpreter overhead." msgstr "" +"Las herramientas adicionales ofrecen el mismo alto rendimiento que las " +"herramientas subyacentes. El rendimiento de memoria superior se mantiene al " +"procesar los elementos uno a uno, y no cargando el iterable entero en " +"memoria. El volumen de código se mantiene bajo al enlazar las herramientas " +"en estilo funcional, eliminando variables temporales. La alta velocidad se " +"retiene al preferir piezas “vectorizadas” sobre el uso de bucles `for` y :" +"term:`generator`\\s que puedan incurrir en costos extra."