10000 Traducido library/functools (#2284) · python/python-docs-es@5bbdd5a · GitHub
[go: up one dir, main page]

Skip to content

Commit 5bbdd5a

Browse files
cmaureirmmmarcos
andauthored
Traducido library/functools (#2284)
Closes #1911 --------- Co-authored-by: Marcos Medrano <marcosmedrano0@gmail.com>
1 parent 368025e commit 5bbdd5a

File tree

1 file changed

+62
-54
lines changed

1 file changed

+62
-54
lines changed

library/functools.po

Lines changed: 62 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ msgstr ""
1313
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
1414
"PO-Revision-Date: 2021-12-12 12:55-0500\n"
1515
"Last-Translator: Adolfo Hristo David Roque Gámez <aroquega@gmail.com>\n"
16-
"Language: es\n"
1716
"Language-Team: python-doc-es\n"
18-
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
17+
"Language: es\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=utf-8\n"
2120
"Content-Transfer-Encoding: 8bit\n"
21+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
2222
"Generated-By: Babel 2.10.3\n"
2323

2424
#: ../Doc/library/functools.rst:2
@@ -178,17 +178,17 @@ msgstr ""
178178
"de comparación."
179179

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

193193
#: ../Doc/library/functools.rst:131
194194
msgid ""
@@ -218,16 +218,15 @@ msgstr ""
218218
"hashable."
219219

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

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

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

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

324337
#: ../Doc/library/functools.rst:197
325338
msgid ""
@@ -556,32 +569,31 @@ msgstr ""
556569
"term:`generic function`."
557570

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

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

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

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

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

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

614625
#: ../Doc/library/functools.rst:492
615626
msgid ""
@@ -620,38 +631,35 @@ msgstr ""
620631
"argumento::"
621632

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

637647
#: ../Doc/library/functools.rst:518
638-
#, fuzzy
639648
msgid ""
640649
"If an implementation is registered to an :term:`abstract base class`, "
641650
"virtual subclasses of the base class will be dispatched to that "
642651
"implementation::"
643652
msgstr ""
644-
"Si una implementación se registra en :term:`abstract base class`, las "
645-
"subclases virtuales se enviarán a esa implementación::"
653+
"Si una implementación está registrada en un :term:`abstract base class`, las "
654+
"subclases virtuales de la clase base se enviarán a esa implementación:"
646655

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

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

664672
#: ../Doc/library/functools.rst:555
665-
#, fuzzy
666673
msgid "The :func:`register` attribute now supports using type annotations."
667-
msgstr "El atributo :func:`register` soporta el uso de anotaciones de tipo."
674+
msgstr ""
675+
"El atributo :func:`register` ahora admite el uso de anotaciones de tipo."
668676

669677
#: ../Doc/library/functools.rst:558
670-
#, fuzzy
671678
msgid ""
672679
"The :func:`register` attribute now supports :data:`types.UnionType` and :"
673680
"data:`typing.Union` as type annotations."
674-
msgstr "El atributo :func:`register` soporta el uso de anotaciones de tipo."
681+
msgstr ""
682+
"El atributo :func:`register` ahora admite :data:`types.UnionType` y :data:"
683+
"`typing.Union` como anotaciones de tipo."
675684

676685
#: ../Doc/library/functools.rst:565
677686
msgid ""
@@ -682,41 +691,40 @@ msgstr ""
682691
"`generic function`."
683692

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

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

711719
#: ../Doc/library/functools.rst:608
712-
#, fuzzy
713720
msgid ""
714721
"The same pattern can be used for other similar decorators: :func:"
715722
"`@staticmethod<staticmethod>`, :func:`@abstractmethod<abc.abstractmethod>`, "
716723
"and others."
717724
msgstr ""
718-
"El mismo patrón puede ser usado para otros decoradores similares: "
719-
"``staticmethod``, ``abstractmethod``, y otros."
725+
"El mismo patrón se puede utilizar para otros decoradores similares: :func:"
726+
"`@staticmethod<staticmethod>`, :func:`@abstractmethod<abc.abstractmethod>` y "
727+
"otros."
720728

721729
#: ../Doc/library/functools.rst:617
722730
msgid ""

0 commit comments

Comments
 (0)
0