-
-
Notifications
You must be signed in to change notification settings - Fork 403
Expand file tree
/
Copy pathcollections.po
More file actions
1830 lines (1618 loc) · 78.9 KB
/
collections.po
File metadata and controls
1830 lines (1618 loc) · 78.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2001-2020, Python Software Foundation
# This file is distributed under the same license as the Python package.
# Maintained by the python-doc-es workteam.
# docs-es@python.org /
# https://mail.python.org/mailman3/lists/docs-es.python.org/
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to
# get the list of volunteers
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
"PO-Revision-Date: 2021-12-12 13:26-0500\n"
"Last-Translator: Adolfo Hristo David Roque Gámez <aroquega@gmail.com>\n"
"Language: es\n"
"Language-Team: python-doc-es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"
#: ../Doc/library/collections.rst:2
msgid ":mod:`collections` --- Container datatypes"
msgstr ":mod:`collections` --- Tipos de datos contenedor"
#: ../Doc/library/collections.rst:10
msgid "**Source code:** :source:`Lib/collections/__init__.py`"
msgstr "**Source code:** :source:`Lib/collections/__init__.py`"
#: ../Doc/library/collections.rst:20
msgid ""
"This module implements specialized container datatypes providing "
"alternatives to Python's general purpose built-in containers, :class:"
"`dict`, :class:`list`, :class:`set`, and :class:`tuple`."
msgstr ""
"Este módulo implementa tipos de datos de contenedores especializados que "
"proporcionan alternativas a los contenedores integrados de uso general de "
"Python, :class:`dict`, :class:`list`, :class:`set`, and :class:`tuple`."
#: ../Doc/library/collections.rst:25
msgid ":func:`namedtuple`"
msgstr ":func:`namedtuple`"
#: ../Doc/library/collections.rst:25
msgid "factory function for creating tuple subclasses with named fields"
msgstr ""
"función *factory* para crear subclases de *tuplas* con campos con nombre"
#: ../Doc/library/collections.rst:26
msgid ":class:`deque`"
msgstr ":class:`deque`"
#: ../Doc/library/collections.rst:26
msgid "list-like container with fast appends and pops on either end"
msgstr ""
"contenedor similar a una lista con *appends* y *pops* rápidos en ambos "
"extremos"
#: ../Doc/library/collections.rst:27
msgid ":class:`ChainMap`"
msgstr ":class:`ChainMap`"
#: ../Doc/library/collections.rst:27
msgid "dict-like class for creating a single view of multiple mappings"
msgstr ""
"clase similar a *dict* para crear una vista única de múltiples *mapeados*"
#: ../Doc/library/collections.rst:28
msgid ":class:`Counter`"
msgstr ":class:`Counter`"
#: ../Doc/library/collections.rst:28
msgid "dict subclass for counting hashable objects"
msgstr "subclase de *dict* para contar objetos *hashables*"
#: ../Doc/library/collections.rst:29
msgid ":class:`OrderedDict`"
msgstr ":class:`OrderedDict`"
#: ../Doc/library/collections.rst:29
msgid "dict subclass that remembers the order entries were added"
msgstr ""
"subclase de *dict* que recuerda las entradas de la orden que se agregaron"
#: ../Doc/library/collections.rst:30
msgid ":class:`defaultdict`"
msgstr ":class:`defaultdict`"
#: ../Doc/library/collections.rst:30
msgid "dict subclass that calls a factory function to supply missing values"
msgstr ""
"subclase de *dict* que llama a una función de *factory* para suministrar "
"valores faltantes"
#: ../Doc/library/collections.rst:31
msgid ":class:`UserDict`"
msgstr ":class:`UserDict`"
#: ../Doc/library/collections.rst:31
msgid "wrapper around dictionary objects for easier dict subclassing"
msgstr ""
"envoltura alrededor de los objetos de diccionario para facilitar "
"subclasificaciones *dict*"
#: ../Doc/library/collections.rst:32
msgid ":class:`UserList`"
msgstr ":class:`UserList`"
#: ../Doc/library/collections.rst:32
msgid "wrapper around list objects for easier list subclassing"
msgstr ""
"envoltura alrededor de los objetos de lista para facilitar la "
"subclasificación de un *list*"
#: ../Doc/library/collections.rst:33
msgid ":class:`UserString`"
msgstr ":class:`UserString`"
#: ../Doc/library/collections.rst:33
msgid "wrapper around string objects for easier string subclassing"
msgstr ""
"envoltura alrededor de objetos de cadena para facilitar la subclasificación "
"de *string*"
#: ../Doc/library/collections.rst:38
msgid ":class:`ChainMap` objects"
msgstr "Objetos :class:`ChainMap`"
#: ../Doc/library/collections.rst:42
msgid ""
"A :class:`ChainMap` class is provided for quickly linking a number of "
"mappings so they can be treated as a single unit. It is often much faster "
"than creating a new dictionary and running multiple :meth:`~dict.update` "
"calls."
msgstr ""
"Una clase :class:`ChainMap` se proporciona para vincular rápidamente una "
"serie de *mappings* de modo que puedan tratarse como una sola unidad. Suele "
"ser mucho más rápido que crear un diccionario nuevo y ejecutar varias "
"llamadas a :meth:`~dict.update`."
#: ../Doc/library/collections.rst:46
msgid ""
"The class can be used to simulate nested scopes and is useful in templating."
msgstr ""
"La clase se puede utilizar para simular ámbitos anidados y es útil para "
"crear plantillas."
#: ../Doc/library/collections.rst:50
msgid ""
"A :class:`ChainMap` groups multiple dicts or other mappings together to "
"create a single, updateable view. If no *maps* are specified, a single "
"empty dictionary is provided so that a new chain always has at least one "
"mapping."
msgstr ""
"Un :class:`ChainMap` agrupa varios diccionarios u otros *mappings* para "
"crear una vista única y actualizable. Si no se especifican *maps*, se "
"proporciona un solo diccionario vacío para que una nueva cadena siempre "
"tenga al menos un *mapeo*."
#: ../Doc/library/collections.rst:54
msgid ""
"The underlying mappings are stored in a list. That list is public and can "
"be accessed or updated using the *maps* attribute. There is no other state."
msgstr ""
"Las asignaciones subyacentes se almacenan en una lista. Esa lista es pública "
"y se puede acceder a ella o actualizarla usando el atributo *maps*. No hay "
"otro estado."
#: ../Doc/library/collections.rst:57
msgid ""
"Lookups search the underlying mappings successively until a key is found. "
"In contrast, writes, updates, and deletions only operate on the first "
"mapping."
msgstr ""
"Las búsquedas buscan los mapeos subyacentes sucesivamente hasta que se "
"encuentra una clave. Por el contrario, las escrituras, actualizaciones y "
"eliminaciones solo operan en el primer *mapeo*."
#: ../Doc/library/collections.rst:60
msgid ""
"A :class:`ChainMap` incorporates the underlying mappings by reference. So, "
"if one of the underlying mappings gets updated, those changes will be "
"reflected in :class:`ChainMap`."
msgstr ""
"Un :class:`ChainMap` incorpora los mapeos subyacentes por referencia. "
"Entonces, si una de los mapeos subyacentes se actualiza, esos cambios se "
"reflejarán en :class:`ChainMap`."
#: ../Doc/library/collections.rst:64
msgid ""
"All of the usual dictionary methods are supported. In addition, there is a "
"*maps* attribute, a method for creating new subcontexts, and a property for "
"accessing all but the first mapping:"
msgstr ""
"Se admiten todos los métodos habituales de un diccionario. Además, hay un "
"atributo *maps*, un método para crear nuevos sub contextos y una propiedad "
"para acceder a todos menos al primer mapeo:"
#: ../Doc/library/collections.rst:70
msgid ""
"A user updateable list of mappings. The list is ordered from first-searched "
"to last-searched. It is the only stored state and can be modified to change "
"which mappings are searched. The list should always contain at least one "
"mapping."
msgstr ""
"Una lista de mapeos actualizable por el usuario. La lista está ordenada "
"desde la primera búsqueda hasta la última búsqueda. Es el único estado "
"almacenado y se puede modificar para cambiar los mapeos que se buscan. La "
"lista siempre debe contener al menos un mapeo."
#: ../Doc/library/collections.rst:77
msgid ""
"Returns a new :class:`ChainMap` containing a new map followed by all of the "
"maps in the current instance. If ``m`` is specified, it becomes the new map "
"at the front of the list of mappings; if not specified, an empty dict is "
"used, so that a call to ``d.new_child()`` is equivalent to: ``ChainMap({}, "
"*d.maps)``. If any keyword arguments are specified, they update passed map "
"or new empty dict. This method is used for creating subcontexts that can be "
"updated without altering values in any of the parent mappings."
msgstr ""
"Retorna un nuevo :class:`ChainMap` conteniendo un nuevo mapa seguido de "
"todos los mapas de la instancia actual. Si se especifica ``m``, se "
"convierte en el nuevo mapa al principio de la lista de asignaciones; si no "
"se especifica, se usa un diccionario vacío, de modo que una llamada a ``d."
"new_child()`` es equivalente a: ``ChainMap({}, *d.maps)``. Si se especifica "
"algún argumento de palabra clave, actualiza el mapa pasado o el nuevo "
"diccionario vacío. Este método se utiliza para crear sub contextos que se "
"pueden actualizar sin alterar los valores en ninguna de los mapeos padre."
#: ../Doc/library/collections.rst:86
msgid "The optional ``m`` parameter was added."
msgstr "Se agregó el parámetro opcional ``m`` ."
#: ../Doc/library/collections.rst:89
msgid "Keyword arguments support was added."
msgstr "Se añadió soporte para argumentos por palabras clave."
#: ../Doc/library/collections.rst:94
msgid ""
"Property returning a new :class:`ChainMap` containing all of the maps in the "
"current instance except the first one. This is useful for skipping the "
"first map in the search. Use cases are similar to those for the :keyword:"
"`nonlocal` keyword used in :term:`nested scopes <nested scope>`. The use "
"cases also parallel those for the built-in :func:`super` function. A "
"reference to ``d.parents`` is equivalent to: ``ChainMap(*d.maps[1:])``."
msgstr ""
"Propiedad que retorna un nuevo :class:`ChainMap` conteniendo todos los mapas "
"de la instancia actual excepto el primero. Esto es útil para omitir el "
"primer mapa en la búsqueda. Los casos de uso son similares a los de :"
"keyword:`nonlocal` la palabra clave usada en :term:`alcances anidados "
"<nested scope>`. Los casos de uso también son paralelos a los de la función "
"incorporada :func:`super`. Una referencia a ``d.parents`` es equivalente a: "
"``ChainMap(*d.maps[1:])``."
#: ../Doc/library/collections.rst:102
msgid ""
"Note, the iteration order of a :class:`ChainMap()` is determined by scanning "
"the mappings last to first::"
msgstr ""
"Tenga en cuenta que el orden de iteración de a :class:`ChainMap()` se "
"determina escaneando los mapeos del último al primero::"
#: ../Doc/library/collections.rst:110
msgid ""
"This gives the same ordering as a series of :meth:`dict.update` calls "
"starting with the last mapping::"
msgstr ""
"Esto da el mismo orden que una serie de llamadas a :meth:`dict.update` "
"comenzando con el último mapeo::"
#: ../Doc/library/collections.rst:118
msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`."
msgstr ""
"Se agregó soporte para los operadores ``|`` y ``|=``, especificados en :pep:"
"`584`."
#: ../Doc/library/collections.rst:123
msgid ""
"The `MultiContext class <https://github.com/enthought/codetools/blob/4.0.0/"
"codetools/contexts/multi_context.py>`_ in the Enthought `CodeTools package "
"<https://github.com/enthought/codetools>`_ has options to support writing to "
"any mapping in the chain."
msgstr ""
"La `clase MultiContext <https://github.com/enthought/codetools/blob/4.0.0/"
"codetools/contexts/multi_context.py>`_ en el paquete de Enthought llamado "
"`CodeTools <https://github.com/enthought/codetools>`_ tiene opciones para "
"admitir la escritura en cualquier mapeo de la cadena."
#: ../Doc/library/collections.rst:129
msgid ""
"Django's `Context class <https://github.com/django/django/blob/main/django/"
"template/context.py>`_ for templating is a read-only chain of mappings. It "
"also features pushing and popping of contexts similar to the :meth:"
"`~collections.ChainMap.new_child` method and the :attr:`~collections."
"ChainMap.parents` property."
msgstr ""
"La clase de Django `Context <https://github.com/django/django/blob/master/"
"django/template/context.py>`_ para crear plantillas es una cadena de mapeo "
"de solo lectura. También presenta características de pushing y popping de "
"contextos similar al método :meth:`~collections.ChainMap.new_child` y a la "
"propiedad :attr:`~collections.ChainMap.parents` ."
#: ../Doc/library/collections.rst:136
msgid ""
"The `Nested Contexts recipe <https://code.activestate.com/recipes/577434/>`_ "
"has options to control whether writes and other mutations apply only to the "
"first mapping or to any mapping in the chain."
msgstr ""
"La `receta de Contextos Anidados <https://code.activestate.com/"
"recipes/577434/>`_ tiene opciones para controlar si las escrituras y otras "
"mutaciones se aplican solo al primer mapeo o a cualquier mapeo en la cadena."
#: ../Doc/library/collections.rst:141
msgid ""
"A `greatly simplified read-only version of Chainmap <https://code."
"activestate.com/recipes/305268/>`_."
msgstr ""
"Una `versión de solo lectura muy simplificada de Chainmap <https://code."
"activestate.com/recipes/305268/>`_."
#: ../Doc/library/collections.rst:146
msgid ":class:`ChainMap` Examples and Recipes"
msgstr "Ejemplos y recetas :class:`ChainMap`"
#: ../Doc/library/collections.rst:148
msgid "This section shows various approaches to working with chained maps."
msgstr ""
"Esta sección muestra varios enfoques para trabajar con mapas encadenados."
#: ../Doc/library/collections.rst:151
msgid "Example of simulating Python's internal lookup chain::"
msgstr "Ejemplo de simulación de la cadena de búsqueda interna de Python:"
#: ../Doc/library/collections.rst:156
msgid ""
"Example of letting user specified command-line arguments take precedence "
"over environment variables which in turn take precedence over default "
"values::"
msgstr ""
"Ejemplo de dejar que los argumentos de la línea de comandos especificados "
"por el usuario tengan prioridad sobre las variables de entorno que, a su "
"vez, tienen prioridad sobre los valores predeterminados::"
#: ../Doc/library/collections.rst:173
msgid ""
"Example patterns for using the :class:`ChainMap` class to simulate nested "
"contexts::"
msgstr ""
"Patrones de ejemplo para usar la clase :class:`ChainMap` para simular "
"contextos anidados::"
#: ../Doc/library/collections.rst:192
msgid ""
"The :class:`ChainMap` class only makes updates (writes and deletions) to the "
"first mapping in the chain while lookups will search the full chain. "
"However, if deep writes and deletions are desired, it is easy to make a "
"subclass that updates keys found deeper in the chain::"
msgstr ""
"La clase :class:`ChainMap` solo realiza actualizaciones (escrituras y "
"eliminaciones) en el primer mapeo de la cadena, mientras que las búsquedas "
"buscarán en la cadena completa. Sin embargo, si se desean escrituras y "
"eliminaciones profundas, es fácil crear una subclase que actualice las "
"llaves que se encuentran más profundas en la cadena::"
#: ../Doc/library/collections.rst:223
msgid ":class:`Counter` objects"
msgstr "Objetos :class:`Counter`"
#: ../Doc/library/collections.rst:225
msgid ""
"A counter tool is provided to support convenient and rapid tallies. For "
"example::"
msgstr ""
"Se proporciona una herramienta de contador para respaldar recuentos rápidos "
"y convenientes. Por ejemplo::"
#: ../Doc/library/collections.rst:244
msgid ""
"A :class:`Counter` is a :class:`dict` subclass for counting hashable "
"objects. It is a collection where elements are stored as dictionary keys and "
"their counts are stored as dictionary values. Counts are allowed to be any "
"integer value including zero or negative counts. The :class:`Counter` class "
"is similar to bags or multisets in other languages."
msgstr ""
"Una clase :class:`Counter` es una subclase :class:`dict` para contar objetos "
"hashables. Es una colección donde los elementos se almacenan como llaves de "
"diccionario y sus conteos se almacenan como valores de diccionario. Se "
"permite que los conteos sean cualquier valor entero, incluidos los conteos "
"de cero o negativos. La clase :class:`Counter` es similar a los *bags* o "
"multiconjuntos en otros idiomas."
#: ../Doc/library/collections.rst:250
msgid ""
"Elements are counted from an *iterable* or initialized from another "
"*mapping* (or counter):"
msgstr ""
"Los elementos se cuentan desde un *iterable* o se inicializan desde otro "
"*mapeo* (o contador):"
#: ../Doc/library/collections.rst:258
msgid ""
"Counter objects have a dictionary interface except that they return a zero "
"count for missing items instead of raising a :exc:`KeyError`:"
msgstr ""
"Los objetos Counter tienen una interfaz de diccionario, excepto que retornan "
"un conteo de cero para los elementos faltantes en lugar de levantar una :exc:"
"`KeyError`:"
#: ../Doc/library/collections.rst:265
msgid ""
"Setting a count to zero does not remove an element from a counter. Use "
"``del`` to remove it entirely:"
msgstr ""
"Establecer un conteo en cero no elimina un elemento de un contador. Utilice "
"``del`` para eliminarlo por completo:"
#: ../Doc/library/collections.rst:273
#, fuzzy
msgid ""
"As a :class:`dict` subclass, :class:`Counter` inherited the capability to "
"remember insertion order. Math operations on *Counter* objects also "
"preserve order. Results are ordered according to when an element is first "
"encountered in the left operand and then by the order encountered in the "
"right operand."
msgstr ""
"Como subclase de :class:`dict` , :class:`Counter` heredó la capacidad de "
"recordar el orden de inserción. Las operaciones matemáticas en objetos "
"*Counter* también preserva el orden. Los resultados se ordenan cuando se "
"encuentra un elemento por primera vez en el operando izquierdo y luego según "
"el orden encontrado en el operando derecho."
#: ../Doc/library/collections.rst:279
#, fuzzy
msgid ""
"Counter objects support additional methods beyond those available for all "
"dictionaries:"
msgstr ""
"Los objetos Counter admiten tres métodos más allá de los disponibles para "
"todos los diccionarios:"
#: ../Doc/library/collections.rst:284
msgid ""
"Return an iterator over elements repeating each as many times as its count. "
"Elements are returned in the order first encountered. If an element's count "
"is less than one, :meth:`elements` will ignore it."
msgstr ""
"Retorna un iterador sobre los elementos que se repiten tantas veces como su "
"conteo. Los elementos se retornan en el orden en que se encontraron por "
"primera vez. Si el conteo de un elemento es menor que uno, :meth:`elements` "
"lo ignorará."
#: ../Doc/library/collections.rst:294
msgid ""
"Return a list of the *n* most common elements and their counts from the most "
"common to the least. If *n* is omitted or ``None``, :meth:`most_common` "
"returns *all* elements in the counter. Elements with equal counts are "
"ordered in the order first encountered:"
msgstr ""
"Retorna una lista de los *n* elementos mas comunes y sus conteos, del mas "
"común al menos común. Si se omite *n* o ``None``, :meth:`most_common` "
"retorna *todos* los elementos del contador. Los elementos con conteos "
"iguales se ordenan en el orden en que se encontraron por primera vez:"
#: ../Doc/library/collections.rst:304
msgid ""
"Elements are subtracted from an *iterable* or from another *mapping* (or "
"counter). Like :meth:`dict.update` but subtracts counts instead of "
"replacing them. Both inputs and outputs may be zero or negative."
msgstr ""
"Los elementos se restan de un *iterable* o de otro *mapeo* (o contador). "
"Como :meth:`dict.update` pero resta los conteos en lugar de reemplazarlos. "
"Tanto las entradas como las salidas pueden ser cero o negativas."
#: ../Doc/library/collections.rst:318
msgid "Compute the sum of the counts."
msgstr "Computa la suma de las cuentas."
#: ../Doc/library/collections.rst:326
msgid ""
"The usual dictionary methods are available for :class:`Counter` objects "
"except for two which work differently for counters."
msgstr ""
"Los métodos de diccionario habituales están disponibles para objetos :class:"
"`Counter` excepto dos que funcionan de manera diferente para los contadores."
#: ../Doc/library/collections.rst:331
msgid "This class method is not implemented for :class:`Counter` objects."
msgstr ""
"Este método de clase no está implementado para objetos :class:`Counter` ."
#: ../Doc/library/collections.rst:335
msgid ""
"Elements are counted from an *iterable* or added-in from another *mapping* "
"(or counter). Like :meth:`dict.update` but adds counts instead of replacing "
"them. Also, the *iterable* is expected to be a sequence of elements, not a "
"sequence of ``(key, value)`` pairs."
msgstr ""
"Los elementos se cuentan desde un *iterable* o agregados desde otro *mapeo* "
"(o contador). Como :meth:`dict.update` pero agrega conteos en lugar de "
"reemplazarlos. Además, se espera que el *iterable* sea una secuencia de "
"elementos, no una secuencia de parejas ``(llave, valor)`` ."
#: ../Doc/library/collections.rst:340
msgid ""
"Counters support rich comparison operators for equality, subset, and "
"superset relationships: ``==``, ``!=``, ``<``, ``<=``, ``>``, ``>=``. All of "
"those tests treat missing elements as having zero counts so that "
"``Counter(a=1) == Counter(a=1, b=0)`` returns true."
msgstr ""
"Los contadores admiten operadores de comparación ricos para las relaciones "
"de igualdad, subconjunto, y superconjunto: ``==``, ``!=``, ``<``, ``<=``, "
"``>``, ``>=``. Todas esas pruebas tratan los elementos faltantes como si "
"tuvieran cero recuentos, por lo que ``Counter(a=1) == Counter(a=1, b=0)`` "
"retorne verdadero."
#: ../Doc/library/collections.rst:345
#, fuzzy
msgid "Rich comparison operations were added."
msgstr "Se añadieron comparaciones de operaciones ricas"
#: ../Doc/library/collections.rst:348
msgid ""
"In equality tests, missing elements are treated as having zero counts. "
"Formerly, ``Counter(a=3)`` and ``Counter(a=3, b=0)`` were considered "
"distinct."
msgstr ""
"En pruebas de igualdad, los elementos faltantes son tratados como si "
"tuvieran cero recuentos. Anteriormente, ``Counter(a=3)`` y ``Counter(a=3, "
"b=0)`` se consideraban distintos."
#: ../Doc/library/collections.rst:353
msgid "Common patterns for working with :class:`Counter` objects::"
msgstr "Patrones comunes para trabajar con objetos :class:`Counter`::"
#: ../Doc/library/collections.rst:365
#, fuzzy
msgid ""
"Several mathematical operations are provided for combining :class:`Counter` "
"objects to produce multisets (counters that have counts greater than zero). "
"Addition and subtraction combine counters by adding or subtracting the "
"counts of corresponding elements. Intersection and union return the minimum "
"and maximum of corresponding counts. Equality and inclusion compare "
"corresponding counts. Each operation can accept inputs with signed counts, "
"but the output will exclude results with counts of zero or less."
msgstr ""
"Se proporcionan varias operaciones matemáticas para combinar objetos :class:"
"`Counter` para producir multiconjuntos (contadores que tienen conteos "
"mayores que cero). La suma y la resta combinan contadores sumando o restando "
"los conteos de los elementos correspondientes. La Intersección y unión "
"retornan el mínimo y el máximo de conteos correspondientes. Cada operación "
"puede aceptar entradas con conteos con signo, pero la salida excluirá los "
"resultados con conteos de cero o menos."
#: ../Doc/library/collections.rst:390
msgid ""
"Unary addition and subtraction are shortcuts for adding an empty counter or "
"subtracting from an empty counter."
msgstr ""
"La suma y resta unaria son atajos para agregar un contador vacío o restar de "
"un contador vacío."
#: ../Doc/library/collections.rst:399
msgid ""
"Added support for unary plus, unary minus, and in-place multiset operations."
msgstr ""
"Se agregó soporte para operaciones unarias de adición, resta y multiconjunto "
"en su lugar (*in-place*)."
#: ../Doc/library/collections.rst:404
msgid ""
"Counters were primarily designed to work with positive integers to represent "
"running counts; however, care was taken to not unnecessarily preclude use "
"cases needing other types or negative values. To help with those use cases, "
"this section documents the minimum range and type restrictions."
msgstr ""
"Los Counters se diseñaron principalmente para trabajar con números enteros "
"positivos para representar conteos continuos; sin embargo, se tuvo cuidado "
"de no excluir innecesariamente los casos de uso que necesitan otros tipos o "
"valores negativos. Para ayudar con esos casos de uso, esta sección documenta "
"el rango mínimo y las restricciones de tipo."
#: ../Doc/library/collections.rst:409
msgid ""
"The :class:`Counter` class itself is a dictionary subclass with no "
"restrictions on its keys and values. The values are intended to be numbers "
"representing counts, but you *could* store anything in the value field."
msgstr ""
"La clase :class:`Counter` en sí misma es una subclase de diccionario sin "
"restricciones en sus llaves y valores. Los valores están pensados para ser "
"números que representan conteos, pero *podría* almacenar cualquier cosa en "
"el campo de valor."
#: ../Doc/library/collections.rst:413
msgid ""
"The :meth:`~Counter.most_common` method requires only that the values be "
"orderable."
msgstr ""
"El método :meth:`~Counter.most_common` solo requiere que los valores se "
"puedan ordenar."
#: ../Doc/library/collections.rst:415
msgid ""
"For in-place operations such as ``c[key] += 1``, the value type need only "
"support addition and subtraction. So fractions, floats, and decimals would "
"work and negative values are supported. The same is also true for :meth:"
"`~Counter.update` and :meth:`~Counter.subtract` which allow negative and "
"zero values for both inputs and outputs."
msgstr ""
"Para operaciones en su lugar (*in-place*) como ``c[key] += 1``, el tipo de "
"valor solo necesita admitir la suma y la resta. Por lo tanto, las "
"fracciones, flotantes y decimales funcionarían y se admiten valores "
"negativos. Lo mismo ocurre con :meth:`~Counter.update` y :meth:`~Counter."
"subtract` que permiten valores negativos y cero para las entradas y salidas."
#: ../Doc/library/collections.rst:421
msgid ""
"The multiset methods are designed only for use cases with positive values. "
"The inputs may be negative or zero, but only outputs with positive values "
"are created. There are no type restrictions, but the value type needs to "
"support addition, subtraction, and comparison."
msgstr ""
"Los métodos de multiconjuntos están diseñados solo para casos de uso con "
"valores positivos. Las entradas pueden ser negativas o cero, pero solo se "
"crean salidas con valores positivos. No hay restricciones de tipo, pero el "
"tipo de valor debe admitir la suma, la resta y la comparación."
#: ../Doc/library/collections.rst:426
msgid ""
"The :meth:`~Counter.elements` method requires integer counts. It ignores "
"zero and negative counts."
msgstr ""
"El método :meth:`~Counter.elements` requiere conteos enteros. Ignora los "
"conteos de cero y negativos."
#: ../Doc/library/collections.rst:431
msgid ""
"`Bag class <https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag."
"html>`_ in Smalltalk."
msgstr ""
"`Clase Bag <https://www.gnu.org/software/smalltalk/manual-base/html_node/Bag."
"html>`_ en Smalltalk."
#: ../Doc/library/collections.rst:434
msgid ""
"Wikipedia entry for `Multisets <https://en.wikipedia.org/wiki/Multiset>`_."
msgstr ""
"Entrada de Wikipedia para `Multiconjuntos <https://es.wikipedia.org/wiki/"
"Multiconjunto>`_."
#: ../Doc/library/collections.rst:436
msgid ""
"`C++ multisets <http://www.java2s.com/Tutorial/Cpp/0380__set-multiset/"
"Catalog0380__set-multiset.htm>`_ tutorial with examples."
msgstr ""
"Tutorial de `multiconjuntos de C++ <http://www.java2s.com/Tutorial/"
"Cpp/0380__set-multiset/Catalog0380__set-multiset.htm>`_ con ejemplos."
#: ../Doc/library/collections.rst:439
msgid ""
"For mathematical operations on multisets and their use cases, see *Knuth, "
"Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise "
"19*."
msgstr ""
"Para operaciones matemáticas en multiconjuntos y sus casos de uso, consulte "
"*Knuth, Donald. The Art of Computer Programming Volume II, Sección 4.6.3, "
"Ejercicio 19*."
#: ../Doc/library/collections.rst:443
msgid ""
"To enumerate all distinct multisets of a given size over a given set of "
"elements, see :func:`itertools.combinations_with_replacement`::"
msgstr ""
"Para enumerar todos los distintos multiconjuntos de un tamaño dado sobre un "
"conjunto dado de elementos, consulte :func:`itertools."
"combinations_with_replacement`::"
#: ../Doc/library/collections.rst:450
msgid ":class:`deque` objects"
msgstr "Objetos :class:`deque`"
#: ../Doc/library/collections.rst:454
msgid ""
"Returns a new deque object initialized left-to-right (using :meth:`append`) "
"with data from *iterable*. If *iterable* is not specified, the new deque is "
"empty."
msgstr ""
"Retorna un nuevo objeto deque inicializado de izquierda a derecha (usando :"
"meth:`append`) con datos de *iterable*. Si no se especifica *iterable*, el "
"nuevo deque estará vacío."
#: ../Doc/library/collections.rst:457
msgid ""
"Deques are a generalization of stacks and queues (the name is pronounced "
"\"deck\" and is short for \"double-ended queue\"). Deques support thread-"
"safe, memory efficient appends and pops from either side of the deque with "
"approximately the same O(1) performance in either direction."
msgstr ""
"Los deques son una generalización de pilas y colas (el nombre se pronuncia "
"“baraja”, *deck* en inglés, y es la abreviatura de “cola de dos extremos”, "
"*double-ended queue* en inglés). Los Deques admiten hilos seguros, appends y "
"pops eficientes en memoria desde cualquier lado del deque con "
"aproximadamente el mismo rendimiento O(1) en cualquier dirección."
#: ../Doc/library/collections.rst:462
msgid ""
"Though :class:`list` objects support similar operations, they are optimized "
"for fast fixed-length operations and incur O(n) memory movement costs for "
"``pop(0)`` and ``insert(0, v)`` operations which change both the size and "
"position of the underlying data representation."
msgstr ""
"Aunque los objetos :class:`list` admiten operaciones similares, están "
"optimizados para operaciones rápidas de longitud fija e incurren en costos "
"de movimiento de memoria O(n) para operaciones ``pop(0)`` y ``insert(0, v)`` "
"que cambian tanto el tamaño como la posición de la representación de datos "
"subyacente."
#: ../Doc/library/collections.rst:468
msgid ""
"If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary "
"length. Otherwise, the deque is bounded to the specified maximum length. "
"Once a bounded length deque is full, when new items are added, a "
"corresponding number of items are discarded from the opposite end. Bounded "
"length deques provide functionality similar to the ``tail`` filter in Unix. "
"They are also useful for tracking transactions and other pools of data where "
"only the most recent activity is of interest."
msgstr ""
"Si no se especifica *maxlen* o es ``None``, los deques pueden crecer hasta "
"una longitud arbitraria. De lo contrario, el deque está limitado a la "
"longitud máxima especificada. Una vez que un deque de longitud limitada esta "
"lleno, cuando se agregan nuevos elementos, se descarta el número "
"correspondiente de elementos del extremo opuesto. Los deques de longitud "
"limitada proporcionan una funcionalidad similar al filtro ``tail`` en Unix. "
"También son útiles para rastrear transacciones y otros grupos de datos donde "
"solo la actividad más reciente es de interés."
#: ../Doc/library/collections.rst:477
msgid "Deque objects support the following methods:"
msgstr "Los objetos deque admiten los siguientes métodos:"
#: ../Doc/library/collections.rst:481
msgid "Add *x* to the right side of the deque."
msgstr "Agregue *x* al lado derecho del deque."
#: ../Doc/library/collections.rst:486
msgid "Add *x* to the left side of the deque."
msgstr "Agregue *x* al lado izquierdo del deque."
#: ../Doc/library/collections.rst:491
msgid "Remove all elements from the deque leaving it with length 0."
msgstr "Retire todos los elementos del deque dejándolo con longitud 0."
#: ../Doc/library/collections.rst:496
msgid "Create a shallow copy of the deque."
msgstr "Crea una copia superficial del deque."
#: ../Doc/library/collections.rst:503
msgid "Count the number of deque elements equal to *x*."
msgstr "Cuente el número de elementos deque igual a *x*."
#: ../Doc/library/collections.rst:510
msgid ""
"Extend the right side of the deque by appending elements from the iterable "
"argument."
msgstr ""
"Extienda el lado derecho del deque agregando elementos del argumento "
"iterable."
#: ../Doc/library/collections.rst:516
msgid ""
"Extend the left side of the deque by appending elements from *iterable*. "
"Note, the series of left appends results in reversing the order of elements "
"in the iterable argument."
msgstr ""
"Extienda el lado izquierdo del deque agregando elementos de *iterable*. "
"Tenga en cuenta que la serie de appends a la izquierda da como resultado la "
"inversión del orden de los elementos en el argumento iterable."
#: ../Doc/library/collections.rst:523
msgid ""
"Return the position of *x* in the deque (at or after index *start* and "
"before index *stop*). Returns the first match or raises :exc:`ValueError` "
"if not found."
msgstr ""
"Retorna la posición de *x* en el deque (en o después del índice *start* y "
"antes del índice *stop*). Retorna la primera coincidencia o lanza :exc:"
"`ValueError` si no se encuentra."
#: ../Doc/library/collections.rst:532
msgid "Insert *x* into the deque at position *i*."
msgstr "Ingrese *x* en el dique en la posición *i*."
#: ../Doc/library/collections.rst:534
msgid ""
"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :"
"exc:`IndexError` is raised."
msgstr ""
"Si la inserción causara que un deque limitado crezca más allá de *maxlen*, "
"se lanza un :exc:`IndexError`."
#: ../Doc/library/collections.rst:542
msgid ""
"Remove and return an element from the right side of the deque. If no "
"elements are present, raises an :exc:`IndexError`."
msgstr ""
"Elimina y retorna un elemento del lado derecho del deque. Si no hay "
"elementos presentes, lanza un :exc:`IndexError`."
#: ../Doc/library/collections.rst:548
msgid ""
"Remove and return an element from the left side of the deque. If no elements "
"are present, raises an :exc:`IndexError`."
msgstr ""
"Elimina y retorna un elemento del lado izquierdo del deque. Si no hay "
"elementos presentes, lanza un :exc:`IndexError`."
#: ../Doc/library/collections.rst:554
msgid ""
"Remove the first occurrence of *value*. If not found, raises a :exc:"
"`ValueError`."
msgstr ""
"Elimina la primera aparición de *value*. Si no se encuentra, lanza un :exc:"
"`ValueError`."
#: ../Doc/library/collections.rst:560
msgid "Reverse the elements of the deque in-place and then return ``None``."
msgstr ""
"Invierte los elementos del deque en su lugar (*in-place*) y luego retorna "
"``None``."
#: ../Doc/library/collections.rst:567
msgid ""
"Rotate the deque *n* steps to the right. If *n* is negative, rotate to the "
"left."
msgstr ""
"Gira el deque *n* pasos a la derecha. Si *n* es negativo, lo gira hacia la "
"izquierda."
#: ../Doc/library/collections.rst:570
msgid ""
"When the deque is not empty, rotating one step to the right is equivalent to "
"``d.appendleft(d.pop())``, and rotating one step to the left is equivalent "
"to ``d.append(d.popleft())``."
msgstr ""
"Cuando el deque no está vacío, girar un paso hacia la derecha equivale a ``d."
"appendleft(d.pop())``, y girar un paso hacia la izquierda equivale a ``d."
"append(d.popleft())``."
#: ../Doc/library/collections.rst:575
msgid "Deque objects also provide one read-only attribute:"
msgstr "Los objetos deque también proporcionan un atributo de solo lectura:"
#: ../Doc/library/collections.rst:579
msgid "Maximum size of a deque or ``None`` if unbounded."
msgstr "Tamaño máximo de un deque o ``None`` si no está limitado."
#: ../Doc/library/collections.rst:584
msgid ""
"In addition to the above, deques support iteration, pickling, ``len(d)``, "
"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing "
"with the :keyword:`in` operator, and subscript references such as ``d[0]`` "
"to access the first element. Indexed access is O(1) at both ends but slows "
"to O(n) in the middle. For fast random access, use lists instead."
msgstr ""
"Además de lo anterior, los deques admiten iteración, pickling, ``len(d)``, "
"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, prueba de "
"pertenencia con el operador :keyword:`in` , y referencias de subíndices como "
"``d[0]`` para acceder al primer elemento. El acceso indexado es O(1) en "
"ambos extremos, pero se ralentiza hasta O(n) en el medio. Para un acceso "
"aleatorio rápido, use listas en su lugar."
#: ../Doc/library/collections.rst:590
msgid ""
"Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and "
"``__imul__()``."
msgstr ""
"A partir de la versión 3.5, los deques admiten ``__add__()``, ``__mul__()``, "
"y ``__imul__()``."
#: ../Doc/library/collections.rst:593
msgid "Example:"
msgstr "Ejemplo:"
#: ../Doc/library/collections.rst:650
msgid ":class:`deque` Recipes"
msgstr "Recetas :class:`deque`"
#: ../Doc/library/collections.rst:652
msgid "This section shows various approaches to working with deques."
msgstr "Esta sección muestra varios enfoques para trabajar con deques."
#: ../Doc/library/collections.rst:654
msgid ""
"Bounded length deques provide functionality similar to the ``tail`` filter "
"in Unix::"
msgstr ""
"Los deques de longitud limitada proporcionan una funcionalidad similar al "
"filtro ``tail`` en Unix::"
#: ../Doc/library/collections.rst:662
msgid ""
"Another approach to using deques is to maintain a sequence of recently added "
"elements by appending to the right and popping to the left::"
msgstr ""
"Otro enfoque para usar deques es mantener una secuencia de elementos "
"agregados recientemente haciendo appending a la derecha y popping a la "
"izquierda:"
#: ../Doc/library/collections.rst:677
msgid ""
"A `round-robin scheduler <https://en.wikipedia.org/wiki/Round-"
"robin_scheduling>`_ can be implemented with input iterators stored in a :"
"class:`deque`. Values are yielded from the active iterator in position "
"zero. If that iterator is exhausted, it can be removed with :meth:`~deque."
"popleft`; otherwise, it can be cycled back to the end with the :meth:`~deque."
"rotate` method::"
msgstr ""
"Un `scheduler round-robin <https://en.wikipedia.org/wiki/Round-"
"robin_scheduling>`_ se puede implementar con iteradores de entrada "
"almacenados en :class:`deque`. Los valores son producidos del iterador "
"activo en la posición cero. Si ese iterador está agotado, se puede eliminar "
"con :meth:`~deque.popleft`; de lo contrario, se puede volver en ciclos al "
"final con el método :meth:`~deque.rotate` ::"
#: ../Doc/library/collections.rst:696
msgid ""
"The :meth:`~deque.rotate` method provides a way to implement :class:`deque` "
"slicing and deletion. For example, a pure Python implementation of ``del "
"d[n]`` relies on the ``rotate()`` method to position elements to be popped::"
msgstr ""
"El método :meth:`~deque.rotate` proporciona una forma de implementar "
"eliminación y rebanado de :class:`deque`. Por ejemplo, una implementación "
"pura de Python de ``del d[n]`` se basa en el método ``rotate()`` para "
"colocar los elementos que se van a extraer::"
#: ../Doc/library/collections.rst:705
msgid ""
"To implement :class:`deque` slicing, use a similar approach applying :meth:"
"`~deque.rotate` to bring a target element to the left side of the deque. "
"Remove old entries with :meth:`~deque.popleft`, add new entries with :meth:"
"`~deque.extend`, and then reverse the rotation. With minor variations on "
"that approach, it is easy to implement Forth style stack manipulations such "
"as ``dup``, ``drop``, ``swap``, ``over``, ``pick``, ``rot``, and ``roll``."
msgstr ""
"Para implementar el rebanado de un :class:`deque`, use un enfoque similar "
"aplicando :meth:`~deque.rotate` para traer un elemento objetivo al lado "
"izquierdo del deque. Elimine las entradas antiguas con :meth:`~deque."
"popleft`, agregue nuevas entradas con :meth:`~deque.extend`, y luego "
"invierta la rotación. Con variaciones menores en ese enfoque, es fácil "
"implementar manipulaciones de pila de estilo hacia adelante como ``dup``, "
"``drop``, ``swap``, ``over``, ``pick``, ``rot``, y ``roll``."
#: ../Doc/library/collections.rst:715
msgid ":class:`defaultdict` objects"
msgstr "Objetos :class:`defaultdict`"
#: ../Doc/library/collections.rst:719
msgid ""
"Return a new dictionary-like object. :class:`defaultdict` is a subclass of "
"the built-in :class:`dict` class. It overrides one method and adds one "
"writable instance variable. The remaining functionality is the same as for "
"the :class:`dict` class and is not documented here."
msgstr ""
"Retorna un nuevo objeto similar a un diccionario. :class:`defaultdict` es "
"una subclase de la clase incorporada :class:`dict`. Anula un método y "
"agrega una variable de instancia de escritura. La funcionalidad restante es "
"la misma que para la clase :class:`dict` y no está documentada aquí."
#: ../Doc/library/collections.rst:724
msgid ""
"The first argument provides the initial value for the :attr:"
"`default_factory` attribute; it defaults to ``None``. All remaining "
"arguments are treated the same as if they were passed to the :class:`dict` "
"constructor, including keyword arguments."
msgstr ""
"El primer argumento proporciona el valor inicial para el atributo :attr:"
"`default_factory`; por defecto es ``None``. Todos los argumentos restantes "
"se tratan de la misma forma que si se pasaran al constructor :class:`dict`, "
"incluidos los argumentos de palabras clave."
#: ../Doc/library/collections.rst:730
msgid ""
":class:`defaultdict` objects support the following method in addition to the "
"standard :class:`dict` operations:"
msgstr ""
"Los objetos :class:`defaultdict` admiten el siguiente método además de las "
"operaciones estándar de :class:`dict`:"
#: ../Doc/library/collections.rst:735
msgid ""
"If the :attr:`default_factory` attribute is ``None``, this raises a :exc:"
"`KeyError` exception with the *key* as argument."
msgstr ""
"Si el atributo :attr:`default_factory` es ``None``, lanza una excepción :exc:"
"`KeyError` con la *llave* como argumento."
#: ../Doc/library/collections.rst:738
msgid ""
"If :attr:`default_factory` is not ``None``, it is called without arguments "