diff --git a/.overrides/translation-memory.rst b/.overrides/translation-memory.rst index a268757fb7..bc2b75a9f0 100644 --- a/.overrides/translation-memory.rst +++ b/.overrides/translation-memory.rst @@ -35,55 +35,81 @@ Términos y bigramas awaitable - aguardable ``glossary`` + aguardable ``glossary`` slash and backslash barra y barra invertida ``c-api``,``tutorial``,``library/functions.po`` built-in - incorporada ``glossary.po`` + incorporada ``glossary.po`` built-in exceptions - excepciones predefinidas ``tutorial/errors.po`` + excepciones predefinidas ``tutorial/errors.po`` bytecodes - queda igual ``glossary.po`` + queda igual ``glossary.po`` callable - invocable ``glossary.po``, ``library/functions.po`` + invocable ``glossary.po``, ``library/functions.po`` code object - objeto código ``c-api``, ``library/functions.po`` + objeto código ``c-api``, ``library/functions.po`` deallocated - desalojable ``glossary.po`` + desalojable ``glossary.po`` docstring - docstring. ``library/idle.po`` + docstring. ``library/idle.po`` + + key + clave handler - gestor ``tutorial/errors.po``, ``library/functions.po`` + gestor ``tutorial/errors.po``, ``library/functions.po`` handle exception - Gestionar excepción. ``tutorial/inputoutput.po`` + Gestionar excepción. ``tutorial/inputoutput.po`` locale - Configuración regional. ``library/functions.po`` and others + Configuración regional. ``library/functions.po`` and others + + helper function + función auxiliar ``library/typing.po`` loop - Bucle. ``tutorial/controlflow.po`` + bucle ``tutorial/controlflow.po`` mapping - mapeo ``glossary.po`` + mapeo ``glossary.po`` named tuple. - tupla nombrada ``glossary.po`` + tupla nombrada ``glossary.po`` path - Ruta. ``glossary.po`` + ruta ``glossary.po`` raise - Lanzar, lanza. (referido a excepciones) ``library/functions.po``, ``c-api`` + lanzar, lanza. (referido a excepciones) ``library/functions.po``, ``c-api`` + + realease + version ``HOWTO`` + + runtime + tiempo de ejecución ``tutorial/classes.po`` + + static type checker + Validador estático de tipos + Notas: mantener la mayúscula, usar validación cuando se refiera a la acción y no al agente. + + third-party + de terceros ``library/typing.po`` + + type hint + indicador de tipo ``library/typing.po`` + + type annotation ``library/typing.po`` + anotación de tipo + Nota: úsese como sinónimo de *type hint* release version ``HOWTO`` @@ -101,13 +127,13 @@ Términos y bigramas cadenas de caracteres ``datamodel.po`` underscore - guión bajo ``glossary.po`` + guión bajo ``glossary.po`` auditing event - evento de auditoria ``library/tempfile`` + evento de auditoria ``library/tempfile`` widget - widget ``library/tkinter`` + widget ``library/tkinter`` Reglas de estilo ================ diff --git a/TRANSLATORS b/TRANSLATORS index 4bf488c9cc..49fcb32037 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -2,7 +2,7 @@ Paula Aragón (@pandrearro) Emmanuel Arias (@eamanu) Paula Aragón (@pandrearro Jhonatan Barrera (@iam3mer) -Héctor Canto (@hectorcanto_dev) +Héctor Canto (@hectorcanto) Carlos Crespo (@cacrespo) Raúl Cumplido (@raulcd) Javier Daza (@javierdaza) diff --git a/dict b/dict index 695c08f8b6..85287780a9 100644 --- a/dict +++ b/dict @@ -1,10 +1,7 @@ slice slices idiomática -superclase classmethods -super -separándolos obtenedor asignador suprimidor @@ -20,6 +17,7 @@ Adler Ahlstrom Alex Android +and Associates Asincrónicamente asincrónicas @@ -113,6 +111,7 @@ NumPy Numerical Octales Olsen +Optional POSIX POST PVM @@ -137,6 +136,7 @@ Randal Refactorizados Refactorizar Reilly +ReturnType Rezinsky Rossum Ruby @@ -150,15 +150,16 @@ Solaris Spot Sparc Stein -subinterprete -subinterpretes TCP Tcl Tix Tk Tkinter Tokenizador +Transactions +Tuple Tutorial +TypedDict Unicode Unix Usenet @@ -166,6 +167,7 @@ UTF VM Von WWW +Win Windows X Xt @@ -217,55 +219,61 @@ cargable cargables class coerción -collector coleccionable coleccionables +collector comilla command +compárese +comparablemente compilada computacionales -conversor -códec -códecs -configúrelo computacionalmente +configúrelo conceptualmente consolelib +contravariante +contravariantes +conversor correlacionan corrutina corrutinas +covariante +covariantes criptográficamente curses customización customizarlo cíclicamente +códec +códecs datagramas -debugueando darwin +debugueando default -desasignar -deserialización -desreferenciar desalojable desambiguar desasigna -desasigne desasignación desasignados desasignarse desasignada desasignarlos desasignado -descargable -desasignarán desasignador desasignadores +desasignar +desasignarán +desasigne +descargable descompresor desempaquetamiento deserializar -desinstalador +deserialización designadores +desinstalador desreferenciación +desreferenciar desreferenciarlas dict dinámicamente @@ -305,6 +313,7 @@ from garbage gcc gid +globals granularidad gzip h @@ -337,8 +346,8 @@ inicialicen indexación inf inicializa -inicialización inicializaciones +inicialización inicializada inicializado inicializados @@ -369,14 +378,17 @@ iteradores j json k +kernel Latin -latin l +latin letter lexicográfica lexicográfico libtclsam libtksam +linters +log lowecase m main @@ -412,44 +424,52 @@ multifase multihilo multilínea mungear -naif -nonlocal -object -obsérvese -or -ordenables -path -pathlib multiprocesamiento multiproceso mutex mxBase n +naif naíf naífs +namedtuple ncurses +nonlocal +normalización +object +obsérvese octal octale octales -normalización -octal +on +one +onexit operando operandos +option options -onexit +or +ordenables os +p pads parsea parseada parsear +pasándole +path +pathlib perfilador permitiéndole +permutación permutaciones personalizadamente pip podés +point polimórfica popen +ponies portabilidad portable posicional @@ -470,6 +490,7 @@ prompt prompts proxy pseudo +pseudoaleatorios py pyc python @@ -489,11 +510,11 @@ recursivamente redefinido redefinidos redefinir -redimensionar -redimensionado -redimensionados redimensionable redimensionables +redimensionado +redimensionados +redimensionar redireccionamiento redondeándolo ref @@ -515,6 +536,10 @@ remove renombramiento reordenar repr +reproducibles +reproducible +retrocompatible +remuestreo request reubicar root @@ -530,6 +555,7 @@ secuencialmente seguirle self semánticamente +semiabierto separándolos serializa serialización @@ -545,6 +571,7 @@ situ sobreescriban sobreescribe sobreescriben +sobreescribir socket sockets solucionadores @@ -560,23 +587,33 @@ sub subcadena subcadenas subcarpetas +subclaseada subclasificación subclasificar subcomandos +subscripción subdirectorio subdirectorios +subinterprete +subinterpretes submódulo submódulos subpaquete subpaquetes subproceso +subprocesos +subsectores subsecuencias -subárbol -subárboles -subíndices subtipable +subtipado subtiparse +subárbol +subárboles subíndice +subíndices +super +superclase +superclases sys t tab @@ -592,6 +629,7 @@ tipear token tokenizador tokens +trick truncarlo tty tupla @@ -606,9 +644,9 @@ unicode uninstall urllib utf -vía versionados -Win +vía +von wchar web while @@ -628,40 +666,23 @@ zlib ésimo ı ſ -option -permutación Gaussianas -log -von -semiabierto Twister -subprocesos determinístico -subclaseada Matsumoto Nishimura -Transactions -on Modeling -and +Callable +ClassVar Computer Simulation January -comparablemente reestablece Mersenne cumulativos interopere random -subsectores gaussiana Pareto Weibull -pseudoaleatorios -reproducibles Reproducibilidad -reproducible -retrocompatible -remuestreo -kernel -pasándole diff --git a/library/typing.po b/library/typing.po index 7530356269..1dbf359765 100644 --- a/library/typing.po +++ b/library/typing.po @@ -6,27 +6,28 @@ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to # get the list of volunteers # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-05-05 12:54+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-06-15 10:28+0200\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.8.0\n" +"Last-Translator: Héctor Canto \n" +"Language: es\n" +"X-Generator: Poedit 2.0.6\n" #: ../Doc/library/typing.rst:2 msgid ":mod:`typing` --- Support for type hints" -msgstr "" +msgstr ":mod:`typing` --- Soporte para *type hints*" #: ../Doc/library/typing.rst:9 msgid "**Source code:** :source:`Lib/typing.py`" -msgstr "" +msgstr "**Source code:** :source:`Lib/typing.py`" #: ../Doc/library/typing.rst:13 msgid "" @@ -34,6 +35,9 @@ msgid "" "They can be used by third party tools such as type checkers, IDEs, linters, " "etc." msgstr "" +"En tiempo de ejecución, Python no impone las anotaciones de tipado en " +"funciones y variables. Pueden ser utilizadas por herramientas de terceros " +"como validadores de tipado, IDEs, linters, etc." #: ../Doc/library/typing.rst:19 msgid "" @@ -44,11 +48,20 @@ msgid "" "full specification please see :pep:`484`. For a simplified introduction to " "type hints see :pep:`483`." msgstr "" +"Este módulo proporciona soporte en tiempo de ejecución (*runtime*) para " +"anotaciones de tipado, tal y como se especifica en :pep:`484`, :pep:`526`, :" +"pep:`544`, :pep:`586`, :pep:`589`, y :pep:`591`. Las características " +"fundamentales consisten en los tipos :data:`Any`, :data:`Union`, :data:" +"`Tuple`, :data:`Callable`, :class:`TypeVar`, and :class:`Generic`. Para la " +"especificación completa véase :pep:`484`. Para una introducción " +"simplificada a *type hints* véase :pep:`483`." #: ../Doc/library/typing.rst:27 msgid "" "The function below takes and returns a string and is annotated as follows::" msgstr "" +"La siguiente función toma y retorna una cadena de texto, que se anota de la " +"siguiente manera::" #: ../Doc/library/typing.rst:32 msgid "" @@ -56,42 +69,55 @@ msgid "" "type :class:`str` and the return type :class:`str`. Subtypes are accepted as " "arguments." msgstr "" +"En la función ``greeting``, se espera que el argumento ``name`` sea de " +"tipo :class:`str` y que el tipo retornado sea :class:`str`. Los subtipos " +"también son aceptados como argumento válido." #: ../Doc/library/typing.rst:37 msgid "Type aliases" -msgstr "" +msgstr "Alias de tipo" #: ../Doc/library/typing.rst:39 msgid "" "A type alias is defined by assigning the type to the alias. In this example, " "``Vector`` and ``List[float]`` will be treated as interchangeable synonyms::" msgstr "" +"Un alias de tipo se define asignando el tipo al alias. En este ejemplo, " +"``Vector`` y ``List[float]`` serán tratados como sinónimos intercambiables::" #: ../Doc/library/typing.rst:51 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::" #: ../Doc/library/typing.rst:69 msgid "" "Note that ``None`` as a type hint is a special case and is replaced by " "``type(None)``." msgstr "" +"Nótese que ``None`` como indicador de tipo es un caso especial y es " +"substituido por ``type(None)``." #: ../Doc/library/typing.rst:75 msgid "NewType" -msgstr "" +msgstr "NewType" #: ../Doc/library/typing.rst:77 msgid "Use the :func:`NewType` helper function to create distinct types::" msgstr "" +"Úsese la función auxiliar :func:`NewType` para crear tipos distinguibles " +"entre sí::" #: ../Doc/library/typing.rst:84 msgid "" "The static type checker will treat the new type as if it were a subclass of " "the original type. This is useful in helping catch logical errors::" msgstr "" +"El validador estático de tipos tratará el nuevo tipo como si fuera una " +"subclase del tipo original. Esto es útil para capturar errores lógicos::" #: ../Doc/library/typing.rst:96 msgid "" @@ -100,6 +126,10 @@ msgid "" "pass in a ``UserId`` wherever an ``int`` might be expected, but will prevent " "you from accidentally creating a ``UserId`` in an invalid way::" msgstr "" +"Se pueden realizar todas las operaciones de ``int`` en una variable de tipo " +"``UserId``, pero el resultado siempre será de tipo ``int``. Esto permite " +"pasar un ``UserId`` allí donde se espere un ``int``, pero evitará la " +"creación accidental de un ``UserId`` de manera incorrecta::" #: ../Doc/library/typing.rst:104 msgid "" @@ -109,32 +139,46 @@ msgid "" "it. That means the expression ``Derived(some_value)`` does not create a new " "class or introduce any overhead beyond that of a regular function call." msgstr "" +"Nótese que estas comprobaciones son impuestas solo en la validación de " +"tipado estática. En tiempo de ejecución, la sentencia ``Derived = " +"NewType('Derived', Base)`` hará de ``Derived`` una función que devolverá " +"inmediatamente el parámetro que se le pase. Esto implica que la expresión " +"``Derived(some_value)`` no crea una nueva clase o genera más coste que la " +"llamada a una función normal." #: ../Doc/library/typing.rst:110 msgid "" "More precisely, the expression ``some_value is Derived(some_value)`` is " "always true at runtime." msgstr "" +"Más concretamente, la expresión ``some_value is Derived(some_value)`` será " +"siempre verdadera en tiempo de ejecución." #: ../Doc/library/typing.rst:113 msgid "" "This also means that it is not possible to create a subtype of ``Derived`` " "since it is an identity function at runtime, not an actual type::" msgstr "" +"Esto también implica que no es posible crear un subtipo de ``Derived`` ya " +"que, en tiempo de ejecución, es una función de identidad, no un tipo " +"propiamente dicho::" #: ../Doc/library/typing.rst:123 msgid "" "However, it is possible to create a :func:`NewType` based on a 'derived' " "``NewType``::" msgstr "" +"Sin embargo, es posible crear un :func:`NewType` basado en un ``NewType`` " +"'derivado'::" #: ../Doc/library/typing.rst:131 msgid "and typechecking for ``ProUserId`` will work as expected." msgstr "" +"y la comprobación de tipo para ``ProUserId`` funcionará como se espera." #: ../Doc/library/typing.rst:133 msgid "See :pep:`484` for more details." -msgstr "" +msgstr "Véase :pep:`484` para más detalle." #: ../Doc/library/typing.rst:137 msgid "" @@ -143,6 +187,11 @@ msgid "" "treat ``Alias`` as being *exactly equivalent* to ``Original`` in all cases. " "This is useful when you want to simplify complex type signatures." msgstr "" +"Recuérdese que el uso de alias de tipo implica que los dos tipos son " +"*equivalentes* entre sí. Haciendo ``Alias = Original`` provocará que el " +"Validador estático de tipos trate ``Alias`` como algo *exactamente " +"equivalente* a ``Original`` en todos los casos. Esto es útil para cuando se " +"quiera simplificar indicadores de tipo complejos." #: ../Doc/library/typing.rst:142 msgid "" @@ -153,20 +202,29 @@ msgid "" "``Derived`` is expected. This is useful when you want to prevent logic " "errors with minimal runtime cost." msgstr "" +"En cambio, ``NewType`` declara un tipo que es *subtipo* de otro. Haciendo " +"``Derived = NewType('Derived', Original)`` hará que el Validador estático de " +"tipos trate ``Derived`` como una *subclase* de ``Original``, lo que implica " +"que un valor de tipo ``Original`` no puede ser usado allí donde se espere un " +"valor de tipo ``Derived``. Esto es útil para prevenir errores lógicos con un " +"coste de ejecución mínimo." #: ../Doc/library/typing.rst:152 msgid "Callable" -msgstr "" +msgstr "Callable" +# Aquí frameworks parace indicar un término abierto referiéndose a elementos que interactuarán con las llamadas anotadas. Por ello, se escoge el término genérico "entidades" #: ../Doc/library/typing.rst:154 msgid "" "Frameworks expecting callback functions of specific signatures might be type " "hinted using ``Callable[[Arg1Type, Arg2Type], ReturnType]``." msgstr "" +"Entidades que esperen llamadas a funciones con interfaces específicas puede " +"ser anotadas usando ``Callable[[Arg1Type, Arg2Type], ReturnType]``." #: ../Doc/library/typing.rst:157 msgid "For example::" -msgstr "" +msgstr "Por ejemplo::" #: ../Doc/library/typing.rst:168 msgid "" @@ -174,10 +232,14 @@ msgid "" "the call signature by substituting a literal ellipsis for the list of " "arguments in the type hint: ``Callable[..., ReturnType]``." msgstr "" +"Es posible declarar el tipo de retorno de un *callable* (invocable) sin " +"especificar tipos en los parámetros substituyendo la lista de argumentos por " +"unos puntos suspensivos (...) en el indicador de tipo: ``Callable[..., " +"ReturnType]``." #: ../Doc/library/typing.rst:175 msgid "Generics" -msgstr "" +msgstr "Genéricos" #: ../Doc/library/typing.rst:177 msgid "" @@ -185,20 +247,27 @@ msgid "" "inferred in a generic way, abstract base classes have been extended to " "support subscription to denote expected types for container elements." msgstr "" +"Ya que no es posible inferir estáticamente y de una manera genérica la " +"información de tipo de objetos dentro de contenedores, las clases base " +"abstractas han sido mejoradas para permitir sintaxis de subíndice para " +"denotar los tipos esperados en elementos contenedores." #: ../Doc/library/typing.rst:188 msgid "" "Generics can be parameterized by using a new 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`." #: ../Doc/library/typing.rst:202 msgid "User-defined generic types" -msgstr "" +msgstr "Tipos genéricos definidos por el usuario" #: ../Doc/library/typing.rst:204 msgid "A user-defined class can be defined as a generic class." msgstr "" +"Una clase definida por el usuario puede ser definida como una clase genérica." #: ../Doc/library/typing.rst:230 msgid "" @@ -206,37 +275,51 @@ msgid "" "single type parameter ``T`` . This also makes ``T`` valid as a type within " "the class body." msgstr "" +"``Generic[T]`` como clase base define que la clase ``LoggedVar`` toma un " +"solo parámetro ``T``. Esto también implica que ``T`` es un tipo válido " +"dentro del cuerpo de la clase." +# revisar en su contexto #: ../Doc/library/typing.rst:234 msgid "" "The :class:`Generic` base class defines :meth:`__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::" +# revisar constrained y que es una type variable en su contexto #: ../Doc/library/typing.rst:243 msgid "" "A generic type can have any number of type variables, and type variables may " "be constrained::" msgstr "" +"Un tipo genérico puede tener un número indefinido de variables de tipo, y " +"pueden limitarse a tipos concretos::" +# revisar la relacion argumento-variable-clase #: ../Doc/library/typing.rst:255 msgid "" "Each type variable argument to :class:`Generic` must be distinct. This is " "thus invalid::" msgstr "" +"Cada argumento de variable de tipo en una clase :class:`Generic` debe ser " +"distinto. Así, no será válido::" #: ../Doc/library/typing.rst:266 msgid "You can use multiple inheritance with :class:`Generic`::" -msgstr "" +msgstr "Se puede utilizar herencia múltiple con :class:`Generic`::" #: ../Doc/library/typing.rst:275 msgid "" "When inheriting from generic classes, some type variables could be fixed::" msgstr "" +"Cuando se hereda de clases genéricas, se pueden fijar algunas variables de " +"tipo::" #: ../Doc/library/typing.rst:284 msgid "In this case ``MyDict`` has a single parameter, ``T``." -msgstr "" +msgstr "En este caso ``MyDict`` tiene un solo parámetro, ``T``." #: ../Doc/library/typing.rst:286 msgid "" @@ -244,14 +327,19 @@ msgid "" "for each position. In the following example, ``MyIterable`` is not generic " "but implicitly inherits from ``Iterable[Any]``::" msgstr "" +"Al usar una clase genérica sin especificar parámetros de tipo se asume :data:" +"`Any` para todas las posiciones. En el siguiente ejemplo, ``MyIterable`` no " +"es genérico pero hereda implícitamente de ``Iterable[Any]``::" #: ../Doc/library/typing.rst:294 msgid "User defined generic type aliases are also supported. Examples::" msgstr "" +"Son posibles los alias de tipos genéricos definidos por el usuario. " +"Ejemplos::" #: ../Doc/library/typing.rst:310 msgid ":class:`Generic` no longer has a custom metaclass." -msgstr "" +msgstr ":class:`Generic` ya no posee una metaclase personalizable." #: ../Doc/library/typing.rst:313 msgid "" @@ -260,10 +348,15 @@ msgid "" "parameterizing generics is cached, and most types in the typing module are " "hashable and comparable for equality." msgstr "" +"Un clase genérica definida por el usuario puede tener clases ABC como clase " +"base sin conflicto de metaclase. Las metaclases genéricas no están " +"permitidas. El resultado de parametrizar clases genéricas se cachea, y la " +"mayoría de los tipos en el módulo *typing* pueden tener un hash y ser " +"comparables por igualdad (*equality*)." #: ../Doc/library/typing.rst:320 msgid "The :data:`Any` type" -msgstr "" +msgstr "El tipo :data:`Any`" #: ../Doc/library/typing.rst:322 msgid "" @@ -271,12 +364,17 @@ msgid "" "every type as being compatible with :data:`Any` and :data:`Any` as being " "compatible with every type." msgstr "" +"Un caso especial de tipo es :data:`Any`. Un Validador estático de tipos " +"tratará cualquier tipo como compatible con :data:`Any`, y :data:`Any` como " +"compatible con todos los tipos." #: ../Doc/library/typing.rst:326 msgid "" "This means that it is possible to perform any operation or method call on a " "value of type on :data:`Any` and assign it to any variable::" msgstr "" +"Esto significa que es posible realizar cualquier operación o llamada a un " +"método en un valor de tipo :data:`Any` y asignarlo a cualquier variable::" #: ../Doc/library/typing.rst:344 msgid "" @@ -286,18 +384,27 @@ msgid "" "declared to be of type :class:`str` and receives an :class:`int` value at " "runtime!" msgstr "" +"Nótese que no se realiza comprobación de tipo cuando se asigna un valor de " +"tipo :data:`Any` a un tipo más preciso. Por ejemplo, el Validador estático " +"de tipos no reportó ningún error cuando se asignó ``a`` a ``s``, aún cuando " +"se declaró ``s`` como de tipo :class:`str` y recibió un valor :class:`int` " +"en tiempo de ejecución." #: ../Doc/library/typing.rst:350 msgid "" "Furthermore, all functions without a return type or parameter types will " "implicitly default to using :data:`Any`::" msgstr "" +"Además, todas las funciones sin un tipo de retorno o tipos en los parámetros " +"serán asignadas implícitamente a :data:`Any` por defecto::" #: ../Doc/library/typing.rst:363 msgid "" "This behavior allows :data:`Any` to be used as an *escape hatch* when you " "need to mix dynamically and statically typed code." msgstr "" +"Este comportamiento permite que :data:`Any` sea usado como una *vía de " +"escape* cuando es necesario mezclar código tipado estática y dinámicamente." #: ../Doc/library/typing.rst:366 msgid "" @@ -306,6 +413,10 @@ msgid "" "unlike :data:`Any`, the reverse is not true: :class:`object` is *not* a " "subtype of every other type." msgstr "" +"Compárese el comportamiento de :data:`Any` con el de :class:`object`. De " +"manera similar a :data:`Any`, todo tipo es un subtipo de :class:`object`. " +"Sin embargo, en oposición a :data:`Any`, lo contrario no es cierto: :class:" +"`object` *no* es un subtipo de ningún otro tipo." #: ../Doc/library/typing.rst:371 msgid "" @@ -314,16 +425,23 @@ msgid "" "it as a return value) of a more specialized type is a type error. For " "example::" msgstr "" +"Esto implica que cuando el tipo de un valor es :class:`object`, un validador " +"de tipos rechazará prácticamente todas las operaciones con él, y al " +"asignarlo a una variable (o usarlo como valor de retorno) de un tipo más " +"preciso será un error de tipo. Por ejemplo::" #: ../Doc/library/typing.rst:393 msgid "" "Use :class:`object` to indicate that a value could be any type in a typesafe " "manner. Use :data:`Any` to indicate that a value is dynamically typed." msgstr "" +"Úsese :class:`object` para indicar que un valor puede ser de cualquier tipo " +"de manera segura. Úsese :data:`Any` para indicar que un valor es de tipado " +"dinámico." #: ../Doc/library/typing.rst:398 msgid "Nominal vs structural subtyping" -msgstr "" +msgstr "Subtipado nominal vs estructural" #: ../Doc/library/typing.rst:400 msgid "" @@ -331,7 +449,11 @@ msgid "" "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``." +# Frase ultracompleja, necesitar una revisión fuerte #: ../Doc/library/typing.rst:404 msgid "" "This requirement previously also applied to abstract base classes, such as :" @@ -340,6 +462,12 @@ msgid "" "would normally do in idiomatic dynamically typed Python code. For example, " "this conforms to the :pep:`484`::" msgstr "" +"Este requisito también se aplicaba anteriormente a clases base abstractas " +"(ABC), tales como :class:`Iterable`. El problema con esta estrategia es que " +"una clase debía de ser marcada explícitamente para proporcionar tal " +"funcionalidad, lo que resulta poco *pythónico* (idiomático) y poco ajustado " +"a lo que uno normalmente haría en un código Python tipado dinámicamente. Por " +"ejemplo, esto sí se ajusta al :pep:`484`::" #: ../Doc/library/typing.rst:417 msgid "" @@ -349,6 +477,11 @@ msgid "" "``Iterable[int]`` by static type checkers. This is known as *structural " "subtyping* (or static duck-typing)::" msgstr "" +"El :pep:`544` permite resolver este problema al permitir escribir el código " +"anterior sin una clase base explícita en la definición de la clase, " +"permitiendo que el Validador estático de tipo considere implícitamente que " +"``Bucket`` es un subtipo tanto de ``Sized`` como de ``Iterable[int]``. Esto " +"se conoce como tipado *estructural* (o *duck-typing* estático)::" #: ../Doc/library/typing.rst:433 msgid "" @@ -356,23 +489,27 @@ msgid "" "define new custom protocols to fully enjoy structural subtyping (see " "examples below)." msgstr "" +"Asimismo, creando subclases de la clase especial :class:`Protocol`, el " +"usuario puede definir nuevos protocolos personalizados y beneficiarse del " +"tipado estructural (véanse los ejemplos de abajo)." #: ../Doc/library/typing.rst:439 msgid "Classes, functions, and decorators" -msgstr "" +msgstr "Clases, funciones y decoradores" #: ../Doc/library/typing.rst:441 msgid "The module defines the following classes, functions and decorators:" -msgstr "" +msgstr "El módulo define las siguientes clases, funciones y decoradores:" #: ../Doc/library/typing.rst:445 msgid "Type variable." -msgstr "" +msgstr "Variable de tipo." #: ../Doc/library/typing.rst:447 ../Doc/library/typing.rst:915 msgid "Usage::" -msgstr "" +msgstr "Uso::" +# parece que falta un link en Generic #: ../Doc/library/typing.rst:452 msgid "" "Type variables exist primarily for the benefit of static type checkers. " @@ -380,6 +517,11 @@ msgid "" "function definitions. See class Generic for more information on generic " "types. Generic functions work as follows::" msgstr "" +"Las variables de tipo son principalmente para ayudar a los validadores " +"estáticos de tipos. Sirven tanto como de parámetros para tipos genéricos " +"como para definición de funciones genéricas. Véase la clase *Generic* para " +"más información sobre tipos genéricos. Las funciones genéricas funcionan " +"como sigue::" #: ../Doc/library/typing.rst:465 msgid "" @@ -388,12 +530,19 @@ msgid "" "arguments are instances of some subclass of :class:`str`, the return type is " "still plain :class:`str`." msgstr "" +"La signatura de los ejemplos anteriores es esencialmente la superposición de " +"``(str, str) -> str`` y ``(bytes, bytes) -> bytes``. Nótese también que " +"aunque los argumentos sean instancias de alguna subclase de :class:`str`, el " +"tipo retornado aún será una simple :class:`str`." #: ../Doc/library/typing.rst:470 msgid "" "At runtime, ``isinstance(x, T)`` will raise :exc:`TypeError`. In general, :" "func:`isinstance` and :func:`issubclass` should not be used with types." msgstr "" +"En tiempo de ejecución, ``isinstance(x, T)`` lanzará una excepción :exc:" +"`TypeError`. En general, :func:`isinstance` y :func:`issubclass` no se " +"deben usar con variables de tipo." #: ../Doc/library/typing.rst:473 msgid "" @@ -404,10 +553,17 @@ msgid "" "an actual type substituted (explicitly or implicitly) for the type variable " "must be a subclass of the boundary type, see :pep:`484`." 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`." #: ../Doc/library/typing.rst:483 msgid "Abstract base class for generic types." -msgstr "" +msgstr "Clase base abstracta para tipos genéricos." #: ../Doc/library/typing.rst:485 msgid "" @@ -415,21 +571,27 @@ msgid "" "this class with one or more type variables. For example, a generic mapping " "type might be defined as::" msgstr "" +"Un tipo genérico se declara habitualmente heredando de una instancia de esta " +"clase con una o más variables de tipo. Por ejemplo, un tipo de mapeo " +"genérico se podría definir como::" #: ../Doc/library/typing.rst:494 msgid "This class can then be used as follows::" -msgstr "" +msgstr "Entonces, esta clase se puede usar como sigue::" #: ../Doc/library/typing.rst:507 msgid "" "Base class for protocol classes. Protocol classes are defined like this::" msgstr "" +"Clase base para clases protocolo. Las clases protocolo se definen así::" #: ../Doc/library/typing.rst:513 msgid "" "Such classes are primarily used with static type checkers that recognize " "structural subtyping (static duck-typing), for example::" msgstr "" +"Tales clases son usadas principalmente con validadores estáticos de tipos " +"que detectan subtipado estructural (*duck-typing* estático), por ejemplo::" #: ../Doc/library/typing.rst:525 msgid "" @@ -438,10 +600,14 @@ msgid "" "that check only the presence of given attributes, ignoring their type " "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." #: ../Doc/library/typing.rst:530 msgid "Protocol classes can be generic, for example::" -msgstr "" +msgstr "Las clases protocolo pueden ser genéricas, por ejemplo::" #: ../Doc/library/typing.rst:540 msgid "" @@ -450,10 +616,14 @@ msgid "" "classes themselves -- specifically, it will accept the *class object* of " "``C``. For example::" msgstr "" +"Una variable indicada como ``C`` puede aceptar valores de tipo ``C``. Sin " +"embargo, un variable indicada como ``Type[C]`` puede aceptar valores que son " +"clases en sí mismas -- específicamente, aceptará el *objecto clase* de " +"``C``. Por ejemplo.::" #: ../Doc/library/typing.rst:549 msgid "Note that ``Type[C]`` is covariant::" -msgstr "" +msgstr "Nótese que ``Type[C]`` es covariante::" #: ../Doc/library/typing.rst:561 msgid "" @@ -464,124 +634,146 @@ msgid "" "the indicated base class. How the type checker is required to handle this " "particular case may change in future revisions of :pep:`484`." msgstr "" +"El hecho de que ``Type[C]`` sea covariante implica que todas las subclases " +"de ``C`` deben implementar la misma interfaz del constructor y las mismas " +"interfaces de los métodos de clase que ``C``. El validador de tipos marcará " +"cualquier incumplimiento de esto, pero permitirá llamadas al constructor que " +"coincida con la llamada al constructor de la clase base indicada. El modo en " +"que el validador de tipos debe gestionar este caso particular podría cambiar " +"en futuras revisiones de :pep:`484`." #: ../Doc/library/typing.rst:569 msgid "" "The only legal parameters for :class:`Type` are classes, :data:`Any`, :ref:" "`type variables `, and unions of any of these types. For example::" msgstr "" +"Lo únicos parámetros válidos de :class:`Type` son clases, :data:`Any`, :ref:" +"`type variables `, y uniones de cualquiera de los tipos " +"anteriores. Por ejemplo::" #: ../Doc/library/typing.rst:575 msgid "" "``Type[Any]`` is equivalent to ``Type`` which in turn is equivalent to " "``type``, which is the root of Python's metaclass hierarchy." msgstr "" +"``Type[Any]`` es equivalente a ``Type``, que a su vez es equivalente a " +"``type``, que es la raíz de la jerarquía de metaclases de Python." #: ../Doc/library/typing.rst:582 msgid "A generic version of :class:`collections.abc.Iterable`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Iterable`." #: ../Doc/library/typing.rst:586 msgid "A generic version of :class:`collections.abc.Iterator`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Iterator`." #: ../Doc/library/typing.rst:590 msgid "A generic version of :class:`collections.abc.Reversible`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Reversible`." #: ../Doc/library/typing.rst:594 msgid "An ABC with one abstract method ``__int__``." -msgstr "" +msgstr "Una ABC con un método abstracto ``__int__``." #: ../Doc/library/typing.rst:598 msgid "An ABC with one abstract method ``__float__``." -msgstr "" +msgstr "Una ABC con un método abstracto ``__float__``." #: ../Doc/library/typing.rst:602 msgid "An ABC with one abstract method ``__complex__``." -msgstr "" +msgstr "Una ABC con un método abstracto ``__complex__``." #: ../Doc/library/typing.rst:606 msgid "An ABC with one abstract method ``__bytes__``." -msgstr "" +msgstr "Una ABC con un método abstracto ``__bytes__``." #: ../Doc/library/typing.rst:610 msgid "An ABC with one abstract method ``__index__``." -msgstr "" +msgstr "Una ABC con un método abstracto ``__index__``." #: ../Doc/library/typing.rst:616 msgid "" "An ABC with one abstract method ``__abs__`` that is covariant in its return " "type." msgstr "" +"Una ABC con un método abstracto ``__abs__`` que es covariante en su tipo " +"retornado." #: ../Doc/library/typing.rst:621 msgid "" "An ABC with one abstract method ``__round__`` that is covariant in its " "return type." msgstr "" +"Una ABC con un método abstracto ``__round__`` que es covariantes en su tipo " +"retornado." #: ../Doc/library/typing.rst:626 msgid "A generic version of :class:`collections.abc.Container`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Container`." #: ../Doc/library/typing.rst:630 msgid "An alias to :class:`collections.abc.Hashable`" -msgstr "" +msgstr "Un alias de :class:`collections.abc.Hashable`" #: ../Doc/library/typing.rst:634 msgid "An alias to :class:`collections.abc.Sized`" -msgstr "" +msgstr "Un alias de :class:`collections.abc.Sized`" #: ../Doc/library/typing.rst:638 msgid "A generic version of :class:`collections.abc.Collection`" -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Collection`" #: ../Doc/library/typing.rst:644 msgid "A generic version of :class:`collections.abc.Set`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Set`." #: ../Doc/library/typing.rst:648 msgid "A generic version of :class:`collections.abc.MutableSet`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.MutableSet`." #: ../Doc/library/typing.rst:652 msgid "" "A generic version of :class:`collections.abc.Mapping`. This type can be used " "as follows::" msgstr "" +"Una versión genérica de :class:`collections.abc.Mapping`. Este tipo se puede " +"usar de la siguiente manera::" #: ../Doc/library/typing.rst:660 msgid "A generic version of :class:`collections.abc.MutableMapping`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.MutableMapping`." #: ../Doc/library/typing.rst:664 msgid "A generic version of :class:`collections.abc.Sequence`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Sequence`." #: ../Doc/library/typing.rst:668 msgid "A generic version of :class:`collections.abc.MutableSequence`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.MutableSequence`." #: ../Doc/library/typing.rst:672 msgid "A generic version of :class:`collections.abc.ByteString`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.ByteString`." #: ../Doc/library/typing.rst:674 msgid "" "This type represents the types :class:`bytes`, :class:`bytearray`, and :" "class:`memoryview`." msgstr "" +"Este tipo representa a los tipos :class:`bytes`, :class:`bytearray`, y :" +"class:`memoryview`." #: ../Doc/library/typing.rst:677 msgid "" "As a shorthand for this type, :class:`bytes` can be used to annotate " "arguments of any of the types mentioned above." msgstr "" +"Como abreviación para este tipo, :class:`bytes` se puede usar para anotar " +"argumentos de cualquiera de los tipos mencionados arriba." #: ../Doc/library/typing.rst:682 msgid "A generic version of :class:`collections.deque`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.deque`." #: ../Doc/library/typing.rst:689 msgid "" @@ -589,10 +781,13 @@ msgid "" "annotate arguments it is preferred to use an abstract collection type such " "as :class:`Sequence` or :class:`Iterable`." msgstr "" +"Versión genérica de :class:`list`. Útil para anotar tipos de retorno. Para " +"anotar argumentos es preferible usar un tipo abstracto de colección como :" +"class:`Sequence` o :class:`Iterable`." #: ../Doc/library/typing.rst:694 msgid "This type may be used as follows::" -msgstr "" +msgstr "Este tipo se puede usar del siguiente modo::" #: ../Doc/library/typing.rst:706 msgid "" @@ -600,30 +795,33 @@ msgid "" "return types. To annotate arguments it is preferred to use an abstract " "collection type such as :class:`AbstractSet`." msgstr "" +"Una versión genérica de :class:`builtins.set `. Útil para anotar tipos " +"de retornos. Para anotar argumentos es preferible usar un tipo abstracto de " +"colección como :class:`AbstractSet`." #: ../Doc/library/typing.rst:712 msgid "A generic version of :class:`builtins.frozenset `." -msgstr "" +msgstr "Una versión genérica de :class:`builtins.frozenset `." #: ../Doc/library/typing.rst:716 msgid "A generic version of :class:`collections.abc.MappingView`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.MappingView`." #: ../Doc/library/typing.rst:720 msgid "A generic version of :class:`collections.abc.KeysView`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.KeysView`." #: ../Doc/library/typing.rst:724 msgid "A generic version of :class:`collections.abc.ItemsView`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.ItemsView`." #: ../Doc/library/typing.rst:728 msgid "A generic version of :class:`collections.abc.ValuesView`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.ValuesView`." #: ../Doc/library/typing.rst:732 msgid "A generic version of :class:`collections.abc.Awaitable`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.Awaitable`." #: ../Doc/library/typing.rst:738 msgid "" @@ -631,22 +829,26 @@ msgid "" "order of type variables correspond to those of :class:`Generator`, for " "example::" msgstr "" +"Una versión genérica de :class:`collections.abc.Coroutine`.y orden de las " +"variables de tipo se corresponde con aquellas de :class:`Generator`, por " +"ejemplo::" #: ../Doc/library/typing.rst:753 msgid "A generic version of :class:`collections.abc.AsyncIterable`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.AsyncIterable`." #: ../Doc/library/typing.rst:759 msgid "A generic version of :class:`collections.abc.AsyncIterator`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.abc.AsyncIterator`." #: ../Doc/library/typing.rst:765 msgid "A generic version of :class:`contextlib.AbstractContextManager`." -msgstr "" +msgstr "Una versión genérica de :class:`contextlib.AbstractContextManager`." #: ../Doc/library/typing.rst:772 msgid "A generic version of :class:`contextlib.AbstractAsyncContextManager`." msgstr "" +"Una versión genérica de :class:`contextlib.AbstractAsyncContextManager`." #: ../Doc/library/typing.rst:779 msgid "" @@ -654,32 +856,37 @@ msgid "" "annotate arguments it is preferred to use an abstract collection type such " "as :class:`Mapping`." msgstr "" +"Una versión genérica de :class:`dict`. Útil para anotar tipos de retorno. " +"Para anotar argumentos es preferible usar un tipo abstracto de colección " +"como :class:`Mapping`." #: ../Doc/library/typing.rst:783 msgid "This type can be used as follows::" -msgstr "" +msgstr "Este tipo se puede usar de la siguiente manera::" #: ../Doc/library/typing.rst:790 msgid "A generic version of :class:`collections.defaultdict`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.defaultdict`." #: ../Doc/library/typing.rst:796 msgid "A generic version of :class:`collections.OrderedDict`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.OrderedDict`." #: ../Doc/library/typing.rst:802 msgid "A generic version of :class:`collections.Counter`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.Counter`." #: ../Doc/library/typing.rst:809 msgid "A generic version of :class:`collections.ChainMap`." -msgstr "" +msgstr "Una versión genérica de :class:`collections.ChainMap`." #: ../Doc/library/typing.rst:816 msgid "" "A generator can be annotated by the generic type ``Generator[YieldType, " "SendType, ReturnType]``. For example::" msgstr "" +"Un generador puede ser anotado con el tipo genérico ``Generator[YieldType, " +"SendType, ReturnType]``. Por ejemplo::" #: ../Doc/library/typing.rst:825 msgid "" @@ -687,24 +894,33 @@ msgid "" "of :class:`Generator` behaves contravariantly, not covariantly or " "invariantly." msgstr "" +"Nótese que en contraste con muchos otros genéricos en el módulo *typing*, el " +"``SendType`` de :class:`Generator` se comporta como contravariante, no " +"covariante ni invariante." #: ../Doc/library/typing.rst:829 msgid "" "If your generator will only yield values, set the ``SendType`` and " "``ReturnType`` to ``None``::" msgstr "" +"Si tu generador solo devolverá valores con *yield*, establece ``SendType`` y " +"``ReturnType`` como ``None``::" #: ../Doc/library/typing.rst:837 msgid "" "Alternatively, annotate your generator as having a return type of either " "``Iterable[YieldType]`` or ``Iterator[YieldType]``::" msgstr "" +"Opcionalmente, anota tu generador con un tipo de retorno de " +"``Iterable[YieldType]`` o ``Iterator[YieldType]``::" #: ../Doc/library/typing.rst:847 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" +"Un generador asíncrono se puede anotar con el tipo genérico " +"``AsyncGenerator[YieldType, SendType]``. Por ejemplo::" #: ../Doc/library/typing.rst:856 msgid "" @@ -712,17 +928,25 @@ msgid "" "is no ``ReturnType`` type parameter. As with :class:`Generator`, the " "``SendType`` behaves contravariantly." msgstr "" +"A diferencia de los generadores normales, los generadores asíncronos no " +"pueden devolver un valor, por lo que no hay un parámetro de " +"tipo``ReturnType``. Igual que :class:`Generator`, ``SendType`` se comporta " +"como contravariante." #: ../Doc/library/typing.rst:860 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" +"Si tu generador solo devolverá valores con *yield*, establece el " +"``SendType`` como ``None``::" #: ../Doc/library/typing.rst:868 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" +"Opcionalmente, anota el generador con un tipo de retorno " +"``AsyncIterable[YieldType]`` o ``AsyncIterator[YieldType]``::" #: ../Doc/library/typing.rst:880 msgid "" @@ -730,12 +954,17 @@ msgid "" "compatible path for Python 2 code: in Python 2, ``Text`` is an alias for " "``unicode``." msgstr "" +"``Text`` es un alias para ``str``. Ésta disponible para proporcionar un " +"mecanismo compatible hacia delante para código en Python 2: en Python 2, " +"``Text`` es un alias de ``unicode``." #: ../Doc/library/typing.rst:884 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" +"Úsese ``Text`` para indicar que un valor debe contener una cadena de texto " +"Unicode de manera que sea compatible con Python 2 y Python 3::" #: ../Doc/library/typing.rst:896 msgid "" @@ -743,6 +972,9 @@ msgid "" "``BinaryIO(IO[bytes])`` represent the types of I/O streams such as returned " "by :func:`open`." msgstr "" +"El tipo genérico ``IO[AnyStr]`` y sus subclases ``TextIO(IO[str])`` y " +"``BinaryIO(IO[bytes])`` representan tipos de flujo de entrada/salida (*I/O " +"streams*) como los usados por la función :func:`open`." #: ../Doc/library/typing.rst:904 msgid "" @@ -751,24 +983,32 @@ msgid "" "generic in ``AnyStr`` and can be made specific by writing ``Pattern[str]``, " "``Pattern[bytes]``, ``Match[str]``, or ``Match[bytes]``." msgstr "" +"Estos aliases de tipo se corresponden con los tipos de retorno de :func:`re." +"compile` y :func:`re.match`. Estos tipos (y sus correspondientes funciones) " +"son genéricos en ``AnyStr`` y se puede especificar escribiendo " +"``Pattern[str]``, ``Pattern[bytes]``, ``Match[str]``, o ``Match[bytes]``." #: ../Doc/library/typing.rst:913 msgid "Typed version of :func:`collections.namedtuple`." -msgstr "" +msgstr "Versión para anotación de tipos de :func:`collections.namedtuple`." #: ../Doc/library/typing.rst:921 msgid "This is equivalent to::" -msgstr "" +msgstr "Esto es equivalente a:" #: ../Doc/library/typing.rst:925 msgid "" "To give a field a default value, you can assign to it in the class body::" msgstr "" +"Para proporcionar a un campo un valor por defecto se puede asignar en el " +"cuerpo de la clase::" #: ../Doc/library/typing.rst:934 msgid "" "Fields with a default value must come after any fields without a default." msgstr "" +"Los campos con un valor por defecto deben ir después de los campos sin valor " +"por defecto." #: ../Doc/library/typing.rst:936 msgid "" @@ -777,41 +1017,56 @@ msgid "" "``_fields`` attribute and the default values are in the ``_field_defaults`` " "attribute both of which are part of the namedtuple 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.)" #: ../Doc/library/typing.rst:942 msgid "``NamedTuple`` subclasses can also have docstrings and methods::" msgstr "" +"Las subclases de ``NamedTuple`` también pueden tener *docstrings* y métodos::" #: ../Doc/library/typing.rst:952 msgid "Backward-compatible usage::" -msgstr "" +msgstr "Uso retrocompatible::" #: ../Doc/library/typing.rst:956 msgid "Added support for :pep:`526` variable annotation syntax." msgstr "" +"Soporte añadido para la sintaxis de anotación de variables propuesto en :pep:" +"`526`." #: ../Doc/library/typing.rst:959 msgid "Added support for default values, methods, and docstrings." -msgstr "" +msgstr "Soporte añadido para valores por defecto, métodos y *docstrings*." #: ../Doc/library/typing.rst:965 msgid "" "Deprecated the ``_field_types`` attribute in favor of the more standard " "``__annotations__`` attribute which has the same information." msgstr "" +"Convierte en obsoleto el atributo ``_field_types`` en favor del atributo más " +"estándar ``__annotations__``, que tiene la misma información." #: ../Doc/library/typing.rst:966 msgid "" "The ``_field_types`` and ``__annotations__`` attributes are now regular " "dictionaries instead of instances of ``OrderedDict``." msgstr "" +"Los atributos ``_field_types`` y ``__annotations__`` son simples " +"diccionarios en vez de instancias de ``OrderedDict``." #: ../Doc/library/typing.rst:972 msgid "" "A simple typed namespace. At runtime it is equivalent to a plain :class:" "`dict`." msgstr "" +"Un espacio de nombres con un tipado simple. En tiempo de ejecución es " +"equivalente a un simple :class:`dict`." +# sinonimo para imposicion/imponer #: ../Doc/library/typing.rst:975 msgid "" "``TypedDict`` creates a dictionary type that expects all of its instances to " @@ -819,6 +1074,10 @@ msgid "" "consistent type. This expectation is not checked at runtime but is only " "enforced by type checkers. Usage::" msgstr "" +"``TypedDict`` crea un tipo de diccionario que espera que todas sus " +"instancias tenga un cierto conjunto de claves, donde cada clave está " +"asociada con un valor de un tipo determinado. Esta exigencia no se comprueba " +"en tiempo de ejecución y solo es impuesta por validadores de tipo. Uso::" #: ../Doc/library/typing.rst:991 msgid "" @@ -827,12 +1086,19 @@ msgid "" "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 introspección vía ``Point2D." +"__annotations__`` y ``Point2D.__total__``. Para poder utilizar esta " +"características con versiones antiguas de Python que no soporten :pep:`526`, " +"``TypedDict`` proporciona adicionalmente dos formatos sintácticos " +"equivalentes::" #: ../Doc/library/typing.rst:999 msgid "" "By default, all keys must be present in a TypedDict. It is possible to " "override this by specifying totality. Usage::" msgstr "" +"Por defecto, todas las claves deben estar presentes en un TypedDict. Es " +"posible anularlo especificando el parámetro *total*. De esta manera::" #: ../Doc/library/typing.rst:1007 msgid "" @@ -841,11 +1107,18 @@ msgid "" "the total argument. True is the default, and makes all items defined in the " "class body be required." msgstr "" +"Esto significa que un TypedDict point2D puede omitir cualquiera de sus " +"claves. Un validador de tipos solo se esperará un valor literal *False* o " +"*True* como valor del argumento *total*. *True* es el valor por defecto, y " +"hace que todos los elementos definidos en el cuerpo de la clases sean " +"obligatorios." #: ../Doc/library/typing.rst:1012 msgid "" "See :pep:`589` for more examples and detailed rules of using ``TypedDict``." msgstr "" +"Véase :pep:`589` para más ejemplos y reglas detalladas del uso de " +"``TypedDict``." #: ../Doc/library/typing.rst:1018 msgid "" @@ -854,30 +1127,45 @@ msgid "" "into ``List[ForwardRef(\"SomeClass\")]``. This class should not be " "instantiated by a user, but may be used by introspection tools." msgstr "" +"Una clase usada para la representación de tipado interno de referencias " +"directas en forma de cadenas de texto. Por ejemplo, ``List[\"SomeClass\"]`` " +"es transformado implícitamente en ``List[ForwardRef(\"SomeClass\")]``. Esta " +"clase no debe ser instanciada por el usuario, pero puede ser usada por " +"herramientas de introspección." +# Aquí se ha preferido distinguible antes que distinto ya que UserId no es un tipo disting a int, es un int, pero es difirenciable por el validador. #: ../Doc/library/typing.rst:1025 msgid "" "A helper function to indicate a distinct types to a typechecker, see :ref:" "`distinct`. At runtime it returns a function that returns its argument. " "Usage::" msgstr "" +"Un función auxiliar para indicar un tipo distinguible a los validadores de " +"tipos, véase :ref:`distinct`. En tiempo de ejecución, devuelve una función " +"que devuelve su argumento. Uso::" #: ../Doc/library/typing.rst:1036 msgid "Cast a value to a type." -msgstr "" +msgstr "Convertir un valor a su tipo." +# el "esto" del final queda muy colgado #: ../Doc/library/typing.rst:1038 msgid "" "This returns the value unchanged. To the type checker this signals that the " "return value has the designated type, but at runtime we intentionally don't " "check anything (we want this to be as fast as possible)." msgstr "" +"Esto devuelve el valor sin modificar. Para el validador de tipos esto indica " +"que el valor de retorno tiene el tipo señalado pero, de manera intencionada, " +"no se comprobará en tiempo de ejecución (para maximizar la velocidad)." #: ../Doc/library/typing.rst:1045 msgid "" "Return a dictionary containing type hints for a function, method, module or " "class object." msgstr "" +"Devuelve un diccionario que contiene indicaciones de tipo para una función, " +"método, módulo o objeto clase." #: ../Doc/library/typing.rst:1048 msgid "" @@ -888,10 +1176,20 @@ msgid "" "``None`` is set. For a class ``C``, return a dictionary constructed by " "merging all the ``__annotations__`` along ``C.__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 devuelve un " +"diccionario construido por la combinación de ``__annotations__`` y ``C." +"__mro`` en orden inverso." +# special forms se refiere a tipado exclusivo de typing (no el nativo como str o int): Union, Optional ... #: ../Doc/library/typing.rst:1059 msgid "Provide basic introspection for generic types and special typing forms." msgstr "" +"Provee introspección básica para tipos genéricos y construcciones especiales " +"de tipado." #: ../Doc/library/typing.rst:1061 msgid "" @@ -900,6 +1198,10 @@ msgid "" "`collections` class, it gets normalized to the original class. For " "unsupported objects return ``None`` and ``()`` correspondingly. Examples::" msgstr "" +"Para un objeto de tipado de la forma ``X[Y,Z, ...]``, estas funciones " +"devuelven ``X`` y ``(Y, Z, ...)``. Si ``X`` es un alias genérico para una " +"clase *built-in* o una clase de :mod:`collections`, se normaliza a su clase " +"original. Los objetos no soportados devuelven ``None`` y ``()``. Ejemplos::" #: ../Doc/library/typing.rst:1077 msgid "" @@ -915,26 +1217,47 @@ msgid "" "gives a more precise type than can be expressed using a union or a type " "variable::" msgstr "" +"El decorador ``@overload`` permite describir funciones y métodos que " +"soportan diferentes combinaciones de tipos de argumento. A una serie de " +"definiciones decoradas con ``@overload` debe seguir exactamente una " +"definición no decorada con ``@overload`` (para la misma función o método). " +"Las definiciones decoradas con ``@overload`` son solo para beneficio del " +"validador de tipos, ya que serán sobrescritas por la definición no decorada " +"con ``@overload``. Esta última se usa en tiempo de ejecución y debería ser " +"ignorada por el validador de tipos. En tiempo de ejecución, llamar a una " +"función decorada con ``@overload`` lanzará directamente :exc:" +"`NotImplementedError`. Un ejemplo de sobrecarga que proporciona un tipo más " +"preciso se puede expresar con una unión o una variable de tipo::" #: ../Doc/library/typing.rst:1101 msgid "See :pep:`484` for details and comparison with other typing semantics." msgstr "" +"Véase :pep:`484` para más detalle, y compárese con otras semánticas de " +"tipado." #: ../Doc/library/typing.rst:1105 msgid "" "A decorator to indicate to type checkers that the decorated method cannot be " "overridden, and the decorated class cannot be subclassed. For example::" msgstr "" +"Un decorador que indica a los validadores de tipos que el método decorado no " +"se puede sobreescribir, o que la clase decorada no se puede derivar " +"(*subclassed*). Por ejemplo::" #: ../Doc/library/typing.rst:1123 ../Doc/library/typing.rst:1350 msgid "" "There is no runtime checking of these properties. See :pep:`591` for more " "details." msgstr "" +"No hay comprobación en tiempo de ejecución para estas propiedades. Véase :" +"pep:`591` para más detalles." +# se extrae del contexto que el decorador elimina la comprobacion de tipo en el validador, por lo tanto solo anota/comenta (annotation), no indica/sugiere tipo (type hint) #: ../Doc/library/typing.rst:1130 msgid "Decorator to indicate that annotations are not type hints." msgstr "" +"Un decorador para indicar que la anotaciones no deben ser comprobadas como " +"indicadores de tipo." #: ../Doc/library/typing.rst:1132 msgid "" @@ -942,24 +1265,34 @@ msgid "" "recursively to all methods 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)." +# ver en contexto #: ../Doc/library/typing.rst:1136 msgid "This mutates the function(s) in place." -msgstr "" +msgstr "Esto modifica la función o funciones *in situ*." #: ../Doc/library/typing.rst:1140 msgid "Decorator to give another decorator the :func:`no_type_check` effect." msgstr "" +"Un decorador que asigna a otro decorador el efecto de :func:`no_type_check` " +"(no comprobar tipo)." #: ../Doc/library/typing.rst:1142 msgid "" "This wraps the decorator with something that wraps the decorated function " "in :func:`no_type_check`." msgstr "" +"Esto hace que el decorador decorado añada el efecto de :func:`no_type_check` " +"a la función decorada." #: ../Doc/library/typing.rst:1147 msgid "Decorator to mark a class or function to be unavailable at runtime." msgstr "" +"Un decorador que marca una clase o función como no disponible en tiempo de " +"ejecución." #: ../Doc/library/typing.rst:1149 msgid "" @@ -967,16 +1300,23 @@ msgid "" "mark classes that are defined in type stub files if an implementation " "returns an instance of a private class::" msgstr "" +"Este decorador no está disponible en tiempo de ejecución. Existe " +"principalmente para marcar clases que se definen en archivos *stub* para " +"cuando una implementación devuelve una instancia de una clase privada::" #: ../Doc/library/typing.rst:1160 msgid "" "Note that returning instances of private classes is not recommended. It is " "usually preferable to make such classes public." msgstr "" +"Nótese que no se recomienda devolver instancias de clases privadas. " +"Normalmente es preferible convertirlas en clases públicas." #: ../Doc/library/typing.rst:1165 msgid "Mark a protocol class as a runtime protocol." msgstr "" +"Marca una clase protocolo como aplicable en tiempo de ejecución (lo " +"convierte en un *runtime protocol*)." #: ../Doc/library/typing.rst:1167 msgid "" @@ -985,80 +1325,93 @@ msgid "" "allows a simple-minded structural check, very similar to \"one trick ponies" "\" in :mod:`collections.abc` such as :class:`Iterable`. For example::" msgstr "" +"Tal protocolo se puede usar con :func:`isinstance` y :func:`issubclass`. " +"Esto lanzará una excepción :exc:`TypeError` cuando se aplique a una clase " +"que no es un *protocolo*. Esto permite una comprobación estructural simple, " +"muy semejante a \"one trick ponies\" en :mod:`collections.abc` como es :" +"class:`Iterable`. Por ejemplo::" #: ../Doc/library/typing.rst:1178 msgid "" "**Warning:** this will check only the presence of the required methods, not " "their type signatures!" msgstr "" +"**Atención:** esto solo comprobará la presencia de los métodos requeridos, " +"no su interfaz." #: ../Doc/library/typing.rst:1185 msgid "Special type indicating an unconstrained type." -msgstr "" +msgstr "Tipo especial que indica un tipo sin restricciones." #: ../Doc/library/typing.rst:1187 msgid "Every type is compatible with :data:`Any`." -msgstr "" +msgstr "Todos los tipos son compatibles con :data:`Any`." #: ../Doc/library/typing.rst:1188 msgid ":data:`Any` is compatible with every type." -msgstr "" +msgstr ":data:`Any` es compatible con todos los tipos." +# se añade valor para matizar que la funcion retorna (devuelve el control) pero no de manera normal. En el ejemplo lanza una excepción. #: ../Doc/library/typing.rst:1192 msgid "Special type indicating that a function never returns. For example::" msgstr "" +"Tipo especial que indica que una función nunca retorna un valor. Por " +"ejemplo::" #: ../Doc/library/typing.rst:1205 msgid "Union type; ``Union[X, Y]`` means either X or Y." -msgstr "" +msgstr "Tipo unión; ``Union[X, Y]`` significa que o bien X o bien Y." #: ../Doc/library/typing.rst:1207 msgid "To define a union, use e.g. ``Union[int, str]``. Details:" msgstr "" +"Para definir una unión, úsese p. ej. ``Union[int, str]``. Más detalles:" #: ../Doc/library/typing.rst:1209 msgid "The arguments must be types and there must be at least one." -msgstr "" +msgstr "Los argumentos deben ser tipos y haber al menos uno." #: ../Doc/library/typing.rst:1211 msgid "Unions of unions are flattened, e.g.::" -msgstr "" +msgstr "Las uniones de uniones se simplifican (se aplanan), p. ej.::" #: ../Doc/library/typing.rst:1215 msgid "Unions of a single argument vanish, e.g.::" -msgstr "" +msgstr "Las uniones con un solo argumento se eliminan, p. ej.::" #: ../Doc/library/typing.rst:1219 msgid "Redundant arguments are skipped, e.g.::" -msgstr "" +msgstr "Argumentos repetidos se omiten, p. ej.::" #: ../Doc/library/typing.rst:1223 msgid "When comparing unions, the argument order is ignored, e.g.::" msgstr "" +"Cuando se comparan uniones, el orden de los argumentos se ignoran, p. ej.::" #: ../Doc/library/typing.rst:1227 msgid "You cannot subclass or instantiate a union." -msgstr "" +msgstr "No se puede derivar (*subclass*) o instanciar una unión." #: ../Doc/library/typing.rst:1229 msgid "You cannot write ``Union[X][Y]``." -msgstr "" +msgstr "No es posible escribir ``Union[X][Y]``." #: ../Doc/library/typing.rst:1231 msgid "You can use ``Optional[X]`` as a shorthand for ``Union[X, None]``." msgstr "" +"Se puede usar ``Optional[X]`` como una versión corta de ``Union[X, None]``." #: ../Doc/library/typing.rst:1233 msgid "Don't remove explicit subclasses from unions at runtime." -msgstr "" +msgstr "No elimina subclases explícitas de una unión en tiempo de ejecución." #: ../Doc/library/typing.rst:1238 msgid "Optional type." -msgstr "" +msgstr "Tipo Optional." #: ../Doc/library/typing.rst:1240 msgid "``Optional[X]`` is equivalent to ``Union[X, None]``." -msgstr "" +msgstr "``Optional[X]`` es equivalente a ``Union[X, None]``." #: ../Doc/library/typing.rst:1242 msgid "" @@ -1067,6 +1420,10 @@ msgid "" "the ``Optional`` qualifier on its type annotation just because it is " "optional. For example::" msgstr "" +"Nótese que no es lo mismo que un argumento opcional, que es aquel que tiene " +"un valor por defecto. Un argumento opcional con un valor por defecto no " +"necesita el indicador ``Optional`` en su anotación de tipo simplemente por " +"que sea opcional. Por ejemplo::" #: ../Doc/library/typing.rst:1250 msgid "" @@ -1074,6 +1431,8 @@ msgid "" "``Optional`` is appropriate, whether the argument is optional or not. For " "example::" msgstr "" +"Por otro lado, si se permite un valor ``None``, es apropiado el uso de " +"``Optional``, independientemente de que sea opcional o no. Por ejemplo::" #: ../Doc/library/typing.rst:1259 msgid "" @@ -1081,6 +1440,9 @@ msgid "" "first item of type X and the second of type Y. The type of the empty tuple " "can be written as ``Tuple[()]``." msgstr "" +"El tipo Tuple, ``Tuple[X, Y]`` es el tipo de una tupla de dos ítems con el " +"primer ítem de tipo X y el segundo de tipo Y. El tipo de una tupla vacía se " +"puede escribir así: ``Tuple[()]``." #: ../Doc/library/typing.rst:1263 msgid "" @@ -1088,6 +1450,10 @@ msgid "" "variables T1 and T2. ``Tuple[int, float, str]`` is a tuple of an int, a " "float and a string." msgstr "" +"Ejemplo: ``Tuple[T1, T2]`` es una tupla de dos elementos con sus " +"correspondientes variables de tipo T1 y T2. ``Tuple[int, float, str]`` es un " +"tupla con un número entero, un número de punto flotante y una cadena de " +"texto." #: ../Doc/library/typing.rst:1267 msgid "" @@ -1095,10 +1461,15 @@ msgid "" "ellipsis, e.g. ``Tuple[int, ...]``. A plain :data:`Tuple` is equivalent to " "``Tuple[Any, ...]``, and in turn to :class:`tuple`." msgstr "" +"Para especificar una tupla de longitud variable y tipo homogéneo, se usan " +"puntos suspensivos, p. ej. ``Tuple[int, ...]``. Un simple :data:`Tuple` es " +"equivalente a ``Tuple[Any, ...]`` y, a su vez, a :class:`tuple`." #: ../Doc/library/typing.rst:1273 msgid "Callable type; ``Callable[[int], str]`` is a function of (int) -> str." msgstr "" +"Tipo Callable (invocable); ``Callable[[int], str]`` es una función de (int) -" +"> str." #: ../Doc/library/typing.rst:1275 msgid "" @@ -1106,6 +1477,10 @@ 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 " +"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." #: ../Doc/library/typing.rst:1280 msgid "" @@ -1116,6 +1491,12 @@ msgid "" "equivalent to ``Callable[..., Any]``, and in turn to :class:`collections.abc." "Callable`." msgstr "" +"No existe una sintaxis para indicar argumentos opcionales o con clave " +"(*keyword*); tales funciones rara vez se utilizan como tipos para llamadas. " +"``Callable[..., ReturnType]`` (puntos suspensivos) se puede usar para " +"indicar que un *callable* admite un número indeterminado de argumentos y " +"retorna ``ReturnType``. Un simple :data:`Callable` es equivalente a " +"``Callable[..., Any]`` y, a su vez, a :class:`collections.abc.Callable`." #: ../Doc/library/typing.rst:1290 msgid "" @@ -1123,6 +1504,9 @@ msgid "" "variable or function parameter has a value equivalent to the provided " "literal (or one of several literals). For example::" msgstr "" +"Un tipo que puede ser utilizado para indicar a los validadores de tipos que " +"una variable o un parámetro de una función tiene un valor equivalente al " +"valor literal proveído (o uno de los proveídos). Por ejemplo::" #: ../Doc/library/typing.rst:1304 msgid "" @@ -1130,21 +1514,32 @@ msgid "" "allowed as type argument to ``Literal[...]``, but type checkers may impose " "restrictions. See :pep:`586` for more details about literal types." msgstr "" +"``Literal[...]`` no puede ser derivado. En tiempo de ejecución, se permite " +"un valor arbitrario como argumento de tipo de ``Literal[...]``, pero los " +"validadores de tipos pueden imponer sus restricciones. Véase :pep:`585` para " +"más detalles sobre tipos literales." #: ../Doc/library/typing.rst:1312 msgid "Special type construct to mark class variables." -msgstr "" +msgstr "Construcción especial para tipado para marcar variables de clase." +# Puede haber una entrada mejor para "As introduced" #: ../Doc/library/typing.rst:1314 msgid "" "As introduced in :pep:`526`, a variable annotation wrapped in ClassVar " "indicates that a given attribute is intended to be used as a class variable " "and should not be set on instances of that class. Usage::" msgstr "" +"Tal y como introduce :pep:`526`, una anotación de variable rodeada por " +"ClassVar indica que la intención de un atributo dado es ser usado como " +"variable de clase y que no debería ser modificado en las instancias de esa " +"misma clase. Uso::" +# subscribed se substituye por niveles de subindice #: ../Doc/library/typing.rst:1322 msgid ":data:`ClassVar` accepts only types and cannot be further subscribed." msgstr "" +":data:`ClassVar` solo acepta tipos y no admite más niveles de subíndices." #: ../Doc/library/typing.rst:1324 msgid "" @@ -1153,30 +1548,46 @@ msgid "" "runtime behavior, but it can be used by third-party type checkers. For " "example, a type checker might flag the following code as an error::" msgstr "" +":data:`ClassVar` no es un clase en sí misma, y no debe ser usado con :func:" +"`isinstance` o :func:`issubclass`. :data:`ClassVar` no modifica el " +"comportamiento de Python en tiempo de ejecución pero puede ser utilizado por " +"validadores de terceros. Por ejemplo, un validador de tipos puede marcar el " +"siguiente código como erróneo::" #: ../Doc/library/typing.rst:1338 msgid "" "A special typing construct to indicate to type checkers that a name cannot " "be re-assigned or overridden in a subclass. For example::" msgstr "" +"Un construcción especial para tipado que indica a los validadores de tipo " +"que un nombre no puede ser reasignado o sobrescrito en una subclase. Por " +"ejemplo::" #: ../Doc/library/typing.rst:1357 msgid "" "``AnyStr`` is a type variable defined as ``AnyStr = TypeVar('AnyStr', str, " "bytes)``." msgstr "" +"``AnyStr`` es una variable de tipo definida como ``AnyStr = " +"TypeVar('AnyStr', str, bytes)``." #: ../Doc/library/typing.rst:1360 msgid "" "It is meant to be used for functions that may accept any kind of string " "without allowing different kinds of strings to mix. For example::" msgstr "" +"Su objetivo es ser usada por funciones que pueden aceptar cualquier tipo de " +"cadena de texto sin permitir mezclar diferentes tipos al mismo tiempo. Por " +"ejemplo::" #: ../Doc/library/typing.rst:1372 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " "checkers. It is ``False`` at runtime. Usage::" msgstr "" +"Una constante especial que se asume como cierta (``True``) por validadores " +"estáticos de tipos de terceros. Es falsa (``False``) en tiempo de ejecución. " +"Uso::" #: ../Doc/library/typing.rst:1381 msgid "" @@ -1185,3 +1596,8 @@ msgid "" "interpreter runtime. Type annotations for local variables are not " "evaluated, so the second annotation does not need to be enclosed in quotes." msgstr "" +"Nótese que la primera anotación de tipo debe estar rodeada por comillas, " +"convirtiéndola en una \"referencia directa\", para ocultar al intérprete la " +"referencia ``expensive_mod`` en tiempo de ejecución. Las anotaciones de tipo " +"para variables locales no se evalúan, así que la segunda anotación no " +"necesita comillas."