diff --git a/dictionaries/library_typing.txt b/dictionaries/library_typing.txt index 089ad5d9d6..3ce8cbcca5 100644 --- a/dictionaries/library_typing.txt +++ b/dictionaries/library_typing.txt @@ -2,3 +2,7 @@ interdependientes tipificación variádico variádicos +cualificador +usuarie +exhaustividad +backports diff --git a/library/typing.po b/library/typing.po index 5f6eff1d96..147bedf60e 100644 --- a/library/typing.po +++ b/library/typing.po @@ -11,7 +11,7 @@ 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-08-15 20:17-0500\n" +"PO-Revision-Date: 2023-01-10 10:24-0300\n" "Last-Translator: Héctor Canto \n" "Language: es\n" "Language-Team: python-doc-es\n" @@ -20,6 +20,7 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.10.3\n" +"X-Generator: Poedit 2.4.2\n" #: ../Doc/library/typing.rst:3 msgid ":mod:`typing` --- Support for type hints" @@ -46,6 +47,11 @@ msgid "" "class:`TypeVar`, and :class:`Generic`. For a full specification, please see :" "pep:`484`. For a simplified introduction to type hints, see :pep:`483`." msgstr "" +"Este módulo entrega soporte en tiempo de ejecución para indicadores de tipo. " +"El soporte fundamental se encuentra en los tipos :data:`Any`, :data:" +"`Union`, :data:`Callable`, :class:`TypeVar`, y :class:`Generic`. Para una " +"especificación completa, por favor ver :pep:`484`. Para una introducción " +"simplificada a los indicadores de tipo, véase :pep:`483`." #: ../Doc/library/typing.rst:26 msgid "" @@ -70,12 +76,19 @@ msgid "" "`typing_extensions `_ package " "provides backports of these new features to older versions of Python." msgstr "" +"Frecuentemente se agregan nuevas funcionalidades al módulo ``typing``. El " +"paquete `typing_extensions `_ " +"provee backports de estas nuevas funcionalidades para versiones más antiguas " +"de Python." #: ../Doc/library/typing.rst:39 +#, fuzzy msgid "" "For a summary of deprecated features and a deprecation timeline, please see " "`Deprecation Timeline of Major Features`_." msgstr "" +"Para un resumen de las funcionalidades obsoletas y una linea de tiempo de " +"obsolescencia, por favor ver `Deprecation Timeline of Major Features`_." #: ../Doc/library/typing.rst:44 msgid "" @@ -83,10 +96,13 @@ msgid "" "reference for type system features, useful typing related tools and typing " "best practices." msgstr "" +"La documentación en https://typing.readthedocs.io/ es una referencia útil " +"sobre características de sistemas de tipos, herramientas útiles relativas al " +"tipado, y mejores prácticas de tipado." #: ../Doc/library/typing.rst:51 msgid "Relevant PEPs" -msgstr "" +msgstr "PEPs relevantes" #: ../Doc/library/typing.rst:53 msgid "" @@ -94,152 +110,165 @@ msgid "" "number of PEPs have modified and enhanced Python's framework for type " "annotations. These include:" msgstr "" +"Desde la introducción inicial de los indicadores de tipo en :pep:`484` y :" +"pep:`483`, un número de PEPs han modificado y mejorado el sistema de " +"anotaciones de tipos de Python. Éstos incluyen:" #: ../Doc/library/typing.rst:58 -#, fuzzy msgid ":pep:`526`: Syntax for Variable Annotations" -msgstr "" -"Soporte añadido para la sintaxis de anotación de variables propuesto en :pep:" -"`526`." +msgstr ":pep:`526`: Sintaxis para anotaciones de variables" #: ../Doc/library/typing.rst:58 msgid "" "*Introducing* syntax for annotating variables outside of function " "definitions, and :data:`ClassVar`" msgstr "" +"*Introduce* sintaxis para anotar variables fuera de definiciones de " +"funciones, y :data:`ClassVar`" #: ../Doc/library/typing.rst:61 msgid ":pep:`544`: Protocols: Structural subtyping (static duck typing)" msgstr "" +":pep:`544`: Protocolos: herencia estructural (\"duck typing\" estático)" #: ../Doc/library/typing.rst:61 msgid "" "*Introducing* :class:`Protocol` and the :func:" "`@runtime_checkable` decorator" msgstr "" +"*Introduce* :class:`Protocol` y el decorador :func:" +"`@runtime_checkable`" #: ../Doc/library/typing.rst:64 msgid ":pep:`585`: Type Hinting Generics In Standard Collections" -msgstr "" +msgstr ":pep:`585`: Indicadores de tipo genéricos en las colecciones estándar" #: ../Doc/library/typing.rst:64 msgid "" "*Introducing* :class:`types.GenericAlias` and the ability to use standard " "library classes as :ref:`generic types`" msgstr "" +"*Introduce* :class:`types.GenericAlias` y la habilidad de utilizar clases de " +"la librería estándar como :ref:`tipos genéricos`" #: ../Doc/library/typing.rst:66 msgid ":pep:`586`: Literal Types" -msgstr "" +msgstr ":pep:`586`: Tipos literales" #: ../Doc/library/typing.rst:67 msgid "*Introducing* :data:`Literal`" -msgstr "" +msgstr "*Introduce* :data:`Literal`" #: ../Doc/library/typing.rst:68 msgid "" ":pep:`589`: TypedDict: Type Hints for Dictionaries with a Fixed Set of Keys" msgstr "" +":pep:`589`: TypedDict: Indicadores de tipo para diccionarios con un conjunto " +"de llaves fijo" #: ../Doc/library/typing.rst:69 msgid "*Introducing* :class:`TypedDict`" -msgstr "" +msgstr "*Introduce* :class:`TypedDict`" #: ../Doc/library/typing.rst:70 msgid ":pep:`591`: Adding a final qualifier to typing" -msgstr "" +msgstr ":pep:`591`: Agregar un cualificador final a typing" #: ../Doc/library/typing.rst:71 msgid "*Introducing* :data:`Final` and the :func:`@final` decorator" -msgstr "" +msgstr "*Introduce* :data:`Final` y el decorador :func:`@final`" #: ../Doc/library/typing.rst:72 msgid ":pep:`593`: Flexible function and variable annotations" -msgstr "" +msgstr ":pep:`593`: Anotaciones flexibles para funciones y variables" #: ../Doc/library/typing.rst:73 msgid "*Introducing* :data:`Annotated`" -msgstr "" +msgstr "*Introduce* :data:`Annotated`" #: ../Doc/library/typing.rst:76 msgid ":pep:`604`: Allow writing union types as ``X | Y``" -msgstr "" +msgstr ":pep:`604`: Permitir la escritura de tipos unión como ``X | Y``" #: ../Doc/library/typing.rst:75 msgid "" "*Introducing* :data:`types.UnionType` and the ability to use the binary-or " "operator ``|`` to signify a :ref:`union of types`" msgstr "" +"*Introduce* :data:`types.UnionType` y la habilidad de usar el operador " +"binario de disyunción ``|`` para significar una :ref:`unión de tipos`" #: ../Doc/library/typing.rst:78 msgid ":pep:`612`: Parameter Specification Variables" -msgstr "" +msgstr ":pep:`612`: Variables de especificación de parámetros" #: ../Doc/library/typing.rst:79 msgid "*Introducing* :class:`ParamSpec` and :data:`Concatenate`" -msgstr "" +msgstr "*Introduce* :class:`ParamSpec` y :data:`Concatenate`" #: ../Doc/library/typing.rst:80 -#, fuzzy msgid ":pep:`613`: Explicit Type Aliases" -msgstr "" -"Consulte :pep:`613` para obtener más detalles sobre los alias de tipos " -"explícitos." +msgstr ":pep:`613`: Alias de tipo explícitos" #: ../Doc/library/typing.rst:81 msgid "*Introducing* :data:`TypeAlias`" -msgstr "" +msgstr "*Introduce* :data:`TypeAlias`" #: ../Doc/library/typing.rst:82 msgid ":pep:`646`: Variadic Generics" -msgstr "" +msgstr ":pep:`646`: Genéricos variádicos" #: ../Doc/library/typing.rst:83 msgid "*Introducing* :data:`TypeVarTuple`" -msgstr "" +msgstr "*Introduce* :data:`TypeVarTuple`" #: ../Doc/library/typing.rst:84 msgid ":pep:`647`: User-Defined Type Guards" -msgstr "" +msgstr ":pep:`647`: Protecciones de tipo definidas por le usuarie" #: ../Doc/library/typing.rst:85 msgid "*Introducing* :data:`TypeGuard`" -msgstr "" +msgstr "*Introduce* :data:`TypeGuard`" #: ../Doc/library/typing.rst:86 msgid "" ":pep:`655`: Marking individual TypedDict items as required or potentially " "missing" msgstr "" +":pep:`655`: Marcar elementos individuales de un TypedDict como requeridos o " +"potencialmente ausentes" #: ../Doc/library/typing.rst:87 msgid "*Introducing* :data:`Required` and :data:`NotRequired`" -msgstr "" +msgstr "*Introduce* :data:`Required` y :data:`NotRequired`" #: ../Doc/library/typing.rst:88 msgid ":pep:`673`: Self type" -msgstr "" +msgstr ":pep:`673`: Tipo Self" #: ../Doc/library/typing.rst:89 msgid "*Introducing* :data:`Self`" -msgstr "" +msgstr "*Introduce* :data:`Self`" #: ../Doc/library/typing.rst:90 msgid ":pep:`675`: Arbitrary Literal String Type" -msgstr "" +msgstr ":pep:`675`: Tipo para cadenas de caracteres literales arbitrarias" #: ../Doc/library/typing.rst:91 msgid "*Introducing* :data:`LiteralString`" -msgstr "" +msgstr "*Introduce* :data:`LiteralString`" #: ../Doc/library/typing.rst:93 +#, fuzzy msgid ":pep:`681`: Data Class Transforms" -msgstr "" +msgstr ":pep:`681`: Transformaciones de Clases de Datos" #: ../Doc/library/typing.rst:93 msgid "" "*Introducing* the :func:`@dataclass_transform` decorator" msgstr "" +"*Introduce* el decorador :func:`@dataclass_transform`" #: ../Doc/library/typing.rst:98 msgid "Type aliases" @@ -258,8 +287,8 @@ msgid "" "Type aliases are useful for simplifying complex type signatures. For " "example::" msgstr "" -"Los alias de tipo son útiles para simplificar indicadores de tipo complejos. " -"Por ejemplo::" +"Los alias de tipo son útiles para simplificar firmas de tipo complejas. Por " +"ejemplo::" #: ../Doc/library/typing.rst:129 msgid "" @@ -274,9 +303,9 @@ msgid "NewType" msgstr "NewType" #: ../Doc/library/typing.rst:137 -#, fuzzy msgid "Use the :class:`NewType` helper to create distinct types::" -msgstr "Utilice la clase auxiliar :class:`NewType` para crear tipos distintos:" +msgstr "" +"Utilícese la clase auxiliar :class:`NewType` para crear tipos distintos::" #: ../Doc/library/typing.rst:144 msgid "" @@ -299,7 +328,6 @@ msgstr "" "creación accidental de un ``UserId`` de manera incorrecta::" #: ../Doc/library/typing.rst:164 -#, fuzzy msgid "" "Note that these checks are enforced only by the static type checker. At " "runtime, the statement ``Derived = NewType('Derived', Base)`` will make " @@ -307,7 +335,7 @@ msgid "" "it. That means the expression ``Derived(some_value)`` does not create a new " "class or introduce much overhead beyond that of a regular function call." msgstr "" -"Tenga en cuenta que estas comprobaciones solo las aplica el verificador de " +"Tenga en cuenta que estas validaciones solo las aplica el verificador de " "tipo estático. En tiempo de ejecución, la declaración ``Derived = " "NewType('Derived', Base)`` hará que ``Derived`` sea una clase que retorna " "inmediatamente cualquier parámetro que le pase. Eso significa que la " @@ -432,7 +460,6 @@ msgstr "" "ReturnType]`` respectivamente." #: ../Doc/library/typing.rst:249 ../Doc/library/typing.rst:855 -#, fuzzy msgid "" "``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" "pep:`612` for more details." @@ -441,7 +468,6 @@ msgstr "" "`Concatenate`. Consulte :pep:`612` para obtener más información." #: ../Doc/library/typing.rst:254 -#, fuzzy msgid "" "The documentation for :class:`ParamSpec` and :class:`Concatenate` provides " "examples of usage in ``Callable``." @@ -465,13 +491,12 @@ msgstr "" "denotar los tipos esperados en elementos contenedores." #: ../Doc/library/typing.rst:273 -#, fuzzy msgid "" "Generics can be parameterized by using a factory available in typing called :" "class:`TypeVar`." msgstr "" -"Los genéricos se pueden parametrizar usando una nueva factoría disponible en " -"*typing* llamada :class:`TypeVar`." +"Los genéricos se pueden parametrizar usando una nueva *factory* disponible " +"en *typing* llamada :class:`TypeVar`." #: ../Doc/library/typing.rst:289 msgid "User-defined generic types" @@ -494,19 +519,21 @@ msgstr "" # revisar en su contexto #: ../Doc/library/typing.rst:321 -#, fuzzy msgid "" "The :class:`Generic` base class defines :meth:`~object.__class_getitem__` so " "that ``LoggedVar[T]`` is valid as a type::" msgstr "" "La clase base :class:`Generic` define :meth:`__class_getitem__` para que " -"``LoggedVar[t]`` sea válido como tipo::" +"``LoggedVar[T]`` sea válido como tipo::" #: ../Doc/library/typing.rst:330 msgid "" "A generic type can have any number of type variables. All varieties of :" "class:`TypeVar` are permissible as parameters for a generic type::" msgstr "" +"Un tipo genérico puede tener un numero cualquiera de variables de tipo. Se " +"permiten todas las variaciones de :class:`TypeVar` para ser usadas como " +"parámetros de un tipo genérico::" # revisar la relacion argumento-variable-clase #: ../Doc/library/typing.rst:342 @@ -570,7 +597,6 @@ msgstr "" "sustituir un :class:`ParamSpec`:" #: ../Doc/library/typing.rst:420 -#, fuzzy msgid "" "Furthermore, a generic with only one parameter specification variable will " "accept parameter lists in the forms ``X[[Type1, Type2, ...]]`` and also " @@ -580,7 +606,7 @@ msgstr "" "Además, un genérico con una sola variable de especificación de parámetro " "aceptará listas de parámetros en los formatos ``X[[Type1, Type2, ...]]`` y " "también ``X[Type1, Type2, ...]`` por razones estéticas. Internamente, este " -"último se convierte en el primero y, por lo tanto, son equivalentes:" +"último se convierte en el primero y, por lo tanto, son equivalentes::" #: ../Doc/library/typing.rst:432 msgid "" @@ -588,7 +614,7 @@ msgid "" "``__parameters__`` after substitution in some cases because they are " "intended primarily for static type checking." msgstr "" -"Tenga en cuenta que los genéricos con :class:`ParamSpec` pueden no tener el " +"Téngase presente que los genéricos con :class:`ParamSpec` pueden no tener el " "``__parameters__`` correcto después de la sustitución en algunos casos " "porque están destinados principalmente a la verificación de tipos estáticos." @@ -637,7 +663,6 @@ msgstr "" "método en un valor de tipo :data:`Any` y asignarlo a cualquier variable::" #: ../Doc/library/typing.rst:471 -#, fuzzy msgid "" "Notice that no type checking is performed when assigning a value of type :" "data:`Any` to a more precise type. For example, the static type checker did " @@ -705,15 +730,15 @@ msgid "Nominal vs structural subtyping" msgstr "Subtipado nominal vs estructural" #: ../Doc/library/typing.rst:527 -#, fuzzy msgid "" "Initially :pep:`484` defined the Python static type system as using *nominal " "subtyping*. This means that a class ``A`` is allowed where a class ``B`` is " "expected if and only if ``A`` is a subclass of ``B``." msgstr "" -"Inicialmente, el :pep:`484` definió el sistema de tipado estático de Python " -"como *nominal*. Esto implica que una clase ``A`` será permitida allí donde " -"se espere una clase ``B`` si y solo si ``A`` es una subclase de ``B``." +"Inicialmente, el :pep:`484` definió el uso de *subtipado nominal* para el " +"sistema de tipado estático de Python. Esto implica que una clase ``A`` será " +"permitida allí donde se espere una clase ``B`` si y solo si ``A`` es una " +"subclase de ``B``." # Frase ultracompleja, necesitar una revisión fuerte #: ../Doc/library/typing.rst:531 @@ -824,12 +849,18 @@ msgstr "Todos los tipos son compatibles con :data:`Any`." msgid ":data:`Any` is compatible with every type." msgstr ":data:`Any` es compatible con todos los tipos." +# ¿Qué signica el uso de "to duck type" como un verbo en este contexto? #: ../Doc/library/typing.rst:602 +#, fuzzy msgid "" ":data:`Any` can now be used as a base class. This can be useful for avoiding " "type checker errors with classes that can duck type anywhere or are highly " "dynamic." msgstr "" +"Ahora es posible utilizar :data:`Any` como una clase base. Ésto puede ser " +"útil para evitar errores del Verificador de tipos con clases que pueden " +"hacer uso del *duck typing* en cualquier punto, o que sean altamente " +"dinámicas." #: ../Doc/library/typing.rst:609 msgid "" @@ -838,9 +869,13 @@ msgid "" "object typed as just ``str`` is not. A string created by composing " "``LiteralString``-typed objects is also acceptable as a ``LiteralString``." msgstr "" +"Tipo especial que solo incluye a las cadenas de texto literales. Una cadena " +"de texto literal es compatible con ``LiteralString``, así como otro " +"``LiteralString`` también lo es, pero un objeto tipado como ``str`` no lo " +"es. Una cadena de texto que ha sido creada componiendo objetos tipados como " +"``LiteralString`` también es válida como ``LiteralString``." #: ../Doc/library/typing.rst:615 ../Doc/library/typing.rst:2443 -#, fuzzy msgid "Example::" msgstr "Por ejemplo::" @@ -850,29 +885,40 @@ msgid "" "could generate problems. For example, the two cases above that generate type " "checker errors could be vulnerable to an SQL injection attack." msgstr "" +"Ésto es util para APIs sensibles donde cadenas de texto arbitrarias " +"generadas por usuarios podrían generar problemas. Por ejemplo, los dos casos " +"que aparecen arriba que generar errores en el verificador de tipos podrían " +"ser vulnerables a un ataque de inyección de SQL." #: ../Doc/library/typing.rst:634 -#, fuzzy msgid "See :pep:`675` for more details." -msgstr "Véase :pep:`484` para más detalle." +msgstr "Véase :pep:`675` para más detalle." +# bottom type? #: ../Doc/library/typing.rst:640 msgid "" "The `bottom type `_, a type that " "has no members." msgstr "" +"El `bottom type `_ (tipo vacío), " +"un tipo que no tiene miembros." #: ../Doc/library/typing.rst:643 msgid "" "This can be used to define a function that should never be called, or a " "function that never returns::" msgstr "" +"Puede ser utilizado para definir una función que nunca debe ser llamada, o " +"una función que nunca retorna::" #: ../Doc/library/typing.rst:663 msgid "" "On older Python versions, :data:`NoReturn` may be used to express the same " "concept. ``Never`` was added to make the intended meaning more explicit." msgstr "" +"En versiones antiguas de Python, es posible utilizar :data:`NoReturn` para " +"expresar el mismo concepto. Se agregó ``Never`` para hacer más explicito el " +"significado intencionado ." # se añade valor para matizar que la funcion retorna (retorna el control) pero # no de manera normal. En el ejemplo lanza una excepción. @@ -889,45 +935,56 @@ msgid "" "the :data:`Never` type should be used for this concept instead. Type " "checkers should treat the two equivalently." msgstr "" +"También puede usarse ``NoReturn`` como `bottom type `_, un tipo que no tiene valores. Comenzando con Python " +"3.11, debe usarse, en cambio, el tipo :data:`Never` para este concepto. Los " +"Validadores de tipo deben tratar a ambos como equivalentes." +# ¿cómo se le llama en español a una variable "capturada" en una clausura? #: ../Doc/library/typing.rst:687 +#, fuzzy msgid "Special type to represent the current enclosed class. For example::" -msgstr "" +msgstr "Tipo especial que representa la clase capturada actual. Por ejemplo::" #: ../Doc/library/typing.rst:698 msgid "" "This annotation is semantically equivalent to the following, albeit in a " "more succinct fashion::" msgstr "" +"Esta anotación es semánticamente equivalente a lo siguiente, aunque de una " +"manera más sucinta::" #: ../Doc/library/typing.rst:710 msgid "In general if something currently follows the pattern of::" -msgstr "" +msgstr "En general, si actualmente algo sigue el patrón de::" #: ../Doc/library/typing.rst:717 msgid "" "You should use :data:`Self` as calls to ``SubclassOfFoo.return_self`` would " "have ``Foo`` as the return type and not ``SubclassOfFoo``." msgstr "" +"Se debiese usar :data:`Self`, ya que llamadas a ``SubclassOfFoo." +"return_self`` tendrían ``Foo`` como valor de retorno, y no ``SubclassOfFoo``." #: ../Doc/library/typing.rst:720 msgid "Other common use cases include:" -msgstr "" +msgstr "Otros casos de uso comunes incluyen:" #: ../Doc/library/typing.rst:722 msgid "" ":class:`classmethod`\\s that are used as alternative constructors and return " "instances of the ``cls`` parameter." msgstr "" +":class:`classmethod` usados como constructores alternativos y retornan " +"instancias del parámetro ``cls``." #: ../Doc/library/typing.rst:724 msgid "Annotating an :meth:`~object.__enter__` method which returns self." -msgstr "" +msgstr "Anotar un método :meth:`~object.__enter__` que retorna self." #: ../Doc/library/typing.rst:726 -#, fuzzy msgid "See :pep:`673` for more details." -msgstr "Véase :pep:`484` para más detalle." +msgstr "Véase :pep:`673` para más detalle." #: ../Doc/library/typing.rst:732 msgid "" @@ -987,13 +1044,12 @@ msgstr "" "equivalente a ``Tuple[Any, ...]`` y, a su vez, a :class:`tuple`." #: ../Doc/library/typing.rst:762 -#, fuzzy msgid "" ":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.tuple ` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`builtins.tuple ` ahora soporta el uso de subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:768 msgid "" @@ -1003,13 +1059,12 @@ msgstr "" "Tipo de unión; ``Union[X, Y]`` es equivalente a ``X | Y`` y significa X o Y." #: ../Doc/library/typing.rst:770 -#, fuzzy msgid "" "To define a union, use e.g. ``Union[int, str]`` or the shorthand ``int | " "str``. Using that shorthand is recommended. Details:" msgstr "" "Para definir una unión, use p. ej. ``Union[int, str]`` o la abreviatura " -"``int | str``. Detalles:" +"``int | str``. Se recomienda el uso de la abreviatura. Detalles:" #: ../Doc/library/typing.rst:772 msgid "The arguments must be types and there must be at least one." @@ -1034,7 +1089,7 @@ msgstr "" #: ../Doc/library/typing.rst:790 msgid "You cannot subclass or instantiate a ``Union``." -msgstr "No puede crear una subclase o instanciar un ``Union``." +msgstr "No es posible crear una subclase o instanciar un ``Union``." #: ../Doc/library/typing.rst:792 msgid "You cannot write ``Union[X][Y]``." @@ -1101,7 +1156,7 @@ msgid "" "argument list and the return type. The argument list must be a list of " "types or an ellipsis; the return type must be a single type." msgstr "" -"La sintaxis de subscripción (con corchetes *[]*) debe usarse siempre con dos " +"La sintaxis de subíndice (con corchetes *[]*) debe usarse siempre con dos " "valores: la lista de argumentos y el tipo de retorno. La lista de argumentos " "debe ser una lista de tipos o unos puntos suspensivos; el tipo de retorno " "debe ser un único tipo." @@ -1123,13 +1178,12 @@ msgstr "" "``Callable[..., Any]`` y, a su vez, a :class:`collections.abc.Callable`." #: ../Doc/library/typing.rst:851 -#, fuzzy msgid "" ":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Callable` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Callable` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:860 msgid "" @@ -1140,7 +1194,6 @@ msgstr "" "ejemplos de uso con ``Callable``." #: ../Doc/library/typing.rst:865 -#, fuzzy msgid "" "Used with :data:`Callable` and :class:`ParamSpec` to type annotate a higher " "order callable which adds, removes, or transforms parameters of another " @@ -1154,7 +1207,8 @@ msgstr "" "otro invocable. El uso tiene el formato ``Concatenate[Arg1Type, " "Arg2Type, ..., ParamSpecVariable]``. Actualmente, ``Concatenate`` solo es " "válido cuando se utiliza como primer argumento de un :data:`Callable`. El " -"último parámetro de ``Concatenate`` debe ser un :class:`ParamSpec`." +"último parámetro de ``Concatenate`` debe ser un :class:`ParamSpec` o unos " +"puntos suspensivos (``...``)." #: ../Doc/library/typing.rst:873 msgid "" @@ -1237,13 +1291,12 @@ msgstr "" "``type``, que es la raíz de la jerarquía de metaclases de Python." #: ../Doc/library/typing.rst:959 -#, fuzzy msgid "" ":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.type ` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`builtins.type ` ahora soporta el uso de subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:965 msgid "" @@ -1335,14 +1388,14 @@ msgid "" "Special typing constructs that mark individual keys of a :class:`TypedDict` " "as either required or non-required respectively." msgstr "" +"Constructos de tipado especiales que marcan llaves individuales de un :class:" +"`TypedDict` como requeridas o no requeridas respectivamente." #: ../Doc/library/typing.rst:1043 -#, fuzzy msgid "See :class:`TypedDict` and :pep:`655` for more details." -msgstr "Véase :pep:`484` para más detalle." +msgstr "Véase :class:`TypedDict` y :pep:`655` para más detalle." #: ../Doc/library/typing.rst:1049 -#, fuzzy msgid "" "A type, introduced in :pep:`593` (``Flexible function and variable " "annotations``), to decorate existing types with context-specific metadata " @@ -1370,9 +1423,9 @@ msgstr "" "``no_type_check``, que actualmente existe en el módulo ``typing``, que " "deshabilita completamente la comprobación de anotaciones de tipo en una " "función o clase, el tipo ``Annotated`` permite tanto la comprobación de " -"tipos estático de ``T`` (por ejemplo, *mypy* o *Pyre*, el cuál ignoraría " -"``x`` de forma segura) en conjunto con el acceso a ``x`` en tiempo de " -"ejecución dentro de una aplicación específica." +"tipos estático de ``T`` (la cuál ignoraría ``x`` de forma segura) en " +"conjunto con el acceso a ``x`` en tiempo de ejecución dentro de una " +"aplicación específica." #: ../Doc/library/typing.rst:1063 msgid "" @@ -1553,7 +1606,6 @@ msgstr "" "de ``TypeA`` a ``TypeB``." #: ../Doc/library/typing.rst:1188 -#, fuzzy msgid "" "``TypeB`` need not be a narrower form of ``TypeA`` -- it can even be a wider " "form. The main reason is to allow for things like narrowing ``list[object]`` " @@ -1565,21 +1617,19 @@ msgstr "" "incluso puede ser una forma más amplia. La razón principal es permitir cosas " "como reducir ``List[object]`` a ``List[str]`` aunque este último no sea un " "subtipo del primero, ya que ``List`` es invariante. La responsabilidad de " -"escribir protecciones de tipo seguro se deja al usuario." +"escribir protecciones de tipo seguras se deja al usuario." #: ../Doc/library/typing.rst:1194 -#, fuzzy msgid "" "``TypeGuard`` also works with type variables. See :pep:`647` for more " "details." msgstr "" -"``TypeGuard`` también funciona con variables de tipo. Para obtener más " -"información, consulte :pep:`647` (protectores de tipo definidos por el " -"usuario)." +"``TypeGuard`` también funciona con variables de tipo. Véase :pep:`647` para " +"más detalles." #: ../Doc/library/typing.rst:1200 msgid "Building generic types" -msgstr "Tipos de construcción de genéricos" +msgstr "Construir tipos genéricos" #: ../Doc/library/typing.rst:1202 msgid "" @@ -1634,6 +1684,9 @@ msgid "" "Note that type variables can be *bound*, *constrained*, or neither, but " "cannot be both bound *and* constrained." msgstr "" +"Nótese que las variables de tipo pueden ser *bound* (delimitadas), " +"*constrained* (restringidas), o ninguna, pero no pueden ser al mismo tiempo " +"delimitadas *y* restringidas." #: ../Doc/library/typing.rst:1261 msgid "" @@ -1641,18 +1694,27 @@ msgid "" "in several important ways. Using a *bound* type variable means that the " "``TypeVar`` will be solved using the most specific type possible::" msgstr "" +"Las variables de tipo delimitadas y las variables de tipo restringidas " +"tienen semánticas distintas en varios aspectos importantes. Usar una " +"variable de tipo *bound* (delimitada) significa que la ``TypeVar`` será " +"resuelta utilizando el tipo más específico posible::" #: ../Doc/library/typing.rst:1276 msgid "" "Type variables can be bound to concrete types, abstract types (ABCs or " "protocols), and even unions of types::" msgstr "" +"Las variables de tipo pueden estar delimitadas por tipos concretos, tipos " +"abstractos (ABCs o *protocols*) e incluso uniones de tipos::" #: ../Doc/library/typing.rst:1282 msgid "" "Using a *constrained* type variable, however, means that the ``TypeVar`` can " "only ever be solved as being exactly one of the constraints given::" msgstr "" +"Sin embargo, usar una variable de tipo *constrained* significa que la " +"``TypeVar`` sólo podrá ser determinada como exactamente una de las " +"restricciones dadas::" #: ../Doc/library/typing.rst:1293 msgid "" @@ -1664,7 +1726,6 @@ msgstr "" "deben usar con variables de tipo." #: ../Doc/library/typing.rst:1296 -#, fuzzy msgid "" "Type variables may be marked covariant or contravariant by passing " "``covariant=True`` or ``contravariant=True``. See :pep:`484` for more " @@ -1673,19 +1734,15 @@ msgstr "" "Las variables de tipo pueden ser marcadas como covariantes o contravariantes " "pasando ``covariant=True`` o ``contravariant=True``, respectivamente. Véase :" "pep:`484` para más detalles. Por defecto, las variables de tipo son " -"invariantes. Opcionalmente, una variable de tipo puede especificar un límite " -"superior usando ``bound=``. Esto significa que el tipo (explícitamente " -"o implícitamente) tiene que ser una subclase del tipo limite, véase :pep:" -"`484`." +"invariantes." #: ../Doc/library/typing.rst:1302 -#, fuzzy msgid "" "Type variable tuple. A specialized form of :class:`type variable ` " "that enables *variadic* generics." msgstr "" -"Variable de especificación de parámetros. Una versión especializada de :" -"class:`type variables `." +"Tupla de variables de tipo. Una versión especializada de :class:`type " +"variables ` que permite genéricos *variádicos*." #: ../Doc/library/typing.rst:1305 msgid "" @@ -1694,6 +1751,10 @@ msgid "" "number of types by acting like an *arbitrary* number of type variables " "wrapped in a tuple. For example::" msgstr "" +"Una variable de tipo normal permite parametrizar con un solo tipo. Una tupla " +"de variables de tipo, en contraste, permite la parametrización con un número " +"*arbitrario* de tipos, al actuar como un número *arbitrario* de variables de " +"tipo envueltas en una tupla. Por ejemplo::" #: ../Doc/library/typing.rst:1333 msgid "" @@ -1704,35 +1765,54 @@ msgid "" "older versions of Python, you might see this written using :data:`Unpack " "` instead, as ``Unpack[Ts]``.)" msgstr "" +"Nótese el uso del operador de desempaquetado ``*`` en ``tuple[T, *Ts]``. " +"Conceptualmente, puede pensarse en ``Ts`` como una tupla de variables de " +"tipo ``(T1, T2, ...)``. ``tuple[T, *Ts]`` se convertiría en ``tuple[T, *(T1, " +"T2, ...)]``, lo que es equivalente a ``tuple[T, T1, T2, ...]``. (Nótese que " +"en versiones más antiguas de Python, ésto puede verse escrito usando en " +"cambio :data:`Unpack `, en la forma ``Unpack[Ts]``.)" +# Esta coma es válida en español? en mi mente hace sentido porque me permite separar los dos sustantivos, en el mar de "de" que hay #: ../Doc/library/typing.rst:1341 msgid "" "Type variable tuples must *always* be unpacked. This helps distinguish type " "variable types from normal type variables::" msgstr "" +"Las tuplas de variables de tipo *siempre* deben ser desempaquetadas. Esto " +"ayuda a distinguir tuplas de variables de tipos, de variables de tipo " +"normales::" #: ../Doc/library/typing.rst:1348 msgid "" "Type variable tuples can be used in the same contexts as normal type " "variables. For example, in class definitions, arguments, and return types::" msgstr "" +"Las tuplas de variables de tipo pueden ser utilizadas en los mismos " +"contextos que las variables de tipo normales. Por ejemplo en definiciones de " +"clases, argumentos y tipos de retorno::" #: ../Doc/library/typing.rst:1357 msgid "" "Type variable tuples can be happily combined with normal type variables::" msgstr "" +"Las tuplas de variables de tipo pueden ser combinadas sin problema con " +"variables de tipo normales::" #: ../Doc/library/typing.rst:1370 msgid "" "However, note that at most one type variable tuple may appear in a single " "list of type arguments or type parameters::" msgstr "" +"Sin embargo, nótese que en una determinada lista de argumentos de tipo o de " +"parámetros de tipo puede haber como máximo una tupla de variables de tipo::" #: ../Doc/library/typing.rst:1377 msgid "" "Finally, an unpacked type variable tuple can be used as the type annotation " "of ``*args``::" msgstr "" +"Finalmente, una tupla de variables de tipo desempaquetada puede ser " +"utilizada como la anotación de tipo de ``*args``::" #: ../Doc/library/typing.rst:1387 msgid "" @@ -1742,13 +1822,18 @@ msgid "" "Here, this allows us to ensure the types of the ``*args`` passed to " "``call_soon`` match the types of the (positional) arguments of ``callback``." msgstr "" +"En contraste con las anotaciones no-desempaquetadas de ``*args``, por ej. " +"``*args: int``, que especificaría que *todos* los argumentos son ``int`` - " +"``*args: *Ts`` permite referenciar los tipos de los argumentos " +"*individuales* en ``*args``. Aquí, ésto permite asegurarse de que los tipos " +"de los ``*args`` que son pasados a ``call_soon`` calcen con los tipos de los " +"argumentos (posicionales) de ``callback``." #: ../Doc/library/typing.rst:1394 -#, fuzzy msgid "See :pep:`646` for more details on type variable tuples." msgstr "" -"Consulte :pep:`613` para obtener más detalles sobre los alias de tipos " -"explícitos." +"Véase :pep:`646` para obtener más detalles sobre las tuplas de variables de " +"tipo." #: ../Doc/library/typing.rst:1400 msgid "" @@ -1757,6 +1842,11 @@ msgid "" "tuple ` is equivalent to using ``Unpack`` to mark the type " "variable tuple as having been unpacked::" msgstr "" +"Un operador de tipado que conceptualmente marca en un objeto el hecho de " +"haber sido desempaquetado. Por ejemplo, el uso del operador de " +"desempaquetado ``*`` en una :class:`type variable tuple ` es " +"equivalente al uso de ``Unpack`` para marcar en una tupla de variables de " +"tipo el haber sido desempaquetada::" #: ../Doc/library/typing.rst:1410 msgid "" @@ -1764,6 +1854,10 @@ msgid "" "types. You might see ``Unpack`` being used explicitly in older versions of " "Python, where ``*`` couldn't be used in certain places::" msgstr "" +"De hecho, es posible utilizar ``Unpack`` indistintamente de ``*`` en el " +"contexto de tipos. ``Unpack`` puede ser visto siendo usado explícitamente en " +"versiones más antiguas de Python, donde ``*`` no podía ser usado en ciertos " +"lugares::" #: ../Doc/library/typing.rst:1426 msgid "" @@ -1902,13 +1996,12 @@ msgstr "" "``ParamSpec`` original:" #: ../Doc/library/typing.rst:1524 -#, fuzzy msgid "" "``AnyStr`` is a :class:`constrained type variable ` defined as " "``AnyStr = TypeVar('AnyStr', str, bytes)``." msgstr "" -"``AnyStr`` es una variable de tipo definida como ``AnyStr = " -"TypeVar('AnyStr', str, bytes)``." +"``AnyStr`` es una :class:`constrained type variable ` definida como " +"``AnyStr = TypeVar('AnyStr', str, bytes)``." #: ../Doc/library/typing.rst:1527 msgid "" @@ -1934,7 +2027,6 @@ msgstr "" "que detectan subtipado estructural (*duck-typing* estático), por ejemplo::" #: ../Doc/library/typing.rst:1557 -#, fuzzy msgid "" "See :pep:`544` for more details. Protocol classes decorated with :func:" "`runtime_checkable` (described later) act as simple-minded runtime protocols " @@ -1942,9 +2034,9 @@ msgid "" "signatures." msgstr "" "Véase :pep:`544` para más detalles. Las clases protocolo decoradas con :func:" -"`runtime_checkable` (que se explica más adelante) se comportan como " -"protocolos simplistas en tiempo de ejecución que solo comprueban la " -"presencia de atributos dados, ignorando su firma de tipo." +"`runtime_checkable` (descrito más adelante) se comportan como protocolos " +"simplistas en tiempo de ejecución que solo comprueban la presencia de " +"atributos dados, ignorando su firma de tipo." #: ../Doc/library/typing.rst:1562 msgid "Protocol classes can be generic, for example::" @@ -2004,7 +2096,7 @@ msgstr "Versión para anotación de tipos de :func:`collections.namedtuple`." #: ../Doc/library/typing.rst:1612 msgid "This is equivalent to::" -msgstr "Esto es equivalente a:" +msgstr "Esto es equivalente a::" #: ../Doc/library/typing.rst:1616 msgid "" @@ -2021,7 +2113,6 @@ msgstr "" "por defecto." #: ../Doc/library/typing.rst:1627 -#, fuzzy msgid "" "The resulting class has an extra attribute ``__annotations__`` giving a dict " "that maps the field names to the field types. (The field names are in the " @@ -2030,10 +2121,10 @@ msgid "" "API.)" msgstr "" "La clase resultante tiene un atributo extra ``__annotations__`` que " -"proporciona un diccionario que mapea el nombre de los campos con su tipo. " -"(Lo nombres de los campo están en el atributo ``_fields`` y sus valores por " -"defecto en el atributo ``_field_defaults``, ambos parte de la API de " -"namedtuple.)" +"proporciona un diccionario que mapea el nombre de los campos con sus " +"respectivos tipos. (Los nombres de los campos están en el atributo " +"``_fields`` y sus valores por defecto en el atributo ``_field_defaults``, " +"ambos parte de la API :func:`~collections.namedtuple`.)" #: ../Doc/library/typing.rst:1633 msgid "``NamedTuple`` subclasses can also have docstrings and methods::" @@ -2041,10 +2132,8 @@ msgstr "" "Las subclases de ``NamedTuple`` también pueden tener *docstrings* y métodos::" #: ../Doc/library/typing.rst:1643 -#, fuzzy msgid "``NamedTuple`` subclasses can be generic::" -msgstr "" -"Las subclases de ``NamedTuple`` también pueden tener *docstrings* y métodos::" +msgstr "Las subclases de ``NamedTuple`` pueden ser genéricas::" #: ../Doc/library/typing.rst:1649 msgid "Backward-compatible usage::" @@ -2078,7 +2167,7 @@ msgstr "" #: ../Doc/library/typing.rst:1667 msgid "Added support for generic namedtuples." -msgstr "" +msgstr "Se agrega soporte para *namedtuples* genéricas." #: ../Doc/library/typing.rst:1672 msgid "" @@ -2116,32 +2205,31 @@ msgstr "" "en tiempo de ejecución y solo es aplicada por validadores de tipo. Uso::" #: ../Doc/library/typing.rst:1706 -#, fuzzy msgid "" "To allow using this feature with older versions of Python that do not " "support :pep:`526`, ``TypedDict`` supports two additional equivalent " "syntactic forms:" msgstr "" -"Se puede acceder a la información de tipo para la introspección a través de " -"``Point2D.__annotations__``, ``Point2D.__total__``, ``Point2D." -"__required_keys__`` y ``Point2D.__optional_keys__``. Para permitir el uso de " -"esta función con versiones anteriores de Python que no son compatibles con :" -"pep:`526`, ``TypedDict`` admite dos formas sintácticas equivalentes " -"adicionales:" +"Para permitir el uso de esta característica con versiones más antiguas de " +"Python que no tienen soporte para :pep:`526`, ``TypedDict`` soporta " +"adicionalmente dos formas sintácticas equivalentes:" #: ../Doc/library/typing.rst:1710 msgid "Using a literal :class:`dict` as the second argument::" -msgstr "" +msgstr "El uso de un :class:`dict` literal como segundo argumento::" #: ../Doc/library/typing.rst:1714 msgid "Using keyword arguments::" -msgstr "" +msgstr "El uso de argumentos nombrados::" #: ../Doc/library/typing.rst:1721 msgid "" "The keyword-argument syntax is deprecated in 3.11 and will be removed in " "3.13. It may also be unsupported by static type checkers." msgstr "" +"La sintaxis de argumentos nombrados está obsoleta desde la versión 3.11 y " +"será removida en la versión 3.13. Además, podría no estar soportada por los " +"validadores estáticos de tipo." #: ../Doc/library/typing.rst:1722 msgid "" @@ -2149,27 +2237,34 @@ msgid "" "valid :ref:`identifiers `, for example because they are " "keywords or contain hyphens. Example::" msgstr "" +"También es preferible el uso de la sintaxis funcional cuando cualquiera de " +"las llaves no sean :ref:`identifiers` válidos, por ejemplo " +"porque son palabras clave o contienen guiones. Ejemplo::" #: ../Doc/library/typing.rst:1734 -#, fuzzy msgid "" "By default, all keys must be present in a ``TypedDict``. It is possible to " "mark individual keys as non-required using :data:`NotRequired`::" msgstr "" -"De forma predeterminada, todas las claves deben estar presentes en un " -"``TypedDict``. Es posible anular esto especificando la totalidad. Uso::" +"De forma predeterminada, todas las llaves deben estar presentes en un " +"``TypedDict``. Es posible marcar llaves individuales como *no requeridas* " +"utilizando :data:`NotRequired`::" #: ../Doc/library/typing.rst:1745 msgid "" "This means that a ``Point2D`` ``TypedDict`` can have the ``label`` key " "omitted." msgstr "" +"Esto significa que en un ``TypedDict`` que sea una instancia de ``Point2D``, " +"será posible omitir la llave ``label``." #: ../Doc/library/typing.rst:1748 msgid "" "It is also possible to mark all keys as non-required by default by " "specifying a totality of ``False``::" msgstr "" +"Además, es posible marcar todas las llaves como no-requeridas por defecto, " +"al especificar un valor de ``False`` en el argumento *total*::" #: ../Doc/library/typing.rst:1758 msgid "" @@ -2178,8 +2273,8 @@ msgid "" "``True`` as the value of the ``total`` argument. ``True`` is the default, " "and makes all items defined in the class body required." msgstr "" -"Esto significa que un ``Point2D`` ``TypedDict`` puede tener cualquiera de " -"las claves omitidas. Solo se espera que un verificador de tipo admita un " +"Esto significa que un ``TypedDict`` ``Point2D`` puede tener cualquiera de " +"las llaves omitidas. Solo se espera que un verificador de tipo admita un " "``False`` literal o ``True`` como valor del argumento ``total``. ``True`` es " "el predeterminado y hace que todos los elementos definidos en el cuerpo de " "la clase sean obligatorios." @@ -2189,28 +2284,36 @@ msgid "" "Individual keys of a ``total=False`` ``TypedDict`` can be marked as required " "using :data:`Required`::" msgstr "" +"Las llaves individuales de un ``TypedDict`` ``total=False`` pueden ser " +"marcadas como requeridas utilizando :data:`Required`::" #: ../Doc/library/typing.rst:1778 msgid "" "It is possible for a ``TypedDict`` type to inherit from one or more other " "``TypedDict`` types using the class-based syntax. Usage::" msgstr "" +"Es posible que un tipo ``TypedDict`` herede de uno o más tipos ``TypedDict`` " +"usando la sintaxis de clase. Uso::" #: ../Doc/library/typing.rst:1785 msgid "" "``Point3D`` has three items: ``x``, ``y`` and ``z``. It is equivalent to " "this definition::" msgstr "" +"``Point3D`` tiene tres elementos: ``x``, ``y`` y ``z``. Lo que es " +"equivalente a la siguiente definición::" #: ../Doc/library/typing.rst:1793 msgid "" "A ``TypedDict`` cannot inherit from a non-\\ ``TypedDict`` class, except " "for :class:`Generic`. For example::" msgstr "" +"Un ``TypedDict`` no puede heredar de una clase que no sea una subclase de " +"``TypedDict``, exceptuando :class:`Generic`. Por ejemplo::" #: ../Doc/library/typing.rst:1811 msgid "A ``TypedDict`` can be generic::" -msgstr "" +msgstr "Un ``TypedDict`` puede ser genérico::" #: ../Doc/library/typing.rst:1817 msgid "" @@ -2218,11 +2321,17 @@ msgid "" "`annotations-howto` for more information on annotations best practices), :" "attr:`__total__`, :attr:`__required_keys__`, and :attr:`__optional_keys__`." msgstr "" +"Es posible introspectar un ``TypedDict`` a través de diccionarios de " +"anotaciones (véase\n" +" :ref:`annotations-howto` para más información acerca de mejores prácticas " +"de anotaciones), :attr:`__total__`, :attr:`__required_keys__`, y :attr:" +"`__optional_keys__`." #: ../Doc/library/typing.rst:1823 msgid "" "``Point2D.__total__`` gives the value of the ``total`` argument. Example::" msgstr "" +"``Point2D.__total__`` entrega el valor del argumento ``total``. Ejemplo::" #: ../Doc/library/typing.rst:1843 msgid "" @@ -2230,6 +2339,9 @@ msgid "" "class:`frozenset` objects containing required and non-required keys, " "respectively." msgstr "" +"``Point2D.__required_keys__`` y ``Point2D.__optional_keys__`` retornan " +"objetos de la clase :class:`frozenset`, que contienen las llaves requeridas " +"y no requeridas, respectivamente." #: ../Doc/library/typing.rst:1846 msgid "" @@ -2237,6 +2349,9 @@ msgid "" "``__required_keys__`` and keys marked with :data:`NotRequired` will always " "appear in ``__optional_keys__``." msgstr "" +"Las llaves marcadas con :data:`Required` siempre aparecerán en " +"``__required_keys__`` y las llaves marcadas con :data:`NotRequired` siempre " +"aparecerán en ``__optional_keys__``." #: ../Doc/library/typing.rst:1849 msgid "" @@ -2246,6 +2361,11 @@ msgid "" "value for the ``total`` argument and then inheriting from it in another " "``TypedDict`` with a different value for ``total``::" msgstr "" +"Para retrocompatibilidad con Python 3.10 y versiones más antiguas, es " +"posible utilizar herencia para declarar tanto las llaves requeridas como las " +"no requeridas en el mismo ``TypedDict``. Ésto se logra declarando un " +"``TypedDict`` con un valor para el argumento ``total`` y luego heredando de " +"él en otro ``TypedDict`` con un valor distinto para ``total``::" #: ../Doc/library/typing.rst:1870 msgid "" @@ -2259,10 +2379,12 @@ msgid "" "Added support for marking individual keys as :data:`Required` or :data:" "`NotRequired`. See :pep:`655`." msgstr "" +"Se agrega soporte para marcar llaves individuales como :data:`Required` o :" +"data:`NotRequired`. Véase :pep:`655`." #: ../Doc/library/typing.rst:1878 msgid "Added support for generic ``TypedDict``\\ s." -msgstr "" +msgstr "Se agrega soporte para ``TypedDict`` genéricos." #: ../Doc/library/typing.rst:1882 msgid "Generic concrete collections" @@ -2287,13 +2409,12 @@ msgid "This type can be used as follows::" msgstr "Este tipo se puede usar de la siguiente manera::" #: ../Doc/library/typing.rst:1898 -#, fuzzy msgid "" ":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.dict ` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`builtins.dict ` ahora soporta subíndices (``[]``). Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1904 msgid "" @@ -2310,13 +2431,12 @@ msgid "This type may be used as follows::" msgstr "Este tipo se puede usar del siguiente modo::" #: ../Doc/library/typing.rst:1919 -#, fuzzy msgid "" ":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.list ` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`builtins.list ` ahora soporta subíndices (``[]``). Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1925 msgid "" @@ -2329,26 +2449,24 @@ msgstr "" "colección como :class:`AbstractSet`." #: ../Doc/library/typing.rst:1929 -#, fuzzy msgid "" ":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.set ` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`builtins.set ` ahora soporta subíndices (``[]``). Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1935 msgid "A generic version of :class:`builtins.frozenset `." msgstr "Una versión genérica de :class:`builtins.frozenset `." #: ../Doc/library/typing.rst:1937 -#, fuzzy msgid "" ":class:`builtins.frozenset ` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`builtins.frozenset ` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`builtins.frozenset ` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1942 msgid ":data:`Tuple` is a special form." @@ -2363,65 +2481,60 @@ msgid "A generic version of :class:`collections.defaultdict`." msgstr "Una versión genérica de :class:`collections.defaultdict`." #: ../Doc/library/typing.rst:1953 -#, fuzzy msgid "" ":class:`collections.defaultdict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.defaultdict` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.defaultdict` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1959 msgid "A generic version of :class:`collections.OrderedDict`." msgstr "Una versión genérica de :class:`collections.OrderedDict`." #: ../Doc/library/typing.rst:1963 -#, fuzzy msgid "" ":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.OrderedDict` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.OrderedDict` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1969 msgid "A generic version of :class:`collections.ChainMap`." msgstr "Una versión genérica de :class:`collections.ChainMap`." #: ../Doc/library/typing.rst:1974 -#, fuzzy msgid "" ":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.ChainMap` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`collections.ChainMap` ahora soporta subíndices (``[]``). Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1980 msgid "A generic version of :class:`collections.Counter`." msgstr "Una versión genérica de :class:`collections.Counter`." #: ../Doc/library/typing.rst:1985 -#, fuzzy msgid "" ":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.Counter` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`collections.Counter` ahora soporta subíndices (``[]``)`. Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:1991 msgid "A generic version of :class:`collections.deque`." msgstr "Una versión genérica de :class:`collections.deque`." #: ../Doc/library/typing.rst:1996 -#, fuzzy msgid "" ":class:`collections.deque` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.deque` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`collections.deque` ahora soporta subíndices (``[]``). Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2001 msgid "Other concrete types" @@ -2498,6 +2611,10 @@ msgid "" "planned, but users are encouraged to use :class:`str` instead of ``Text`` " "wherever possible." msgstr "" +"Ya no se soporta Python 2, y la mayoría de los validadores de tipo tampoco " +"dan soporte a la validación de tipos en código escrito en Python 2. " +"Actualmente no está planificado remover el alias, pero se alienta a los " +"usuarios a utilizar :class:`str` en vez de ``Text`` allí donde sea posible." #: ../Doc/library/typing.rst:2055 msgid "Abstract Base Classes" @@ -2512,13 +2629,12 @@ msgid "A generic version of :class:`collections.abc.Set`." msgstr "Una versión genérica de :class:`collections.abc.Set`." #: ../Doc/library/typing.rst:2064 -#, fuzzy msgid "" ":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Set` ahora soporta ``[]``. Véase :pep:`585` y :ref:" -"`types-genericalias`." +":class:`collections.abc.Set` ahora soporta subíndices (``[]``). Véase :pep:" +"`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2070 msgid "A generic version of :class:`collections.abc.ByteString`." @@ -2541,65 +2657,60 @@ msgstr "" "argumentos de cualquiera de los tipos mencionados arriba." #: ../Doc/library/typing.rst:2078 -#, fuzzy msgid "" ":class:`collections.abc.ByteString` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.ByteString` ahora soporta ``[]``. Véase :pep:`585` " -"y :ref:`types-genericalias`." +":class:`collections.abc.ByteString` ahora soporta la sintaxis de subíndice " +"(``[]``). Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2084 msgid "A generic version of :class:`collections.abc.Collection`" msgstr "Una versión genérica de :class:`collections.abc.Collection`" #: ../Doc/library/typing.rst:2088 -#, fuzzy msgid "" ":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Collection` ahora soporta ``[]``. Véase :pep:`585` " -"y :ref:`types-genericalias`." +":class:`collections.abc.Collection` ahora soporta la sintaxis de subíndice " +"(``[]``). Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2094 msgid "A generic version of :class:`collections.abc.Container`." msgstr "Una versión genérica de :class:`collections.abc.Container`." #: ../Doc/library/typing.rst:2096 -#, fuzzy msgid "" ":class:`collections.abc.Container` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Container` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Container` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2102 msgid "A generic version of :class:`collections.abc.ItemsView`." msgstr "Una versión genérica de :class:`collections.abc.ItemsView`." #: ../Doc/library/typing.rst:2104 -#, fuzzy msgid "" ":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.ItemsView` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.ItemsView` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2110 msgid "A generic version of :class:`collections.abc.KeysView`." msgstr "Una versión genérica de :class:`collections.abc.KeysView`." #: ../Doc/library/typing.rst:2112 -#, fuzzy msgid "" ":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.KeysView` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.KeysView` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2118 msgid "" @@ -2610,91 +2721,84 @@ msgstr "" "usar de la siguiente manera::" #: ../Doc/library/typing.rst:2124 -#, fuzzy msgid "" ":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Mapping` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Mapping` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2130 msgid "A generic version of :class:`collections.abc.MappingView`." msgstr "Una versión genérica de :class:`collections.abc.MappingView`." #: ../Doc/library/typing.rst:2132 -#, fuzzy msgid "" ":class:`collections.abc.MappingView` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.MappingView` ahora soporta ``[]``. Véase :pep:`585` " -"y :ref:`types-genericalias`." +":class:`collections.abc.MappingView` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2138 msgid "A generic version of :class:`collections.abc.MutableMapping`." msgstr "Una versión genérica de :class:`collections.abc.MutableMapping`." #: ../Doc/library/typing.rst:2140 -#, fuzzy msgid "" ":class:`collections.abc.MutableMapping` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.MutableMapping` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.abc.MutableMapping` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2147 msgid "A generic version of :class:`collections.abc.MutableSequence`." msgstr "Una versión genérica de :class:`collections.abc.MutableSequence`." #: ../Doc/library/typing.rst:2149 -#, fuzzy msgid "" ":class:`collections.abc.MutableSequence` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.MutableSequence` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.abc.MutableSequence` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2156 msgid "A generic version of :class:`collections.abc.MutableSet`." msgstr "Una versión genérica de :class:`collections.abc.MutableSet`." #: ../Doc/library/typing.rst:2158 -#, fuzzy msgid "" ":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.MutableSet` ahora soporta ``[]``. Véase :pep:`585` " -"y :ref:`types-genericalias`." +":class:`collections.abc.MutableSet` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2164 msgid "A generic version of :class:`collections.abc.Sequence`." msgstr "Una versión genérica de :class:`collections.abc.Sequence`." #: ../Doc/library/typing.rst:2166 -#, fuzzy msgid "" ":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Sequence` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Sequence` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2172 msgid "A generic version of :class:`collections.abc.ValuesView`." msgstr "Una versión genérica de :class:`collections.abc.ValuesView`." #: ../Doc/library/typing.rst:2174 -#, fuzzy msgid "" ":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.ValuesView` ahora soporta ``[]``. Véase :pep:`585` " -"y :ref:`types-genericalias`." +":class:`collections.abc.ValuesView` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2179 msgid "Corresponding to other types in :mod:`collections.abc`" @@ -2705,26 +2809,24 @@ msgid "A generic version of :class:`collections.abc.Iterable`." msgstr "Una versión genérica de :class:`collections.abc.Iterable`." #: ../Doc/library/typing.rst:2185 -#, fuzzy msgid "" ":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Iterable` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Iterable` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2191 msgid "A generic version of :class:`collections.abc.Iterator`." msgstr "Una versión genérica de :class:`collections.abc.Iterator`." #: ../Doc/library/typing.rst:2193 -#, fuzzy msgid "" ":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Iterator` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Iterator` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2199 msgid "" @@ -2761,36 +2863,32 @@ msgstr "" "``Iterable[YieldType]`` o ``Iterator[YieldType]``::" #: ../Doc/library/typing.rst:2228 -#, fuzzy msgid "" ":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Generator` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Generator` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2234 -#, fuzzy msgid "An alias to :class:`collections.abc.Hashable`." -msgstr "Un alias de :class:`collections.abc.Hashable`" +msgstr "Un alias de :class:`collections.abc.Hashable`." #: ../Doc/library/typing.rst:2238 msgid "A generic version of :class:`collections.abc.Reversible`." msgstr "Una versión genérica de :class:`collections.abc.Reversible`." #: ../Doc/library/typing.rst:2240 -#, fuzzy msgid "" ":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Reversible` ahora soporta ``[]``. Véase :pep:`585` " -"y :ref:`types-genericalias`." +":class:`collections.abc.Reversible` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2246 -#, fuzzy msgid "An alias to :class:`collections.abc.Sized`." -msgstr "Un alias de :class:`collections.abc.Sized`" +msgstr "Un alias de :class:`collections.abc.Sized`." #: ../Doc/library/typing.rst:2249 msgid "Asynchronous programming" @@ -2807,13 +2905,12 @@ msgstr "" "ejemplo::" #: ../Doc/library/typing.rst:2265 -#, fuzzy msgid "" ":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Coroutine` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Coroutine` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2271 msgid "" @@ -2850,52 +2947,48 @@ msgstr "" "``AsyncIterable[YieldType]`` o ``AsyncIterator[YieldType]``::" #: ../Doc/library/typing.rst:2302 -#, fuzzy msgid "" ":class:`collections.abc.AsyncGenerator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.AsycGenerator` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.abc.AsycGenerator` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2309 msgid "A generic version of :class:`collections.abc.AsyncIterable`." msgstr "Una versión genérica de :class:`collections.abc.AsyncIterable`." #: ../Doc/library/typing.rst:2313 -#, fuzzy msgid "" ":class:`collections.abc.AsyncIterable` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.AsyncIterable` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.abc.AsyncIterable` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2319 msgid "A generic version of :class:`collections.abc.AsyncIterator`." msgstr "Una versión genérica de :class:`collections.abc.AsyncIterator`." #: ../Doc/library/typing.rst:2323 -#, fuzzy msgid "" ":class:`collections.abc.AsyncIterator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.AsyncIterator` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`collections.abc.AsyncIterator` ahora soporta subíndices (``[]``). " +"Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2329 msgid "A generic version of :class:`collections.abc.Awaitable`." msgstr "Una versión genérica de :class:`collections.abc.Awaitable`." #: ../Doc/library/typing.rst:2333 -#, fuzzy msgid "" ":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`collections.abc.Awaitable` ahora soporta ``[]``. Véase :pep:`585` y :" -"ref:`types-genericalias`." +":class:`collections.abc.Awaitable` ahora soporta subíndices (``[]``). Véase :" +"pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2339 msgid "Context manager types" @@ -2906,13 +2999,12 @@ msgid "A generic version of :class:`contextlib.AbstractContextManager`." msgstr "Una versión genérica de :class:`contextlib.AbstractContextManager`." #: ../Doc/library/typing.rst:2348 -#, fuzzy msgid "" ":class:`contextlib.AbstractContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`contextlib.AbstractContextManager` ahora soporta ``[]``. Véase :pep:" -"`585` y :ref:`types-genericalias`." +":class:`contextlib.AbstractContextManager` ahora soporta subíndices " +"(``[]``). Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2355 msgid "A generic version of :class:`contextlib.AbstractAsyncContextManager`." @@ -2920,13 +3012,12 @@ msgstr "" "Una versión genérica de :class:`contextlib.AbstractAsyncContextManager`." #: ../Doc/library/typing.rst:2360 -#, fuzzy msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -":class:`contextlib.AbstractAsyncContextManager` ahora soporta ``[]``. Véase :" -"pep:`585` y :ref:`types-genericalias`." +":class:`contextlib.AbstractAsyncContextManager` ahora soporta subíndices " +"(``[]``). Véase :pep:`585` y :ref:`types-genericalias`." #: ../Doc/library/typing.rst:2366 msgid "Protocols" @@ -2978,7 +3069,7 @@ msgstr "Funciones y decoradores" #: ../Doc/library/typing.rst:2407 msgid "Cast a value to a type." -msgstr "Convertir un valor a su tipo." +msgstr "Convertir un valor a un tipo." # el "esto" del final queda muy colgado #: ../Doc/library/typing.rst:2409 @@ -2996,28 +3087,39 @@ msgid "" "Ask a static type checker to confirm that *val* has an inferred type of " "*typ*." msgstr "" +"Solicitar a un validador de tipos que confirme que *val* tiene *typ* por " +"tipo inferido." #: ../Doc/library/typing.rst:2418 msgid "" "When the type checker encounters a call to ``assert_type()``, it emits an " "error if the value is not of the specified type::" msgstr "" +"Cuando el validador de tipos se encuentra con una llamada a " +"``assert_type()``, emite un error si el valor no es del tipo especificado::" #: ../Doc/library/typing.rst:2425 msgid "" "At runtime this returns the first argument unchanged with no side effects." msgstr "" +"En tiempo de ejecución, ésto retorna el primer argumento sin modificar y sin " +"efectos secundarios." #: ../Doc/library/typing.rst:2427 msgid "" "This function is useful for ensuring the type checker's understanding of a " "script is in line with the developer's intentions::" msgstr "" +"Esta función es útil para asegurarse de que la comprensión que el validador " +"de tipos tiene sobre un *script* está alineada con las intenciones de le " +"desarrolladores::" #: ../Doc/library/typing.rst:2441 msgid "" "Ask a static type checker to confirm that a line of code is unreachable." msgstr "" +"Solicitar a un validador estático de tipos confirmar que una línea de código " +"no es alcanzable." #: ../Doc/library/typing.rst:2454 msgid "" @@ -3031,10 +3133,20 @@ msgid "" "pass type checking, the inferred type of the argument passed in must be the " "bottom type, :data:`Never`, and nothing else." msgstr "" +"Aquí, las anotaciones permiten al validador de tipos inferir que el último " +"caso nunca será ejecutado, porque ``arg`` es un :class:`int` o un :class:" +"`str`, y ambas opciones son cubiertas por los casos anteriores. Si un " +"validador de tipos encuentra que una llamada a ``assert_never()`` es " +"alcanzable, emitirá un error. Por ejemplo, si la anotación de tipos para " +"``arg`` fuera en cambio ``int | str | float``, el validador de tipos " +"emitiría un error señalando que ``unreachable`` es de tipo :class:`float`. " +"Para que una llamada a ``assert_never`` pase la validación de tipos, el tipo " +"inferido del argumento dado debe ser el tipo vacío, :data:`Never`, y nada " +"más." #: ../Doc/library/typing.rst:2466 msgid "At runtime, this throws an exception when called." -msgstr "" +msgstr "En tiempo de ejecución, ésto lanza una excepción cuando es llamado." #: ../Doc/library/typing.rst:2469 msgid "" @@ -3042,28 +3154,37 @@ msgid "" "en/latest/source/unreachable.html>`__ has more information about " "exhaustiveness checking with static typing." msgstr "" +"`Unreachable Code and Exhaustiveness Checking `__ contiene más información acerca de la " +"verificación de exhaustividad con tipado estático." #: ../Doc/library/typing.rst:2477 msgid "Reveal the inferred static type of an expression." -msgstr "" +msgstr "Revela el tipo estático inferido de una expresión." #: ../Doc/library/typing.rst:2479 msgid "" "When a static type checker encounters a call to this function, it emits a " "diagnostic with the type of the argument. For example::" msgstr "" +"Cuando un validador estático de tipos se encuentra con una invocación a esta " +"función, emite un diagnostico con el tipo del argumento. Por ejemplo::" #: ../Doc/library/typing.rst:2485 msgid "" "This can be useful when you want to debug how your type checker handles a " "particular piece of code." msgstr "" +"Ésto puede ser de utilidad cuando se desea *debuguear* cómo tu validador de " +"tipos maneja una pieza particular de código." #: ../Doc/library/typing.rst:2488 msgid "" "The function returns its argument unchanged, which allows using it within an " "expression::" msgstr "" +"Esta función retorna su argumento sin cambios, lo que permite su uso dentro " +"de una expresión::" #: ../Doc/library/typing.rst:2493 msgid "" @@ -3071,12 +3192,18 @@ msgid "" "not imported from ``typing``. Importing the name from ``typing`` allows your " "code to run without runtime errors and communicates intent more clearly." msgstr "" +"La mayoría de los validadores de tipos soportan ``reveal_type()`` en " +"cualquier lugar, incluso si el nombre no ha sido importado desde ``typing``. " +"Importar el nombre desde ``typing`` permite que el código corra sin errores " +"en tiempo de ejecución y comunica la intención de forma más clara." #: ../Doc/library/typing.rst:2498 msgid "" "At runtime, this function prints the runtime type of its argument to stderr " "and returns it unchanged::" msgstr "" +"En tiempo de ejecución, esta función imprime al *stderr* el tipo en tiempo " +"de ejecución de su argumento y lo retorna in cambios::" #: ../Doc/library/typing.rst:2508 msgid "" @@ -3086,18 +3213,24 @@ msgid "" "object performs runtime \"magic\" that transforms a class, giving it :func:" "`dataclasses.dataclass`-like behaviors." msgstr "" +"Es posible utilizar :data:`~typing.dataclass_transform` para decorar una " +"clase, metaclase, o una función que es ella misma un decorador. La presencia " +"de ``@dataclass_transform()`` indica a un validador estático de tipos que el " +"objeto decorado ejecuta, en tiempo de ejecución, \"magia\" que transforma " +"una clase, dándole comportamientos similares a los que tiene :func:" +"`dataclasses.dataclass`." #: ../Doc/library/typing.rst:2514 msgid "Example usage with a decorator function::" -msgstr "" +msgstr "Ejemplo de uso con una función-decorador::" #: ../Doc/library/typing.rst:2528 msgid "On a base class::" -msgstr "" +msgstr "En una clase base::" #: ../Doc/library/typing.rst:2537 msgid "On a metaclass::" -msgstr "" +msgstr "En una metaclase::" #: ../Doc/library/typing.rst:2548 msgid "" @@ -3106,6 +3239,11 @@ msgid "" "dataclass>`. For example, type checkers will assume these classes have " "``__init__`` methods that accept ``id`` and ``name``." msgstr "" +"Las clases ``CustomerModel`` definidas arribe serán tratadas por los " +"validadores de tipo de forma similar a las clases que sean creadas con :" +"func:`@dataclasses.dataclass `. Por ejemplo, los " +"validadores de tipo asumirán que estas clases tienen métodos ``__init__`` " +"que aceptan ``id`` y ``name``." #: ../Doc/library/typing.rst:2554 msgid "" @@ -3116,6 +3254,13 @@ msgid "" "``kw_only``, and ``slots``. It must be possible for the value of these " "arguments (``True`` or ``False``) to be statically evaluated." msgstr "" +"La clase, metaclase o función decorada puede aceptar los siguientes " +"argumentos booleanos, de los cuales los validadores de tipos asumirán que " +"tienen el mismo efecto que tendrían en el decorador :func:`@dataclasses." +"dataclass`: ``init``, ``eq``, ``order``, " +"``unsafe_hash``, ``frozen``, ``match_args``, ``kw_only``, y ``slots``. Debe " +"ser posible evaluar estáticamente el valor de estos argumentos (``True`` o " +"``False``)." #: ../Doc/library/typing.rst:2562 msgid "" @@ -3123,51 +3268,69 @@ msgid "" "customize the default behaviors of the decorated class, metaclass, or " "function:" msgstr "" +"Es posible utilizar los argumentos del decorador ``dataclass_transform`` " +"para personalizar los comportamientos por defecto de la clase, metaclase o " +"función decorada:" #: ../Doc/library/typing.rst:2566 msgid "" "``eq_default`` indicates whether the ``eq`` parameter is assumed to be " "``True`` or ``False`` if it is omitted by the caller." msgstr "" +"``eq_default`` indica si, cuando el invocador haya omitido el parámetro " +"``eq``, el valor de éste debe tomarse por ``True`` o ``False``." #: ../Doc/library/typing.rst:2568 msgid "" "``order_default`` indicates whether the ``order`` parameter is assumed to be " "True or False if it is omitted by the caller." msgstr "" +"``order_default`` indica si, cuando el invocador haya omitido el parámetro " +"``order``, el valor de éste debe tomarse por ``True`` o ``False``." #: ../Doc/library/typing.rst:2570 msgid "" "``kw_only_default`` indicates whether the ``kw_only`` parameter is assumed " "to be True or False if it is omitted by the caller." msgstr "" +"``kw_only_default`` indica si, cuando el invocador haya omitido el parámetro " +"``kw_only``, el valor de éste debe tomarse por ``True`` o ``False``." #: ../Doc/library/typing.rst:2572 msgid "" "``field_specifiers`` specifies a static list of supported classes or " "functions that describe fields, similar to ``dataclasses.field()``." msgstr "" +"``field_specifiers`` (especificadores de campos) especifica una lista " +"estática de clases o funciones soportadas que describen campos, de manera " +"similar a ``dataclasses.field()``." #: ../Doc/library/typing.rst:2574 msgid "" "Arbitrary other keyword arguments are accepted in order to allow for " "possible future extensions." msgstr "" +"Es posible pasar arbitrariamente otros argumentos nombrados para permitir " +"posibles extensiones futuras." #: ../Doc/library/typing.rst:2577 msgid "" "Type checkers recognize the following optional arguments on field specifiers:" msgstr "" +"Los validadores de tipos reconocen los siguientes argumentos opcionales en " +"especificadores de campos:" #: ../Doc/library/typing.rst:2580 msgid "" "``init`` indicates whether the field should be included in the synthesized " "``__init__`` method. If unspecified, ``init`` defaults to ``True``." msgstr "" +"``init`` indica si el campo debe ser incluido en el método ``__init__`` " +"sintetizado. Si no es especificado, ``init`` será ``True`` por defecto." #: ../Doc/library/typing.rst:2583 msgid "``default`` provides the default value for the field." -msgstr "" +msgstr "``default`` provee el valor por defecto para el campo." #: ../Doc/library/typing.rst:2584 msgid "" @@ -3176,10 +3339,14 @@ msgid "" "specified, the field is assumed to have no default value and must be " "provided a value when the class is instantiated." msgstr "" +"``default_factory`` provee un *callback* en tiempo de ejecución que retorna " +"el valor por defecto para el campo. Si no se especifican ``default`` ni " +"``default_factory``, se asumirá que el campo no tiene un valor por defecto y " +"que un valor debe ser provisto cuando la clase sea instanciada." #: ../Doc/library/typing.rst:2589 msgid "``factory`` is an alias for ``default_factory``." -msgstr "" +msgstr "``factory`` es un alias para ``default_factory``." #: ../Doc/library/typing.rst:2590 msgid "" @@ -3190,12 +3357,21 @@ msgid "" "unspecified, the value of ``kw_only_default`` on ``dataclass_transform`` " "will be used." msgstr "" +"``kw_only`` indica si el campo debe ser marcado como exclusivamente de " +"palabra clave. Si es ``True``, el campo será exclusivamente de palabra " +"clave. Si es ``False`` no lo será. Si no se especifica, se utilizará el " +"valor para el parámetro ``kw_only`` especificado en el objeto decorado con " +"``dataclass_transform``, o si éste tampoco está especificado, se utilizará " +"el valor de ``kw_only_default`` en ``dataclass_transform``." +# La idea de "synthesized __init__ method" puede verse en el pep 681 donde refiere a los métodos init que pueden auto-generar librerías con características similares a dataclass #: ../Doc/library/typing.rst:2596 msgid "" "``alias`` provides an alternative name for the field. This alternative name " "is used in the synthesized ``__init__`` method." msgstr "" +"``alias`` provee un nombre alternativo para el campo. Este nombre " +"alternativo será utilizado en el método ``__init__`` sintetizado." #: ../Doc/library/typing.rst:2599 msgid "" @@ -3203,11 +3379,13 @@ msgid "" "``__dataclass_transform__`` attribute on the decorated object. It has no " "other runtime effect." msgstr "" +"En tiempo de ejecución, este decorador registra sus argumentos en el " +"atributo ``__dataclass_transform__`` del objeto decorado. No tiene otro " +"efecto en tiempo de ejecución." #: ../Doc/library/typing.rst:2603 -#, fuzzy msgid "See :pep:`681` for more details." -msgstr "Véase :pep:`484` para más detalle." +msgstr "Véase :pep:`681` para más detalle." #: ../Doc/library/typing.rst:2609 msgid "" @@ -3236,11 +3414,10 @@ msgstr "" "preciso se puede expresar con una unión o una variable de tipo::" #: ../Doc/library/typing.rst:2633 -#, fuzzy msgid "" "See :pep:`484` for more details and comparison with other typing semantics." msgstr "" -"Véase :pep:`484` para más detalle, y compárese con otras semánticas de " +"Véase :pep:`484` para más detalle y comparación con otras semánticas de " "tipado." #: ../Doc/library/typing.rst:2635 @@ -3248,6 +3425,8 @@ msgid "" "Overloaded functions can now be introspected at runtime using :func:" "`get_overloads`." msgstr "" +"Ahora es posible introspectar en tiempo de ejecución las funciones " +"sobrecargadas utilizando :func:`get_overloads`." #: ../Doc/library/typing.rst:2642 msgid "" @@ -3259,18 +3438,29 @@ msgid "" "overloads. If called on a function with no overloads, ``get_overloads()`` " "returns an empty sequence." msgstr "" +"Retorna una secuencia de definiciones para *func* decoradas con :func:" +"`@overload `. *func* es el objeto función correspondiente a la " +"implementación de la función sobrecargada. Por ejemplo, dada la definición " +"de ``process`` en la documentación de :func:`@overload `, " +"``get_overloads(process)`` retornará una secuencia de tres objetos función " +"para las tres sobrecargas definidas. Si es llamada con una función que no " +"tenga sobrecargas, ``get_overloads()`` retorna una secuencia vacía." #: ../Doc/library/typing.rst:2650 msgid "" "``get_overloads()`` can be used for introspecting an overloaded function at " "runtime." msgstr "" +"``get_overloads()`` puede ser utilizada para introspectar en tiempo de " +"ejecución una función sobrecargada." #: ../Doc/library/typing.rst:2658 msgid "" "Clear all registered overloads in the internal registry. This can be used to " "reclaim the memory used by the registry." msgstr "" +"Limpia todas las sobrecargas registradas del registro interno. Ésto puede " +"ser usado para recuperar memoria usada por el registro." #: ../Doc/library/typing.rst:2666 msgid "" @@ -3290,6 +3480,12 @@ msgid "" "attributes, the decorator returns the object unchanged without raising an " "exception." msgstr "" +"El decorador establecerá a ``True`` el atributo ``__final__`` en el objeto " +"decorado. De este modo, es posible utilizar en tiempo de ejecución una " +"verificación como ``if getattr(obj, \"__final__\", False)`` para determinar " +"si un objeto ``obj`` has sido marcado como final. Si el objeto decorado no " +"soporta el establecimiento de atributos, el decorador retorna el objeto sin " +"cambios y sin levantar una excepción." # se extrae del contexto que el decorador elimina la comprobacion de tipo en # el validador, por lo tanto solo anota/comenta (annotation), no @@ -3297,19 +3493,19 @@ msgstr "" #: ../Doc/library/typing.rst:2700 msgid "Decorator to indicate that annotations are not type hints." msgstr "" -"Un decorador para indicar que la anotaciones no deben ser comprobadas como " +"Un decorador para indicar que las anotaciones no deben ser comprobadas como " "indicadores de tipo." #: ../Doc/library/typing.rst:2702 -#, fuzzy msgid "" "This works as class or function :term:`decorator`. With a class, it applies " "recursively to all methods and classes defined in that class (but not to " "methods defined in its superclasses or subclasses)." msgstr "" "Esto funciona como un :term:`decorator` (decorador) de clase o función. Con " -"una clase, se aplica recursivamente a todos los métodos definidos en dichas " -"clase (pero no a lo métodos definidos en sus superclases y subclases)." +"una clase, se aplica recursivamente a todos los métodos y clases definidos " +"en dicha clase (pero no a lo métodos definidos en sus superclases y " +"subclases)." # ver en contexto #: ../Doc/library/typing.rst:2706 @@ -3367,7 +3563,6 @@ msgstr "" "método, módulo o objeto clase." #: ../Doc/library/typing.rst:2741 -#, fuzzy msgid "" "This is often the same as ``obj.__annotations__``. In addition, forward " "references encoded as string literals are handled by evaluating them in " @@ -3376,12 +3571,10 @@ msgid "" "__mro__`` in reverse order." msgstr "" "Habitualmente, esto es lo mismo que ``obj.__annotations__``. Además, las " -"referencias indicadas como cadenas de texto se gestionan evaluándolas en los " -"espacios de nombres``globals`` y ``locals``. Si es necesario, se " -"añade``Optional[t]`` para anotar una función o método, si se establece " -"``None`` como valor por defecto. Para una clase ``C``, se retorna un " -"diccionario construido por la combinación de ``__annotations__`` y ``C." -"__mro`` en orden inverso." +"referencias hacia adelante codificadas como literales de texto se manejan " +"evaluándolas en los espacios de nombres ``globals`` y ``locals``. Para una " +"clase ``C``, se retorna un diccionario construido por la combinación de " +"``__annotations__`` y ``C.__mro`` en orden inverso." #: ../Doc/library/typing.rst:2747 msgid "" @@ -3414,6 +3607,9 @@ msgid "" "a default value equal to ``None`` was set. Now the annotation is returned " "unchanged." msgstr "" +"Anteriormente, se agregaba ``Optional[t]`` en las anotaciones de funciones o " +"métodos si se establecía un valor por defecto igual a ``None``. Ahora la " +"anotación es retornada sin cambios." # special forms se refiere a tipado exclusivo de typing (no el nativo como str # o int): Union, Optional ... @@ -3502,10 +3698,14 @@ msgid "" "in ``__annotations__``. This makes it unnecessary to use quotes around the " "annotation (see :pep:`563`)." msgstr "" +"Si se utiliza ``from __future__ import annotations``, las anotaciones no son " +"evaluadas al momento de la definición de funciones. En cambio, serán " +"almacenadas como cadenas de texto en ``__annotations__``. Ésto vuelve " +"innecesario el uso de comillas alrededor de la anotación (véase :pep:`563`)." #: ../Doc/library/typing.rst:2856 msgid "Deprecation Timeline of Major Features" -msgstr "" +msgstr "Línea de tiempo de obsolescencia de características principales" #: ../Doc/library/typing.rst:2858 msgid "" @@ -3514,66 +3714,70 @@ msgid "" "your convenience. This is subject to change, and not all deprecations are " "listed." msgstr "" +"Algunas características de ``typing`` están obsoletas y podrán ser removidas " +"en versiones futuras de Python. Lo que sigue es una tabla que resume las " +"principales obsolescencias para su conveniencia. Ésto está sujeto a cambio y " +"no todas las obsolescencias están representadas." #: ../Doc/library/typing.rst:2863 msgid "Feature" -msgstr "" +msgstr "Característica" #: ../Doc/library/typing.rst:2863 msgid "Deprecated in" -msgstr "" +msgstr "En desuso desde" #: ../Doc/library/typing.rst:2863 msgid "Projected removal" -msgstr "" +msgstr "Eliminación proyectada" #: ../Doc/library/typing.rst:2863 msgid "PEP/issue" -msgstr "" +msgstr "PEP/issue" #: ../Doc/library/typing.rst:2865 msgid "``typing.io`` and ``typing.re`` submodules" -msgstr "" +msgstr "sub-módulos ``typing.io`` y ``typing.re``" #: ../Doc/library/typing.rst:2865 msgid "3.8" -msgstr "" +msgstr "3.8" #: ../Doc/library/typing.rst:2865 msgid "3.12" -msgstr "" +msgstr "3.12" #: ../Doc/library/typing.rst:2865 msgid ":issue:`38291`" -msgstr "" +msgstr ":issue:`38291`" #: ../Doc/library/typing.rst:2868 msgid "``typing`` versions of standard collections" -msgstr "" +msgstr "Versiones ``typing`` de colecciones estándares" #: ../Doc/library/typing.rst:2868 msgid "3.9" -msgstr "" +msgstr "3.9" #: ../Doc/library/typing.rst:2868 ../Doc/library/typing.rst:2871 msgid "Undecided" -msgstr "" +msgstr "No decidido" #: ../Doc/library/typing.rst:2868 msgid ":pep:`585`" -msgstr "" +msgstr ":pep:`585`" #: ../Doc/library/typing.rst:2871 msgid "``typing.Text``" -msgstr "" +msgstr "``typing.Text``" #: ../Doc/library/typing.rst:2871 msgid "3.11" -msgstr "" +msgstr "3.11" #: ../Doc/library/typing.rst:2871 msgid ":gh:`92332`" -msgstr "" +msgstr ":gh:`92332`" #~ msgid "" #~ "This module provides runtime support for type hints as specified by :pep:"