8000 Traducido library/functools by cmaureir · Pull Request #2284 · python/python-docs-es · GitHub
[go: up one dir, main page]

Skip to content

Traducido library/functools #2284

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasional 8000 ly send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 62 additions & 54 deletions library/functools.po
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ msgstr ""
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
"PO-Revision-Date: 2021-12-12 12:55-0500\n"
"Last-Translator: Adolfo Hristo David Roque Gámez <aroquega@gmail.com>\n"
"Language: es\n"
"Language-Team: python-doc-es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Generated-By: Babel 2.10.3\n"

#: ../Doc/library/functools.rst:2
Expand Down Expand Up @@ -178,17 +178,17 @@ msgstr ""
"de comparación."

#: ../Doc/library/functools.rst:122
#, fuzzy
msgid ""
"A comparison function is any callable that accepts two arguments, compares "
"them, and returns a negative number for less-than, zero for equality, or a "
"positive number for greater-than. A key function is a callable that accepts "
"one argument and returns another value to be used as the sort key."
msgstr ""
"Una función de comparación es cualquier invocable que acepta dos argumentos, "
"los compara y retorna un número negativo para diferencia, cero para igualdad "
"o un número positivo para más. Una función clave es un invocable que acepta "
"un argumento y retorna otro valor para ser usado como clave de ordenación."
"los compara y devuelve un número negativo para menor que, cero para igualdad "
"o un número positivo para mayor que. Una función clave es una función "
"invocable que acepta un argumento y devuelve otro valor para usar como clave "
"de ordenación."

#: ../Doc/library/functools.rst:131
msgid ""
Expand Down Expand Up @@ -218,16 +218,15 @@ msgstr ""
"hashable."

#: ../Doc/library/functools.rst:146
#, fuzzy
msgid ""
"Distinct argument patterns may be considered to be distinct calls with "
"separate cache entries. For example, ``f(a=1, b=2)`` and ``f(b=2, a=1)`` "
"differ in their keyword argument order and may have two separate cache "
"entries."
msgstr ""
"Los patrones de argumento distintos pueden considerarse como llamadas "
"distintas con entradas de caché separadas. Por ejemplo, `f(a=1, b=2)` y "
"`f(b=2, a=1)` difieren en el orden de los argumentos de las palabras clave y "
"Los patrones de argumentos distintos pueden considerarse llamadas distintas "
"con entradas de memoria caché separadas. Por ejemplo, ``f(a=1, b=2)`` y "
"``f(b=2, a=1)`` difieren en el orden de sus argumentos de palabras clave y "
"pueden tener dos entradas de caché separadas."

#: ../Doc/library/functools.rst:151
Expand Down Expand Up @@ -255,6 +254,12 @@ msgid ""
"regard them as equivalent calls and only cache a single result. (Some types "
"such as *str* and *int* may be cached separately even when *typed* is false.)"
msgstr ""
"Si *typed* se establece en verdadero, los argumentos de función de "
"diferentes tipos se almacenarán en caché por separado. Si *typed* es falso, "
"la implementación generalmente las considerará como llamadas equivalentes y "
"solo almacenará en caché un único resultado. (Algunos tipos como *str* y "
"*int* pueden almacenarse en caché por separado incluso cuando *typed* es "
"falso)."

#: ../Doc/library/functools.rst:168
msgid ""
Expand All @@ -264,6 +269,12 @@ msgid ""
"contrast, the tuple arguments ``('answer', Decimal(42))`` and ``('answer', "
"Fraction(42))`` are treated as equivalent."
msgstr ""
"Tenga en cuenta que la especificidad de tipo se aplica solo a los argumentos "
"inmediatos de la función en lugar de a su contenido. Los argumentos "
"escalares, ``Decimal(42)`` y ``Fraction(42)`` se tratan como llamadas "
"distintas con resultados distintos. Por el contrario, los argumentos de "
"tupla ``('answer', Decimal(42))`` y ``('answer', Fraction(42))`` se tratan "
"como equivalentes."

#: ../Doc/library/functools.rst:174
msgid ""
Expand Down Expand Up @@ -320,6 +331,8 @@ msgid ""
"If a method is cached, the ``self`` instance argument is included in the "
"cache. See :ref:`faq-cache-method-calls`"
msgstr ""
"Si un método se almacena en caché, el argumento de la instancia ``self`` se "
"incluye en el caché. Ver :ref:`faq-cache-method-calls`"

#: ../Doc/library/functools.rst:197
msgid ""
Expand Down Expand Up @@ -556,32 +569,31 @@ msgstr ""
"term:`generic function`."

#: ../Doc/library/functools.rst:413
#, fuzzy
msgid ""
"To define a generic function, decorate it with the ``@singledispatch`` "
"decorator. When defining a function using ``@singledispatch``, note that the "
"dispatch happens on the type of the first argument::"
msgstr ""
"Para definir la función genérica, decórela con el decorador "
"``@singledispatch``. Ten en cuenta que el envío ocurre en el tipo del primer "
"argumento, crea tu función en consecuencia::"
"Para definir una función genérica, decórala con el decorador "
"``@singledispatch``. Al definir una función usando ``@singledispatch``, "
"tenga en cuenta que el envío ocurre en el tipo del primer argumento:"

#: ../Doc/library/functools.rst:424
#, fuzzy
msgid ""
"To add overloaded implementations to the function, use the :func:`register` "
"attribute of the generic function, which can be used as a decorator. For "
"functions annotated with types, the decorator will infer the type of the "
"first argument automatically::"
msgstr ""
"Para añadir implementaciones sobrecargadas a la función, use el atributo :"
"func:`register` de la función genérica. Es un decorador. Para las "
"funciones anotadas con tipos, el decorador deducirá automáticamente el tipo "
"del primer argumento::"
"Para agregar implementaciones sobrecargadas a la función, use el atributo :"
"func:`register` de la función genérica, que se puede usar como decorador. "
"Para las funciones anotadas con tipos, el decorador inferirá automáticamente "
"el tipo del primer argumento:"

#: ../Doc/library/functools.rst:442
msgid ":data:`types.UnionType` and :data:`typing.Union` can also be used::"
msgstr ""
"También se pueden utilizar :data:`types.UnionType` y :data:`typing.Union`:"

#: ../Doc/library/functools.rst:459
msgid ""
Expand All @@ -592,24 +604,23 @@ msgstr ""
"apropiado puede ser pasado explícitamente al propio decorador::"

#: ../Doc/library/functools.rst:470
#, fuzzy
msgid ""
"To enable registering :term:`lambdas<lambda>` and pre-existing functions, "
"the :func:`register` attribute can also be used in a functional form::"
msgstr ""
"Para permitir el registro de lambdas y funciones preexistentes, el atributo :"
"func:`register` puede utilizarse de forma funcional::"
"Para habilitar el registro de :term:`lambdas<lambda>` y funciones "
"preexistentes, el atributo :func:`register` también se puede utilizar de "
"forma funcional:"

#: ../Doc/library/functools.rst:478
#, fuzzy
msgid ""
"The :func:`register` attribute returns the undecorated function. This "
"enables decorator stacking, :mod:`pickling<pickle>`, and the creation of "
"unit tests for each variant independently::"
msgstr ""
"El atributo :func:`register` retorna la función no decorada que permite al "
"decorador apilar, decapar, así como crear pruebas de unidad para cada "
"variante de forma independiente::"
"El atributo :func:`register` devuelve la función sin decorar. Esto permite "
"el apilamiento de decoradores, :mod:`pickling<pickle>`, y la creación de "
"pruebas unitarias para cada variante de forma independiente:"

#: ../Doc/library/functools.rst:492
msgid ""
Expand All @@ -620,38 +631,35 @@ msgstr ""
"argumento::"

#: ../Doc/library/functools.rst:512
#, fuzzy
msgid ""
"Where there is no registered implementation for a specific type, its method "
"resolution order is used to find a more generic implementation. The original "
"function decorated with ``@singledispatch`` is registered for the base :"
"class:`object` type, which means it is used if no better implementation is "
"found."
msgstr ""
"Cuando no hay una implementación registrada para un tipo específico, su "
"orden de resolución de método se utiliza para encontrar una implementación "
"más genérica. La función original decorada con ``@singledispatch`` se "
"registra para el tipo de ``object`` base, lo que significa que se usa si no "
"se encuentra una mejor implementación."
"Cuando no hay una implementación registrada para un tipo específico, se usa "
"su orden de resolución de métodos para encontrar una implementación más "
"genérica. La función original decorada con ``@singledispatch`` está "
"registrada para el tipo base :class:`object`, lo que significa que se usa si "
"no se encuentra una implementación mejor."

#: ../Doc/library/functools.rst:518
#, fuzzy
msgid ""
"If an implementation is registered to an :term:`abstract base class`, "
"virtual subclasses of the base class will be dispatched to that "
"implementation::"
msgstr ""
"Si una implementación se registra en :term:`abstract base class`, las "
"subclases virtuales se enviarán a esa implementación::"
"Si una implementación está registrada en un :term:`abstract base class`, las "
"subclases virtuales de la clase base se enviarán a esa implementación:"

#: ../Doc/library/functools.rst:533
#, fuzzy
msgid ""
"To check which implementation the generic function will choose for a given "
"type, use the ``dispatch()`` attribute::"
msgstr ""
"Para comprobar qué implementación elegirá la función genérica para un tipo "
"determinado, utilice el atributo ``dispatch()``::"
"Para verificar qué implementación elegirá la función genérica para un tipo "
"dado, use el atributo ``dispatch()``:"

#: ../Doc/library/functools.rst:541
msgid ""
Expand All @@ -662,16 +670,17 @@ msgstr ""
"``registry`` de sólo lectura::"

#: ../Doc/library/functools.rst:555
#, fuzzy
msgid "The :func:`register` attribute now supports using type annotations."
msgstr "El atributo :func:`register` soporta el uso de anotaciones de tipo."
msgstr ""
"El atributo :func:`register` ahora admite el uso de anotaciones de tipo."

#: ../Doc/library/functools.rst:558
#, fuzzy
msgid ""
"The :func:`register` attribute now supports :data:`types.UnionType` and :"
"data:`typing.Union` as type annotations."
msgstr "El atributo :func:`register` soporta el uso de anotaciones de tipo."
msgstr ""
"El atributo :func:`register` ahora admite :data:`types.UnionType` y :data:"
"`typing.Union` como anotaciones de tipo."

#: ../Doc/library/functools.rst:565
msgid ""
Expand All @@ -682,41 +691,40 @@ msgstr ""
"`generic function`."

#: ../Doc/library/functools.rst:568
#, fuzzy
msgid ""
"To define a generic method, decorate it with the ``@singledispatchmethod`` "
"decorator. When defining a function using ``@singledispatchmethod``, note "
"that the dispatch happens on the type of the first non-*self* or non-*cls* "
"argument::"
msgstr ""
"Para definir un método genérico, decóralo con el decorador "
"``@singledispatchmethod``. Tenga en cuenta que el envío se produce en el "
"tipo del primer argumento que no sea un atributo de instancias (*non-self*) "
"ni un atributo de clases (*non-cls*), cree su función en consecuencia::"
"``@singledispatchmethod``. Al definir una función usando "
"``@singledispatchmethod``, tenga en cuenta que el envío ocurre en el tipo "
"del primer argumento no *self* o no *cls*:"

#: ../Doc/library/functools.rst:586
#, fuzzy
msgid ""
"``@singledispatchmethod`` supports nesting with other decorators such as :"
"func:`@classmethod<classmethod>`. Note that to allow for ``dispatcher."
"register``, ``singledispatchmethod`` must be the *outer most* decorator. "
"Here is the ``Negator`` class with the ``neg`` methods bound to the class, "
"rather than an instance of the class::"
msgstr ""
"El ``@singledispatchmethod`` apoya el anidamiento con otros decoradores como "
"el ``@classmethod``. Ten en cuenta que para permitir el ``dispatcher."
"register``, ``singledispatchmethod`` debe ser el decorador *outer most*. "
"Aquí está la clase ``neg`` con los métodos ``Negator`` limitados a la clase::"
"``@singledispatchmethod`` admite la anidación con otros decoradores como :"
"func:`@classmethod<classmethod>`. Tenga en cuenta que para permitir "
"``dispatcher.register``, ``singledispatchmethod`` debe ser el decorador *más "
"externo*. Aquí está la clase ``Negator`` con los métodos ``neg`` vinculados "
"a la clase, en lugar de una instancia de la clase:"

#: ../Doc/library/functools.rst:608
#, fuzzy
msgid ""
"The same pattern can be used for other similar decorators: :func:"
"`@staticmethod<staticmethod>`, :func:`@abstractmethod<abc.abstractmethod>`, "
"and others."
msgstr ""
"El mismo patrón puede ser usado para otros decoradores similares: "
"``staticmethod``, ``abstractmethod``, y otros."
"El mismo patrón se puede utilizar para otros decoradores similares: :func:"
"`@staticmethod<staticmethod>`, :func:`@abstractmethod<abc.abstractmethod>` y "
"otros."

#: ../Doc/library/functools.rst:617
msgid ""
Expand Down
0