# 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: 2023-10-12 19:43+0200\n"
"PO-Revision-Date: 2023-11-04 23:12+0100\n"
"Last-Translator: Marcos Medrano \n"
"Language-Team: python-doc-es\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.13.0\n"
"X-Generator: Poedit 3.4\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 mdulo 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 ""
"funcin *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* rpidos 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 mltiples *mapeados*"
#: ../Doc/library/collections.rst:28
msgid ":class:`Counter`"
msgstr ":class:`Counter`"
#: ../Doc/library/collections.rst:28
msgid "dict subclass for counting :term:`hashable` objects"
msgstr "subclase de *dict* para contar objetos :term:`hashable`"
#: ../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 funcin 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 "
"subclasificacin 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 subclasificacin "
"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 rpidamente una "
"serie de *mappings* de modo que puedan tratarse como una sola unidad. Suele "
"ser mucho ms rpido 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 vaco 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 pblica "
"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 bsquedas 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 "
"reflejarn 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 mtodos habituales de un diccionario. Adems, hay un "
"atributo *maps*, un mtodo 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 bsqueda hasta la ltima bsqueda. 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 vaco, de modo que una llamada a ``d."
"new_child()`` es equivalente a: ``ChainMap({}, *d.maps)``. Si se especifica "
"algn argumento de palabra clave, actualiza el mapa pasado o el nuevo "
"diccionario vaco. Este mtodo 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 parmetro opcional ``m`` ."
#: ../Doc/library/collections.rst:89
msgid "Keyword arguments support was added."
msgstr "Se aadi 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 `. 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 bsqueda. Los casos de uso son similares a los de :"
"keyword:`nonlocal` la palabra clave usada en :term:`alcances anidados "
"`. Los casos de uso tambin son paralelos a los de la funcin "
"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 iteracin 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 `_ in the Enthought `CodeTools package "
"`_ has options to support writing to "
"any mapping in the chain."
msgstr ""
"La `clase MultiContext `_ en el paquete de Enthought llamado "
"`CodeTools `_ tiene opciones para "
"admitir la escritura en cualquier mapeo de la cadena."
#: ../Doc/library/collections.rst:129
msgid ""
"Django's `Context class `_ 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 `_ para crear plantillas es una cadena de mapeo "
"de solo lectura. Tambin presenta caractersticas de pushing y popping de "
"contextos similar al mtodo :meth:`~collections.ChainMap.new_child` y a la "
"propiedad :attr:`~collections.ChainMap.parents` ."
#: ../Doc/library/collections.rst:136
msgid ""
"The `Nested Contexts recipe `_ "
"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 `_ 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 `_."
msgstr ""
"Una `versin de solo lectura muy simplificada de Chainmap `_."
#: ../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 seccin 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 simulacin de la cadena de bsqueda 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 lnea 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 bsquedas "
"buscarn en la cadena completa. Sin embargo, si se desean escrituras y "
"eliminaciones profundas, es fcil crear una subclase que actualice las "
"claves que se encuentran ms 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 rpidos "
"y convenientes. Por ejemplo::"
#: ../Doc/library/collections.rst:245
msgid ""
"A :class:`Counter` is a :class:`dict` subclass for counting :term:`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 :term:`hashable`. Es una coleccin donde los elementos se almacenan "
"como claves 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:251
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:259
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:266
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:274
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 insercin. Las operaciones matemticas en objetos "
"*Counter* tambin preservan el orden. Los resultados se ordenan en funcin "
"de cundo se encuentra un elemento por primera vez en el operando izquierdo "
"y, a continuacin, por el orden en que se encuentra en el operando derecho."
#: ../Doc/library/collections.rst:280
msgid ""
"Counter objects support additional methods beyond those available for all "
"dictionaries:"
msgstr ""
"Los objetos Counter admiten mtodos adicionales a los disponibles para todos "
"los diccionarios:"
#: ../Doc/library/collections.rst:285
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:295
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 "
"comn al menos comn. 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:305
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:319
msgid "Compute the sum of the counts."
msgstr "Computa la suma de las cuentas."
#: ../Doc/library/collections.rst:327
msgid ""
"The usual dictionary methods are available for :class:`Counter` objects "
"except for two which work differently for counters."
msgstr ""
"Los mtodos de diccionario habituales estn disponibles para objetos :class:"
"`Counter` excepto dos que funcionan de manera diferente para los contadores."
#: ../Doc/library/collections.rst:332
msgid "This class method is not implemented for :class:`Counter` objects."
msgstr ""
"Este mtodo de clase no est implementado para objetos :class:`Counter` ."
#: ../Doc/library/collections.rst:336
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. Adems, se espera que el *iterable* sea una secuencia de "
"elementos, no una secuencia de parejas ``(clave, valor)`` ."
#: ../Doc/library/collections.rst:341
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 comparacin 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:346
msgid "Rich comparison operations were added."
msgstr "Se han aadido operaciones de comparacin enriquecidas."
#: ../Doc/library/collections.rst:349
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:354
msgid "Common patterns for working with :class:`Counter` objects::"
msgstr "Patrones comunes para trabajar con objetos :class:`Counter`::"
#: ../Doc/library/collections.rst:366
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 ""
"Existen varias operaciones matemticas que permiten combinar objetos :class:"
"`Counter` para producir conjuntos mltiples (contadores con recuentos "
"superiores a cero). La suma y la resta combinan contadores sumando o "
"restando los recuentos de los elementos correspondientes. La interseccin y "
"la unin retornan el mnimo y el mximo de los recuentos correspondientes. "
"La igualdad y la inclusin comparan los recuentos correspondientes. Cada "
"operacin puede aceptar entradas con recuentos con signo, pero la salida "
"excluir los resultados con recuentos iguales o inferiores a cero."
#: ../Doc/library/collections.rst:391
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 vaco o restar de "
"un contador vaco."
#: ../Doc/library/collections.rst:400
msgid ""
"Added support for unary plus, unary minus, and in-place multiset operations."
msgstr ""
"Se agreg soporte para operaciones unarias de adicin, resta y multiconjunto "
"en su lugar (*in-place*)."
#: ../Doc/library/collections.rst:405
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 disearon principalmente para trabajar con nmeros 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 seccin documenta "
"el rango mnimo y las restricciones de tipo."
#: ../Doc/library/collections.rst:410
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 claves y valores. Los valores estn pensados para ser "
"nmeros que representan conteos, pero *podra* almacenar cualquier cosa en "
"el campo de valor."
#: ../Doc/library/collections.rst:414
msgid ""
"The :meth:`~Counter.most_common` method requires only that the values be "
"orderable."
msgstr ""
"El mtodo :meth:`~Counter.most_common` solo requiere que los valores se "
"puedan ordenar."
#: ../Doc/library/collections.rst:416
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 funcionaran 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:422
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 mtodos de multiconjuntos estn diseados 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 comparacin."
#: ../Doc/library/collections.rst:427
msgid ""
"The :meth:`~Counter.elements` method requires integer counts. It ignores "
"zero and negative counts."
msgstr ""
"El mtodo :meth:`~Counter.elements` requiere conteos enteros. Ignora los "
"conteos de cero y negativos."
#: ../Doc/library/collections.rst:432
msgid ""
"`Bag class `_ in Smalltalk."
msgstr ""
"`Clase Bag `_ en Smalltalk."
#: ../Doc/library/collections.rst:435
msgid ""
"Wikipedia entry for `Multisets `_."
msgstr ""
"Entrada de Wikipedia para `Multiconjuntos `_."
#: ../Doc/library/collections.rst:437
msgid ""
"`C++ multisets `_ tutorial with examples."
msgstr ""
"Tutorial de `multiconjuntos de C++ `_ con ejemplos."
#: ../Doc/library/collections.rst:440
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 matemticas en multiconjuntos y sus casos de uso, consulte "
"*Knuth, Donald. The Art of Computer Programming Volume II, Seccin 4.6.3, "
"Ejercicio 19*."
#: ../Doc/library/collections.rst:444
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 tamao dado sobre un "
"conjunto dado de elementos, consulte :func:`itertools."
"combinations_with_replacement`::"
#: ../Doc/library/collections.rst:451
msgid ":class:`deque` objects"
msgstr "Objetos :class:`deque`"
#: ../Doc/library/collections.rst:455
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 vaco."
#: ../Doc/library/collections.rst:458
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 generalizacin de pilas y colas (el nombre se pronuncia "
"baraja, *deck* en ingls, y es la abreviatura de cola de dos extremos, "
"*double-ended queue* en ingls). 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 direccin."
#: ../Doc/library/collections.rst:463
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, estn "
"optimizados para operaciones rpidas 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 tamao como la posicin de la representacin de datos "
"subyacente."
#: ../Doc/library/collections.rst:469
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 mxima especificada. Una vez que un deque de longitud limitada esta "
"lleno, cuando se agregan nuevos elementos, se descarta el nmero "
"correspondiente de elementos del extremo opuesto. Los deques de longitud "
"limitada proporcionan una funcionalidad similar al filtro ``tail`` en Unix. "
"Tambin son tiles para rastrear transacciones y otros grupos de datos donde "
"solo la actividad ms reciente es de inters."
#: ../Doc/library/collections.rst:478
msgid "Deque objects support the following methods:"
msgstr "Los objetos deque admiten los siguientes mtodos:"
#: ../Doc/library/collections.rst:482
msgid "Add *x* to the right side of the deque."
msgstr "Agregue *x* al lado derecho del deque."
#: ../Doc/library/collections.rst:487
msgid "Add *x* to the left side of the deque."
msgstr "Agregue *x* al lado izquierdo del deque."
#: ../Doc/library/collections.rst:492
msgid "Remove all elements from the deque leaving it with length 0."
msgstr "Retire todos los elementos del deque dejndolo con longitud 0."
#: ../Doc/library/collections.rst:497
msgid "Create a shallow copy of the deque."
msgstr "Crea una copia superficial del deque."
#: ../Doc/library/collections.rst:504
msgid "Count the number of deque elements equal to *x*."
msgstr "Cuente el nmero de elementos deque igual a *x*."
#: ../Doc/library/collections.rst:511
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:517
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 "
"inversin del orden de los elementos en el argumento iterable."
#: ../Doc/library/collections.rst:524
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 posicin de *x* en el deque (en o despus del ndice *start* y "
"antes del ndice *stop*). Retorna la primera coincidencia o lanza :exc:"
"`ValueError` si no se encuentra."
#: ../Doc/library/collections.rst:533
msgid "Insert *x* into the deque at position *i*."
msgstr "Ingrese *x* en el dique en la posicin *i*."
#: ../Doc/library/collections.rst:535
msgid ""
"If the insertion would cause a bounded deque to grow beyond *maxlen*, an :"
"exc:`IndexError` is raised."
msgstr ""
"Si la insercin causara que un deque limitado crezca ms all de *maxlen*, "
"se lanza un :exc:`IndexError`."
#: ../Doc/library/collections.rst:543
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:549
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:555
msgid ""
"Remove the first occurrence of *value*. If not found, raises a :exc:"
"`ValueError`."
msgstr ""
"Elimina la primera aparicin de *value*. Si no se encuentra, lanza un :exc:"
"`ValueError`."
#: ../Doc/library/collections.rst:561
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:568
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:571
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 vaco, 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:576
msgid "Deque objects also provide one read-only attribute:"
msgstr "Los objetos deque tambin proporcionan un atributo de solo lectura:"
#: ../Doc/library/collections.rst:580
msgid "Maximum size of a deque or ``None`` if unbounded."
msgstr "Tamao mximo de un deque o ``None`` si no est limitado."
#: ../Doc/library/collections.rst:585
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 ""
"Adems de lo anterior, los deques admiten iteracin, pickling, ``len(d)``, "
"``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, prueba de "
"pertenencia con el operador :keyword:`in` , y referencias de subndices 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 rpido, use listas en su lugar."
#: ../Doc/library/collections.rst:591
msgid ""
"Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and "
"``__imul__()``."
msgstr ""
"A partir de la versin 3.5, los deques admiten ``__add__()``, ``__mul__()``, "
"y ``__imul__()``."
#: ../Doc/library/collections.rst:594
msgid "Example:"
msgstr "Ejemplo:"
#: ../Doc/library/collections.rst:651
msgid ":class:`deque` Recipes"
msgstr "Recetas :class:`deque`"
#: ../Doc/library/collections.rst:653
msgid "This section shows various approaches to working with deques."
msgstr "Esta seccin muestra varios enfoques para trabajar con deques."
#: ../Doc/library/collections.rst:655
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:663
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:678
msgid ""
"A `round-robin scheduler `_ 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 `_ se puede implementar con iteradores de entrada "
"almacenados en :class:`deque`. Los valores son producidos del iterador "
"activo en la posicin 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 mtodo :meth:`~deque.rotate` ::"
#: ../Doc/library/collections.rst:697
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 mtodo :meth:`~deque.rotate` proporciona una forma de implementar "
"eliminacin y rebanado de :class:`deque`. Por ejemplo, una implementacin "
"pura de Python de ``del d[n]`` se basa en el mtodo ``rotate()`` para "
"colocar los elementos que se van a extraer::"
#: ../Doc/library/collections.rst:706
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 rotacin. Con variaciones menores en ese enfoque, es fcil "
"implementar manipulaciones de pila de estilo hacia adelante como ``dup``, "
"``drop``, ``swap``, ``over``, ``pick``, ``rot``, y ``roll``."
#: ../Doc/library/collections.rst:716
msgid ":class:`defaultdict` objects"
msgstr "Objetos :class:`defaultdict`"
#: ../Doc/library/collections.rst:720
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 mtodo 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:725
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:731
msgid ""
":class:`defaultdict` objects support the following method in addition to the "
"standard :class:`dict` operations:"
msgstr ""
"Los objetos :class:`defaultdict` admiten el siguiente mtodo adems de las "
"operaciones estndar de :class:`dict`:"
#: ../Doc/library/collections.rst:736
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 excepcin :exc:"
"`KeyError` con la *key* como argumento."
#: ../Doc/library/collections.rst:739
msgid ""
"If :attr:`default_factory` is not ``None``, it is called without arguments "
"to provide a default value for the given *key*, this value is inserted in "
"the dictionary for the *key*, and returned."
msgstr ""
"Si :attr:`default_factory` no es ``None``, se llama sin argumentos para "
"proporcionar un valor predeterminado para la *key* dada, este valor se "
"inserta en el diccionario para la *key* y se retorna."
#: ../Doc/library/collections.rst:743
msgid ""
"If calling :attr:`default_factory` raises an exception this exception is "
"propagated unchanged."
msgstr ""
"Si llamar a :attr:`default_factory` lanza una excepcin, esta excepcin se "
"propaga sin cambios."
#: ../Doc/library/collections.rst:746
msgid ""
"This method is called by the :meth:`__getitem__` method of the :class:`dict` "
"class when the requested key is not found; whatever it returns or raises is "
"then returned or raised by :meth:`__getitem__`."
msgstr ""
"Este mtodo es llamado por el mtodo :meth:`__getitem__` de la clase :class:"
"`dict` cuando no se encuentra la clave solicitada; todo lo que retorna o "
"lanza es retornado o lanzado por :meth:`__getitem__`."
#: ../Doc/library/collections.rst:750
msgid ""
"Note that :meth:`__missing__` is *not* called for any operations besides :"
"meth:`__getitem__`. This means that :meth:`get` will, like normal "
"dictionaries, return ``None`` as a default rather than using :attr:"
"`default_factory`."
msgstr ""
"Tenga en cuenta que :meth:`__missing__` *no* se llama para ninguna operacin "
"aparte de :meth:`__getitem__`. Esto significa que :meth:`get`, como los "
"diccionarios normales, retornar ``None`` por defecto en lugar de usar :attr:"
"`default_factory`."
#: ../Doc/library/collections.rst:756
msgid ":class:`defaultdict` objects support the following instance variable:"
msgstr ""
"los objetos :class:`defaultdict` admiten la siguiente variable de instancia:"
#: ../Doc/library/collections.rst:761
msgid ""
"This attribute is used by the :meth:`__missing__` method; it is initialized "
"from the first argument to the constructor, if present, or to ``None``, if "
"absent."
msgstr ""
"Este atributo es utilizado por el mtodo :meth:`__missing__` ; se inicializa "
"desde el primer argumento al constructor, si est presente, o en ``None``, "
"si est ausente."
#: ../Doc/library/collections.rst:765 ../Doc/library/collections.rst:1182
msgid ""
"Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`."
msgstr ""
"Se agregaron los operadores unir (``|``) y actualizar (``|=``), "
"especificados en :pep:`584`."
#: ../Doc/library/collections.rst:771
msgid ":class:`defaultdict` Examples"
msgstr "Ejemplos :class:`defaultdict`"
#: ../Doc/library/collections.rst:773
msgid ""
"Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy "
"to group a sequence of key-value pairs into a dictionary of lists:"
msgstr ""
"Usando :class:`list` como :attr:`~defaultdict.default_factory`, es fcil "
"agrupar una secuencia de pares clave-valor en un diccionario de listas:"
#: ../Doc/library/collections.rst:784
msgid ""
"When each key is encountered for the first time, it is not already in the "
"mapping; so an entry is automatically created using the :attr:`~defaultdict."
"default_factory` function which returns an empty :class:`list`. The :meth:"
"`list.append` operation then attaches the value to the new list. When keys "
"are encountered again, the look-up proceeds normally (returning the list for "
"that key) and the :meth:`list.append` operation adds another value to the "
"list. This technique is simpler and faster than an equivalent technique "
"using :meth:`dict.setdefault`:"
msgstr ""
"Cuando se encuentra cada clave por primera vez, no est ya en el mapping; "
"por lo que una entrada se crea automticamente usando la funcin :attr:"
"`~defaultdict.default_factory` que retorna una :class:`list` vaca. La "
"operacin :meth:`list.append` luego adjunta el valor a la nueva lista. "
"Cuando se vuelven a encontrar claves, la bsqueda procede normalmente "
"(retornando la lista para esa clave) y la operacin :meth:`list.append` "
"agrega otro valor a la lista. Esta tcnica es ms simple y rpida que una "
"tcnica equivalente usando :meth:`dict.setdefault`:"
#: ../Doc/library/collections.rst:799
msgid ""
"Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :"
"class:`defaultdict` useful for counting (like a bag or multiset in other "
"languages):"
msgstr ""
"Establecer :attr:`~defaultdict.default_factory` en :class:`int` hace que :"
"class:`defaultdict` sea til para contar (como un bag o multiconjunto en "
"otros idiomas):"
#: ../Doc/library/collections.rst:811
msgid ""
"When a letter is first encountered, it is missing from the mapping, so the :"
"attr:`~defaultdict.default_factory` function calls :func:`int` to supply a "
"default count of zero. The increment operation then builds up the count for "
"each letter."
msgstr ""
"Cuando se encuentra una letra por primera vez, falta en el mapping, por lo "
"que la funcin :attr:`~defaultdict.default_factory` llama a :func:`int` para "
"proporcionar una cuenta predeterminada de cero. La operacin de incremento "
"luego acumula el conteo de cada letra."
#: ../Doc/library/collections.rst:815
msgid ""
"The function :func:`int` which always returns zero is just a special case of "
"constant functions. A faster and more flexible way to create constant "
"functions is to use a lambda function which can supply any constant value "
"(not just zero):"
msgstr ""
"La funcin :func:`int` que siempre retorna cero es solo un caso especial de "
"funciones constantes. Una forma ms rpida y flexible de crear funciones "
"constantes es utilizar una funcin lambda que pueda proporcionar cualquier "
"valor constante (no solo cero):"
#: ../Doc/library/collections.rst:828
msgid ""
"Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :"
"class:`defaultdict` useful for building a dictionary of sets:"
msgstr ""
"Establecer :attr:`~defaultdict.default_factory` en :class:`set` hace que :"
"class:`defaultdict` sea til para construir un diccionario de conjuntos:"
#: ../Doc/library/collections.rst:841
msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields"
msgstr ""
":func:`namedtuple` Funciones *Factory* para Tuplas y Campos con Nombres"
#: ../Doc/library/collections.rst:843
msgid ""
"Named tuples assign meaning to each position in a tuple and allow for more "
"readable, self-documenting code. They can be used wherever regular tuples "
"are used, and they add the ability to access fields by name instead of "
"position index."
msgstr ""
"Las tuplas con nombre asignan significado a cada posicin en una tupla y "
"permiten un cdigo ms legible y autodocumentado. Se pueden usar donde se "
"usen tuplas regulares y agregan la capacidad de acceder a los campos por "
"nombre en lugar del ndice de posicin."
#: ../Doc/library/collections.rst:849
msgid ""
"Returns a new tuple subclass named *typename*. The new subclass is used to "
"create tuple-like objects that have fields accessible by attribute lookup as "
"well as being indexable and iterable. Instances of the subclass also have a "
"helpful docstring (with typename and field_names) and a helpful :meth:"
"`__repr__` method which lists the tuple contents in a ``name=value`` format."
msgstr ""
"Retorna una nueva subclase de tupla llamada *typename*. La nueva subclase se "
"utiliza para crear objetos tipo tupla que tienen campos accesibles mediante "
"bsqueda de atributos, adems de ser indexables e iterables. Las instancias "
"de la subclase tambin tienen un docstring til (con typename y field_names) "
"y un mtodo til :meth:`__repr__` que lista el contenido de la tupla en un "
"formato de ``nombre=valor``."
#: ../Doc/library/collections.rst:855
msgid ""
"The *field_names* are a sequence of strings such as ``['x', 'y']``. "
"Alternatively, *field_names* can be a single string with each fieldname "
"separated by whitespace and/or commas, for example ``'x y'`` or ``'x, y'``."
msgstr ""
"Los *nombres de campo* son una secuencia de cadenas como ``[x, y]``. "
"Alternativamente, *nombres de campo* puede ser una sola cadena con cada "
"nombre de campo separado por espacios en blanco y/o comas, por ejemplo ``x "
"y`` or ``x, y``."
#: ../Doc/library/collections.rst:859
msgid ""
"Any valid Python identifier may be used for a fieldname except for names "
"starting with an underscore. Valid identifiers consist of letters, digits, "
"and underscores but do not start with a digit or underscore and cannot be a :"
"mod:`keyword` such as *class*, *for*, *return*, *global*, *pass*, or *raise*."
msgstr ""
"Se puede usar cualquier identificador de Python vlido para un *fieldname*, "
"excepto para los nombres que comienzan con un guin bajo. Los "
"identificadores vlidos constan de letras, dgitos y guiones bajos, pero no "
"comienzan con un dgito o guion bajo y no pueden ser :mod:`keyword` como "
"*class*, *for*, *return*, *global*, *pass*, o *raise*."
#: ../Doc/library/collections.rst:865
msgid ""
"If *rename* is true, invalid fieldnames are automatically replaced with "
"positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is "
"converted to ``['abc', '_1', 'ghi', '_3']``, eliminating the keyword ``def`` "
"and the duplicate fieldname ``abc``."
msgstr ""
"Si *rename* es verdadero, los nombres de campo no vlidos se reemplazan "
"automticamente con nombres posicionales. Por ejemplo, ``[abc, def, "
"ghi, abc]`` se convierte en ``[abc, _1, ghi, _3]``, eliminando "
"la palabra clave ``def`` y el nombre de campo duplicado ``abc``."
#: ../Doc/library/collections.rst:870
msgid ""
"*defaults* can be ``None`` or an :term:`iterable` of default values. Since "
"fields with a default value must come after any fields without a default, "
"the *defaults* are applied to the rightmost parameters. For example, if the "
"fieldnames are ``['x', 'y', 'z']`` and the defaults are ``(1, 2)``, then "
"``x`` will be a required argument, ``y`` will default to ``1``, and ``z`` "
"will default to ``2``."
msgstr ""
"*defaults* pueden ser ``None`` o un :term:`iterable` de los valores "
"predeterminados. Dado que los campos con un valor predeterminado deben venir "
"despus de cualquier campo sin un valor predeterminado, los *defaults* se "
"aplican a los parmetros situados ms a la derecha. Por ejemplo, si los "
"nombres de campo son ``[x, y, z]`` y los valores predeterminados son "
"``(1, 2)``, entonces ``x`` ser un argumento obligatorio, ``y`` tendr el "
"valor predeterminado de ``1``, y ``z`` el valor predeterminado de ``2``."
#: ../Doc/library/collections.rst:877
msgid ""
"If *module* is defined, the ``__module__`` attribute of the named tuple is "
"set to that value."
msgstr ""
"Si se define *module*, el atributo ``__module__`` de la tupla nombrada se "
"establece en ese valor."
#: ../Doc/library/collections.rst:880
msgid ""
"Named tuple instances do not have per-instance dictionaries, so they are "
"lightweight and require no more memory than regular tuples."
msgstr ""
"Las instancias de tuplas con nombre no tienen diccionarios por instancia, "
"por lo que son livianas y no requieren ms memoria que las tuplas normales."
#: ../Doc/library/collections.rst:883
msgid ""
"To support pickling, the named tuple class should be assigned to a variable "
"that matches *typename*."
msgstr ""
"Para admitir el serializado (*pickling*), la clase tupla con nombre debe "
"asignarse a una variable que coincida con *typename*."
#: ../Doc/library/collections.rst:886
msgid "Added support for *rename*."
msgstr "Se agreg soporte para *rename*."
#: ../Doc/library/collections.rst:889
msgid ""
"The *verbose* and *rename* parameters became :ref:`keyword-only arguments "
"`."
msgstr ""
"Los parmetros *verbose* y *rename* se convirtieron en :ref:`argumentos de "
"solo palabra clave `."
#: ../Doc/library/collections.rst:893
msgid "Added the *module* parameter."
msgstr "Se agreg el parmetro *module*."
#: ../Doc/library/collections.rst:896
msgid "Removed the *verbose* parameter and the :attr:`_source` attribute."
msgstr "Se eliminaron el parmetro *verbose* y el atributo :attr:`_source`."
#: ../Doc/library/collections.rst:899
msgid ""
"Added the *defaults* parameter and the :attr:`_field_defaults` attribute."
msgstr ""
"Se agregaron el parmetro *defaults* y l atributo :attr:`_field_defaults`."
#: ../Doc/library/collections.rst:919
msgid ""
"Named tuples are especially useful for assigning field names to result "
"tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::"
msgstr ""
"Las tuplas con nombre son especialmente tiles para asignar nombres de campo "
"a las tuplas de resultado retornadas por los mdulos :mod:`csv` o :mod:"
"`sqlite3`::"
#: ../Doc/library/collections.rst:935
msgid ""
"In addition to the methods inherited from tuples, named tuples support three "
"additional methods and two attributes. To prevent conflicts with field "
"names, the method and attribute names start with an underscore."
msgstr ""
"Adems de los mtodos heredados de las tuplas, las tuplas con nombre admiten "
"tres mtodos adicionales y dos atributos. Para evitar conflictos con los "
"nombres de campo, los nombres de mtodo y atributo comienzan con un guin "
"bajo."
#: ../Doc/library/collections.rst:941
msgid ""
"Class method that makes a new instance from an existing sequence or iterable."
msgstr ""
"Mtodo de clase que crea una nueva instancia a partir de una secuencia "
"existente o iterable."
#: ../Doc/library/collections.rst:951
msgid ""
"Return a new :class:`dict` which maps field names to their corresponding "
"values:"
msgstr ""
"Retorna un nuevo :class:`dict` que asigna los nombres de los campos a sus "
"valores correspondientes:"
#: ../Doc/library/collections.rst:960
msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`."
msgstr "Retorna un :class:`OrderedDict` en lugar de un :class:`dict` regular."
#: ../Doc/library/collections.rst:963
msgid ""
"Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of "
"Python 3.7, regular dicts are guaranteed to be ordered. If the extra "
"features of :class:`OrderedDict` are required, the suggested remediation is "
"to cast the result to the desired type: ``OrderedDict(nt._asdict())``."
msgstr ""
"Retorna un :class:`dict` normal en lugar de un :class:`OrderedDict`. A "
"partir de Python 3.7, se garantiza el orden de los diccionarios normales. Si "
"se requieren las caractersticas adicionales de :class:`OrderedDict` , la "
"correccin sugerida es emitir el resultado al tipo deseado: ``OrderedDict(nt."
"_asdict())``."
#: ../Doc/library/collections.rst:972
msgid ""
"Return a new instance of the named tuple replacing specified fields with new "
"values::"
msgstr ""
"Retorna una nueva instancia de la tupla nombrada reemplazando los campos "
"especificados con nuevos valores::"
#: ../Doc/library/collections.rst:984
msgid ""
"Tuple of strings listing the field names. Useful for introspection and for "
"creating new named tuple types from existing named tuples."
msgstr ""
"Tupla de cadenas que lista los nombres de los campos. til para la "
"introspeccin y para crear nuevos tipos de tuplas con nombre a partir de "
"tuplas con nombre existentes."
#: ../Doc/library/collections.rst:999
msgid "Dictionary mapping field names to default values."
msgstr "Diccionario de nombres de campos mapeados a valores predeterminados."
#: ../Doc/library/collections.rst:1009
msgid ""
"To retrieve a field whose name is stored in a string, use the :func:"
"`getattr` function:"
msgstr ""
"Para recuperar un campo cuyo nombre est almacenado en una cadena, use la "
"funcin :func:`getattr`:"
#: ../Doc/library/collections.rst:1015
msgid ""
"To convert a dictionary to a named tuple, use the double-star-operator (as "
"described in :ref:`tut-unpacking-arguments`):"
msgstr ""
"Para convertir un diccionario en una tupla con nombre, use el operador de "
"doble estrella (como se describe en :ref:`tut-unpacking-arguments`):"
#: ../Doc/library/collections.rst:1022
msgid ""
"Since a named tuple is a regular Python class, it is easy to add or change "
"functionality with a subclass. Here is how to add a calculated field and a "
"fixed-width print format:"
msgstr ""
"Dado que una tupla con nombre es una clase Python normal, es fcil agregar o "
"cambiar la funcionalidad con una subclase. A continuacin, se explica cmo "
"agregar un campo calculado y un formato de impresin de ancho fijo:"
#: ../Doc/library/collections.rst:1041
msgid ""
"The subclass shown above sets ``__slots__`` to an empty tuple. This helps "
"keep memory requirements low by preventing the creation of instance "
"dictionaries."
msgstr ""
"La subclase que se muestra arriba establece ``__slots__`` a una tupla vaca. "
"Esto ayuda a mantener bajos los requisitos de memoria al evitar la creacin "
"de diccionarios de instancia."
#: ../Doc/library/collections.rst:1044
msgid ""
"Subclassing is not useful for adding new, stored fields. Instead, simply "
"create a new named tuple type from the :attr:`~somenamedtuple._fields` "
"attribute:"
msgstr ""
"La subclasificacin no es til para agregar campos nuevos almacenados. En su "
"lugar, simplemente cree un nuevo tipo de tupla con nombre a partir del "
"atributo :attr:`~somenamedtuple._fields`:"
#: ../Doc/library/collections.rst:1049
msgid ""
"Docstrings can be customized by making direct assignments to the ``__doc__`` "
"fields:"
msgstr ""
"Los docstrings se pueden personalizar realizando asignaciones directas a los "
"campos ``__doc__`` :"
#: ../Doc/library/collections.rst:1058
msgid "Property docstrings became writeable."
msgstr "Los docstrings de propiedad se pueden escribir."
#: ../Doc/library/collections.rst:1063
msgid ""
"See :class:`typing.NamedTuple` for a way to add type hints for named "
"tuples. It also provides an elegant notation using the :keyword:`class` "
"keyword::"
msgstr ""
"Consulte :class:`typing.NamedTuple` para ver una forma de agregar "
"sugerencias de tipo para tuplas con nombre. Tambin proporciona una notacin "
"elegante usando la palabra clave :keyword:`class`::"
#: ../Doc/library/collections.rst:1072
msgid ""
"See :meth:`types.SimpleNamespace` for a mutable namespace based on an "
"underlying dictionary instead of a tuple."
msgstr ""
"Vea :meth:`types.SimpleNamespace` para un espacio de nombres mutable basado "
"en un diccionario subyacente en lugar de una tupla."
#: ../Doc/library/collections.rst:1075
msgid ""
"The :mod:`dataclasses` module provides a decorator and functions for "
"automatically adding generated special methods to user-defined classes."
msgstr ""
"El mdulo :mod:`dataclasses` proporciona un decorador y funciones para "
"agregar automticamente mtodos especiales generados a clases definidas por "
"el usuario."
#: ../Doc/library/collections.rst:1080
msgid ":class:`OrderedDict` objects"
msgstr "Objetos :class:`OrderedDict`"
#: ../Doc/library/collections.rst:1082
msgid ""
"Ordered dictionaries are just like regular dictionaries but have some extra "
"capabilities relating to ordering operations. They have become less "
"important now that the built-in :class:`dict` class gained the ability to "
"remember insertion order (this new behavior became guaranteed in Python 3.7)."
msgstr ""
"Los diccionarios ordenados son como los diccionarios normales, pero tienen "
"algunas capacidades adicionales relacionadas con las operaciones de "
"ordenado. Se han vuelto menos importantes ahora que la clase incorporada :"
"class:`dict` gan la capacidad de recordar el orden de insercin (este nuevo "
"comportamiento qued garantizado en Python 3.7)."
#: ../Doc/library/collections.rst:1088
msgid "Some differences from :class:`dict` still remain:"
msgstr "An quedan algunas diferencias con :class:`dict` :"
#: ../Doc/library/collections.rst:1090
msgid ""
"The regular :class:`dict` was designed to be very good at mapping "
"operations. Tracking insertion order was secondary."
msgstr ""
"El :class:`dict` normal fue diseado para ser muy bueno en operaciones de "
"mapeo. El seguimiento del pedido de insercin era secundario."
#: ../Doc/library/collections.rst:1093
msgid ""
"The :class:`OrderedDict` was designed to be good at reordering operations. "
"Space efficiency, iteration speed, and the performance of update operations "
"were secondary."
msgstr ""
"La :class:`OrderedDict` fue diseada para ser buena para reordenar "
"operaciones. La eficiencia del espacio, la velocidad de iteracin y el "
"rendimiento de las operaciones de actualizacin fueron secundarios."
#: ../Doc/library/collections.rst:1097
msgid ""
"The :class:`OrderedDict` algorithm can handle frequent reordering operations "
"better than :class:`dict`. As shown in the recipes below, this makes it "
"suitable for implementing various kinds of LRU caches."
msgstr ""
"El algoritmo :class:`OrderedDict` puede manejar operaciones frecuentes de re-"
"ordenamiento mejor que :class:`dict`. Como se muestra en las recetas "
"siguientes, esto lo vuelve adecuado para implementar varios tipos de caches "
"LRU."
#: ../Doc/library/collections.rst:1101
msgid ""
"The equality operation for :class:`OrderedDict` checks for matching order."
msgstr ""
"La operacin de igualdad para :class:`OrderedDict` comprueba el orden "
"coincidente."
#: ../Doc/library/collections.rst:1103
msgid ""
"A regular :class:`dict` can emulate the order sensitive equality test with "
"``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``."
msgstr ""
"Un :class:`dict` regular puede emular la prueba de igualdad sensible al "
"orden con ``p == q and all(k1 == k2 for k1, k2 in zip(p, q))``."
#: ../Doc/library/collections.rst:1106
msgid ""
"The :meth:`popitem` method of :class:`OrderedDict` has a different "
"signature. It accepts an optional argument to specify which item is popped."
msgstr ""
"El mtodo :meth:`popitem` de :class:`OrderedDict` tiene una firma diferente. "
"Acepta un argumento opcional para especificar qu elemento es *popped*."
#: ../Doc/library/collections.rst:1109
msgid ""
"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=True)`` "
"with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item."
msgstr ""
"Un :class:`dict` regular puede emular ``od.popitem(last=True)`` de "
"OrderedDict con ``d.popitem()`` que se garantiza que salte el elemento "
"situado ms a la derecha (el ltimo)."
#: ../Doc/library/collections.rst:1112
msgid ""
"A regular :class:`dict` can emulate OrderedDict's ``od.popitem(last=False)`` "
"with ``(k := next(iter(d)), d.pop(k))`` which will return and remove the "
"leftmost (first) item if it exists."
msgstr ""
"Un :class:`dict` regular puede emular ``od.popitem(last=False)`` de "
"OrderedDict con ``(k := next(iter(d)), d.pop(k))`` que retornar y eliminar "
"el elemento situado ms a la izquierda (el primero) si existe."
#: ../Doc/library/collections.rst:1116
msgid ""
":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently "
"reposition an element to an endpoint."
msgstr ""
":class:`OrderedDict` tiene un mtodo :meth:`move_to_end` para reposiciones "
"eficientemente un elemento a un punto final."
#: ../Doc/library/collections.rst:1119
msgid ""
"A regular :class:`dict` can emulate OrderedDict's ``od.move_to_end(k, "
"last=True)`` with ``d[k] = d.pop(k)`` which will move the key and its "
"associated value to the rightmost (last) position."
msgstr ""
"Un :class:`dict` regular puede emular ``od.move_to_end(k, last=True)`` de "
"OrderedDict con ``d[k] = d.pop(k)`` que desplazar la clave y su valor "
"asociado a la posicin ms a la derecha (ltima)."
#: ../Doc/library/collections.rst:1123
msgid ""
"A regular :class:`dict` does not have an efficient equivalent for "
"OrderedDict's ``od.move_to_end(k, last=False)`` which moves the key and its "
"associated value to the leftmost (first) position."
msgstr ""
"Un :class:`dict` regular no tiene un equivalente eficiente para ``od."
"move_to_end(k, last=False)`` de OrderedDict que desplaza la clave y su valor "
"asociado a la posicin ms a la izquierda (primera)."
#: ../Doc/library/collections.rst:1127
msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method."
msgstr ""
"Hasta Python 3.8, :class:`dict` careca de un mtodo :meth:`__reversed__`."
#: ../Doc/library/collections.rst:1132
msgid ""
"Return an instance of a :class:`dict` subclass that has methods specialized "
"for rearranging dictionary order."
msgstr ""
"Retorna una instancia de una subclase :class:`dict` que tiene mtodos "
"especializados para reorganizar el orden del diccionario."
#: ../Doc/library/collections.rst:1139
msgid ""
"The :meth:`popitem` method for ordered dictionaries returns and removes a "
"(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-"
"out)` order if *last* is true or :abbr:`FIFO (first-in, first-out)` order if "
"false."
msgstr ""
"El mtodo :meth:`popitem` para diccionarios ordenados retorna y elimina un "
"par (clave, valor). Los pares se retornan en orden :abbr:`LIFO (last-in, "
"first-out)` si el *ltimo* es verdadero o en orden :abbr:`FIFO (first-in, "
"first-out)` si es falso."
#: ../Doc/library/collections.rst:1146
msgid ""
"Move an existing *key* to either end of an ordered dictionary. The item is "
"moved to the right end if *last* is true (the default) or to the beginning "
"if *last* is false. Raises :exc:`KeyError` if the *key* does not exist:"
msgstr ""
"Mueve una *clave* existente a cualquiera de los extremos de un diccionario "
"ordenado. El elemento se mueve al extremo derecho si *last* es verdadero "
"(por defecto) o al principio si *last* es falso. Lanza :exc:`KeyError` si "
"la *clave* no existe:"
#: ../Doc/library/collections.rst:1163
msgid ""
"In addition to the usual mapping methods, ordered dictionaries also support "
"reverse iteration using :func:`reversed`."
msgstr ""
"Adems de los mtodos de mapeo habituales, los diccionarios ordenados "
"tambin admiten la iteracin inversa usando :func:`reversed`."
#: ../Doc/library/collections.rst:1166
msgid ""
"Equality tests between :class:`OrderedDict` objects are order-sensitive and "
"are implemented as ``list(od1.items())==list(od2.items())``. Equality tests "
"between :class:`OrderedDict` objects and other :class:`~collections.abc."
"Mapping` objects are order-insensitive like regular dictionaries. This "
"allows :class:`OrderedDict` objects to be substituted anywhere a regular "
"dictionary is used."
msgstr ""
"Las pruebas de igualdad entre los objetos :class:`OrderedDict` son sensibles "
"al orden y se implementan como ``list(od1.items())==list(od2.items())``. Las "
"pruebas de igualdad entre los objetos :class:`OrderedDict` y otros objetos :"
"class:`~collections.abc.Mapping` son insensibles al orden como los "
"diccionarios normales. Esto permite que los objetos :class:`OrderedDict` "
"sean sustituidos en cualquier lugar donde se utilice un diccionario normal."
#: ../Doc/library/collections.rst:1173
msgid ""
"The items, keys, and values :term:`views ` of :class:"
"`OrderedDict` now support reverse iteration using :func:`reversed`."
msgstr ""
"Los elementos, claves y valores :term:`vistas ` de :class:"
"`OrderedDict` ahora admiten la iteracin inversa usando :func:`reversed`."
#: ../Doc/library/collections.rst:1177
msgid ""
"With the acceptance of :pep:`468`, order is retained for keyword arguments "
"passed to the :class:`OrderedDict` constructor and its :meth:`update` method."
msgstr ""
"Con la aceptacin de :pep:`468`, el orden se mantiene para los argumentos de "
"palabras clave pasados al constructor :class:`OrderedDict` y su mtodo :meth:"
"`update`."
#: ../Doc/library/collections.rst:1187
msgid ":class:`OrderedDict` Examples and Recipes"
msgstr "Ejemplos y recetas :class:`OrderedDict`"
#: ../Doc/library/collections.rst:1189
msgid ""
"It is straightforward to create an ordered dictionary variant that remembers "
"the order the keys were *last* inserted. If a new entry overwrites an "
"existing entry, the original insertion position is changed and moved to the "
"end::"
msgstr ""
"Es sencillo crear una variante de diccionario ordenado que recuerde el orden "
"en que las claves se insertaron por *ltima vez*. Si una nueva entrada "
"sobrescribe una entrada existente, la posicin de insercin original se "
"cambia y se mueve al final::"
#: ../Doc/library/collections.rst:1201
msgid ""
"An :class:`OrderedDict` would also be useful for implementing variants of :"
"func:`functools.lru_cache`:"
msgstr ""
"Un :class:`OrderedDict` tambin sera til para implementar variantes de :"
"func:`functools.lru_cache`::"
#: ../Doc/library/collections.rst:1300
msgid ":class:`UserDict` objects"
msgstr "Objetos :class:`UserDict`"
#: ../Doc/library/collections.rst:1302
msgid ""
"The class, :class:`UserDict` acts as a wrapper around dictionary objects. "
"The need for this class has been partially supplanted by the ability to "
"subclass directly from :class:`dict`; however, this class can be easier to "
"work with because the underlying dictionary is accessible as an attribute."
msgstr ""
"La clase, :class:`UserDict` acta como un contenedor alrededor de los "
"objetos del diccionario. La necesidad de esta clase ha sido parcialmente "
"suplantada por la capacidad de crear subclases directamente desde :class:"
"`dict`; sin embargo, es ms fcil trabajar con esta clase porque se puede "
"acceder al diccionario subyacente como un atributo."
#: ../Doc/library/collections.rst:1310
msgid ""
"Class that simulates a dictionary. The instance's contents are kept in a "
"regular dictionary, which is accessible via the :attr:`data` attribute of :"
"class:`UserDict` instances. If *initialdata* is provided, :attr:`data` is "
"initialized with its contents; note that a reference to *initialdata* will "
"not be kept, allowing it to be used for other purposes."
msgstr ""
"Clase que simula un diccionario. El contenido de la instancia se guarda en "
"un diccionario normal, al que se puede acceder mediante el atributo :attr:"
"`data` de las instancias de :class:`UserDict`. Si se proporciona "
"*initialdata*, :attr:`data` se inicializa con su contenido; tenga en cuenta "
"que no se mantendr una referencia a *initialdata*, lo que permite que se "
"utilice para otros fines."
#: ../Doc/library/collections.rst:1316
msgid ""
"In addition to supporting the methods and operations of mappings, :class:"
"`UserDict` instances provide the following attribute:"
msgstr ""
"Adems de admitir los mtodos y operaciones de los mappings, las instancias :"
"class:`UserDict` proporcionan el siguiente atributo:"
#: ../Doc/library/collections.rst:1321
msgid ""
"A real dictionary used to store the contents of the :class:`UserDict` class."
msgstr ""
"Un diccionario real utilizado para almacenar el contenido de la clase :class:"
"`UserDict` ."
#: ../Doc/library/collections.rst:1327
msgid ":class:`UserList` objects"
msgstr "Objetos :class:`UserList`"
#: ../Doc/library/collections.rst:1329
msgid ""
"This class acts as a wrapper around list objects. It is a useful base class "
"for your own list-like classes which can inherit from them and override "
"existing methods or add new ones. In this way, one can add new behaviors to "
"lists."
msgstr ""
"Esta clase acta como un contenedor alrededor de los objetos de lista. Es "
"una clase base til para tus propias clases tipo lista que pueden heredar de "
"ellas y anular mtodos existentes o agregar nuevos. De esta forma, se pueden "
"agregar nuevos comportamientos a las listas."
#: ../Doc/library/collections.rst:1334
msgid ""
"The need for this class has been partially supplanted by the ability to "
"subclass directly from :class:`list`; however, this class can be easier to "
"work with because the underlying list is accessible as an attribute."
msgstr ""
"La necesidad de esta clase ha sido parcialmente suplantada por la capacidad "
"de crear subclases directamente desde :class:`list`; sin embargo, es ms "
"fcil trabajar con esta clase porque se puede acceder a la lista subyacente "
"como atributo."
#: ../Doc/library/collections.rst:1340
msgid ""
"Class that simulates a list. The instance's contents are kept in a regular "
"list, which is accessible via the :attr:`data` attribute of :class:"
"`UserList` instances. The instance's contents are initially set to a copy "
"of *list*, defaulting to the empty list ``[]``. *list* can be any iterable, "
"for example a real Python list or a :class:`UserList` object."
msgstr ""
"Clase que simula una lista. El contenido de la instancia se mantiene en una "
"lista normal, a la que se puede acceder mediante el atributo :attr:`data` de "
"las instancias :class:`UserList`. El contenido de la instancia se establece "
"inicialmente en una copia de *list*, por defecto a la lista vaca ``[]``. "
"*list* puede ser cualquier iterable, por ejemplo, una lista de Python real o "
"un objeto :class:`UserList`."
#: ../Doc/library/collections.rst:1346
msgid ""
"In addition to supporting the methods and operations of mutable sequences, :"
"class:`UserList` instances provide the following attribute:"
msgstr ""
"Adems de admitir los mtodos y operaciones de secuencias mutables, las "
"instancias :class:`UserList` proporcionan el siguiente atributo:"
#: ../Doc/library/collections.rst:1351
msgid ""
"A real :class:`list` object used to store the contents of the :class:"
"`UserList` class."
msgstr ""
"Un objeto real :class:`list` usado para almacenar el contenido de la clase :"
"class:`UserList` ."
#: ../Doc/library/collections.rst:1354
msgid ""
"**Subclassing requirements:** Subclasses of :class:`UserList` are expected "
"to offer a constructor which can be called with either no arguments or one "
"argument. List operations which return a new sequence attempt to create an "
"instance of the actual implementation class. To do so, it assumes that the "
"constructor can be called with a single parameter, which is a sequence "
"object used as a data source."
msgstr ""
"**Requisitos de subclases:** Se espera que las subclases de :class:"
"`UserList` ofrezcan un constructor al que se pueda llamar sin argumentos o "
"con un solo argumento. Las operaciones de lista que retornan una nueva "
"secuencia intentan crear una instancia de la clase de implementacin real. "
"Para hacerlo, asume que se puede llamar al constructor con un solo "
"parmetro, que es un objeto de secuencia utilizado como fuente de datos."
#: ../Doc/library/collections.rst:1361
msgid ""
"If a derived class does not wish to comply with this requirement, all of the "
"special methods supported by this class will need to be overridden; please "
"consult the sources for information about the methods which need to be "
"provided in that case."
msgstr ""
"Si una clase derivada no desea cumplir con este requisito, todos los mtodos "
"especiales admitidos por esta clase debern de anularse; consulte las "
"fuentes para obtener informacin sobre los mtodos que deben proporcionarse "
"en ese caso."
#: ../Doc/library/collections.rst:1367
msgid ":class:`UserString` objects"
msgstr "Objetos :class:`UserString`"
#: ../Doc/library/collections.rst:1369
msgid ""
"The class, :class:`UserString` acts as a wrapper around string objects. The "
"need for this class has been partially supplanted by the ability to subclass "
"directly from :class:`str`; however, this class can be easier to work with "
"because the underlying string is accessible as an attribute."
msgstr ""
"La clase, :class:`UserString` acta como un envoltorio alrededor de los "
"objetos de cadena. La necesidad de esta clase ha sido parcialmente "
"suplantada por la capacidad de crear subclases directamente de :class:`str`; "
"sin embargo, es ms fcil trabajar con esta clase porque se puede acceder a "
"la cadena subyacente como atributo."
#: ../Doc/library/collections.rst:1377
msgid ""
"Class that simulates a string object. The instance's content is kept in a "
"regular string object, which is accessible via the :attr:`data` attribute "
"of :class:`UserString` instances. The instance's contents are initially set "
"to a copy of *seq*. The *seq* argument can be any object which can be "
"converted into a string using the built-in :func:`str` function."
msgstr ""
"Clase que simula un objeto de cadena. El contenido de la instancia se "
"mantiene en un objeto de cadena normal, al que se puede acceder a travs del "
"atributo :attr:`data` de las instancias :class:`UserString`. El contenido de "
"la instancia se establece inicialmente en una copia de *seq*. El argumento "
"*seq* puede ser cualquier objeto que se pueda convertir en una cadena usando "
"la funcin incorporada :func:`str`."
#: ../Doc/library/collections.rst:1384
msgid ""
"In addition to supporting the methods and operations of strings, :class:"
"`UserString` instances provide the following attribute:"
msgstr ""
"Adems de admitir los mtodos y operaciones de cadenas, las instancias :"
"class:`UserString` proporcionan el siguiente atributo:"
#: ../Doc/library/collections.rst:1389
msgid ""
"A real :class:`str` object used to store the contents of the :class:"
"`UserString` class."
msgstr ""
"Un objeto real :class:`str` usado para almacenar el contenido de la clase :"
"class:`UserString`."
#: ../Doc/library/collections.rst:1392
msgid ""
"New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, "
"``isprintable``, and ``maketrans``."
msgstr ""
"Nuevos mtodos ``__getnewargs__``, ``__rmod__``, ``casefold``, "
"``format_map``, ``isprintable``, y ``maketrans``."