Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Avance a 90%
  • Loading branch information
migrmrz committed Feb 27, 2021
commit 194c138456e60931953f1be730bd93babadd825a
97 changes: 91 additions & 6 deletions reference/datamodel.po
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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: 2021-02-16 17:13-0600\n"
"PO-Revision-Date: 2021-02-26 21:07-0600\n"
"Language-Team: python-doc-es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -4027,6 +4027,16 @@ msgid ""
"should be defined to accept an optional third argument if the ternary "
"version of the built-in :func:`pow` function is to be supported."
msgstr ""
"Estos métodos son llamados para implementar las operaciones aritméticas "
"binarias (``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :"
"func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``). Por ejemplo, para "
"evaluar la expresión ``x + y``, donde *x* es instancia de una clase que "
"tiene un método :meth:`__add__`, ``x.__add__(y)`` es llamado. El método :"
"meth:`__divmod__` debe ser el equivalente a usar :meth:`__floordiv__` y :"
"meth:`__mod__`; no debe ser relacionado a :meth:`__truediv__`. Se debe tomar "
"en cuenta que :meth:`__pow__` debe ser definido para aceptar un tercer "
"argumento opcional si la versión ternaria de la función incorporada :func:"
"`pow` es soportada."

#: ../Doc/reference/datamodel.rst:2335
msgid ""
Expand All @@ -4047,14 +4057,24 @@ msgid ""
"an instance of a class that has an :meth:`__rsub__` method, ``y."
"__rsub__(x)`` is called if ``x.__sub__(y)`` returns *NotImplemented*."
msgstr ""
"Estos métodos son llamados para implementar las operaciones aritméticas "
"binarias (``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :"
"func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``) con operandos "
"reflejados (intercambiados). Estas funciones son llamadas únicamente si el "
"operando izquierdo no soporta la operación correspondiente [#]_ y los "
"operandos son de tipos diferentes. [#]_ Por ejemplo, para evaluar la "
"expresión ``x - y``, donde *y* es instancia de una clase que tiene un "
"método :meth:`__rsub__`, ``y.__rsub__(x)`` es llamado si ``x.__sub__(y)`` "
"retorna *NotImplemented*."

#: ../Doc/reference/datamodel.rst:2369
msgid ""
"Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the "
"coercion rules would become too complicated)."
msgstr ""
"Tomar en cuenta que la función ternaria :func:`pow` no intentará llamar a :"
"meth:`__rpow__` (las reglas de coerción se volverían demasiado complicadas)."
"Se debe tomar en cuenta que la función ternaria :func:`pow` no intentará "
"llamar a :meth:`__rpow__` (las reglas de coerción se volverían demasiado "
"complicadas)."

#: ../Doc/reference/datamodel.rst:2374
msgid ""
Expand All @@ -4063,6 +4083,11 @@ msgid ""
"will be called before the left operand's non-reflected method. This "
"behavior allows subclasses to override their ancestors' operations."
msgstr ""
"Si el tipo del operando de la derecha es una subclase del tipo del operando "
"de la izquierda y esa subclase proporciona el método reflejado para la "
"operación, este método será llamado antes del método no reflejado del "
"operando izquierdo. Este comportamiento permite que las subclases anulen las "
"operaciones de sus predecesores."

#: ../Doc/reference/datamodel.rst:2394
msgid ""
Expand All @@ -4079,18 +4104,35 @@ msgid ""
"(see :ref:`faq-augmented-assignment-tuple-error`), but this behavior is in "
"fact part of the data model."
msgstr ""
"Estos métodos son llamados para implementar las asignaciones aritméticas "
"aumentadas (``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, "
"``**=``, ``<<=``, ``>>=``, ``&=``, ``^=``, ``|=``). Estos métodos deben "
"intentar realizar la operación *in-place* (modificando *self*) y retornar el "
"resultado (que puede, pero no tiene que ser *self*). Si un método específico "
"no es definido, la asignación aumentada regresa a los métodos normales. Por "
"ejemplo, si *x* es la instancia de una clase con el método :meth:`__iadd__`, "
"``x += y`` es equivalente a ``x = x.__iadd__(y)``. De lo contrario ``x."
"__add__(y)`` y ``y.__radd__(x)`` se consideran al igual que con la "
"evaluación de ``x + y``. En ciertas situaciones, asignaciones aumentadas "
"pueden resultar en errores no esperados (ver :ref:`faq-augmented-assignment-"
"tuple-error`), pero este comportamiento es en realidad parte del modelo de "
"datos."

#: ../Doc/reference/datamodel.rst:2415
msgid ""
"Called to implement the unary arithmetic operations (``-``, ``+``, :func:"
"`abs` and ``~``)."
msgstr ""
"Es llamado para implementar las operaciones aritméticas unarias (``-``, ``"
"+``, :func:`abs` and ``~``)."

#: ../Doc/reference/datamodel.rst:2428
msgid ""
"Called to implement the built-in functions :func:`complex`, :func:`int` and :"
"func:`float`. Should return a value of the appropriate type."
msgstr ""
"Es llamado para implementar las funciones incorporadas :func:`complex`, :"
"func:`int` y :func:`float`. Debe retornar un valor del tipo apropiado."

#: ../Doc/reference/datamodel.rst:2435
msgid ""
Expand All @@ -4100,13 +4142,21 @@ msgid ""
"functions). Presence of this method indicates that the numeric object is an "
"integer type. Must return an integer."
msgstr ""
"Es llamado para implementar :func:`operator.index`, y cuando sea que Python "
"necesite convertir sin pérdidas el objeto numérico a un objeto entero (tal "
"como en la segmentación o *slicing*, o las funciones incorporadas :func:"
"`bin`, :func:`hex` y :func:`oct`). La presencia de este método indica que el "
"objeto numérico es un tipo entero. Debe retornar un entero."

#: ../Doc/reference/datamodel.rst:2441
msgid ""
"If :meth:`__int__`, :meth:`__float__` and :meth:`__complex__` are not "
"defined then corresponding built-in functions :func:`int`, :func:`float` "
"and :func:`complex` fall back to :meth:`__index__`."
msgstr ""
"Si :meth:`__int__`, :meth:`__float__` y :meth:`__complex__` no son "
"definidos, entonces todas las funciones incorporadas correspondientes :func:"
"`int`, :func:`float` y :func:`complex` vuelven a :meth:`__index__`."

#: ../Doc/reference/datamodel.rst:2453
msgid ""
Expand All @@ -4116,16 +4166,23 @@ msgid ""
"return the value of the object truncated to an :class:`~numbers.Integral` "
"(typically an :class:`int`)."
msgstr ""
"Es llamado para implementar la función incorporada :func:`round` y las "
"funciones :mod:`math` :func:`~math.trunc`, :func:`~math.floor` y :func:"
"`~math.ceil`. A menos que *ndigits* sea pasado a :meth:`!__round__` todos "
"estos métodos deben retornar el valor del objeto truncado a :class:`~numbers."
"Integral` (normalmente :class:`int`)."

#: ../Doc/reference/datamodel.rst:2459
msgid ""
"If :meth:`__int__` is not defined then the built-in function :func:`int` "
"falls back to :meth:`__trunc__`."
msgstr ""
"Si :meth:`__int__` no es definido, entonces la función incorporada :func:"
"`int` regresa a :meth:`__trunc__`."

#: ../Doc/reference/datamodel.rst:2466
msgid "With Statement Context Managers"
msgstr ""
msgstr "Gestores de Contexto en la Declaración *with*"

#: ../Doc/reference/datamodel.rst:2468
msgid ""
Expand All @@ -4136,31 +4193,50 @@ msgid ""
"using the :keyword:`!with` statement (described in section :ref:`with`), but "
"can also be used by directly invoking their methods."
msgstr ""
"Un :dfn:`context manager` es un objeto que define el contexto en tiempo de "
"ejecución a ser establecido cuando se ejecuta una declaración :keyword:"
"`with`. El gestor de contexto maneja la entrada y la salida del contexto en "
"tiempo de ejecución deseado para la ejecución del bloque de código. Los "
"gestores de contexto son normalmente invocados utilizando la declaración :"
"keyword:`!with` (descritos en la sección :ref:`with`), pero también pueden "
"ser utilizados al invocar directamente sus métodos."

#: ../Doc/reference/datamodel.rst:2479
msgid ""
"Typical uses of context managers include saving and restoring various kinds "
"of global state, locking and unlocking resources, closing opened files, etc."
msgstr ""
"Usos típicos de los gestores de contexto incluyen guardar y restablecer "
"diversos tipos de declaraciones globales, bloquear y desbloquear recursos, "
"cerrar archivos abiertos, etc."

#: ../Doc/reference/datamodel.rst:2482
msgid ""
"For more information on context managers, see :ref:`typecontextmanager`."
msgstr ""
"Para más información sobre gestores de contexto, ver :ref:"
"`typecontextmanager`."

#: ../Doc/reference/datamodel.rst:2487
msgid ""
"Enter the runtime context related to this object. The :keyword:`with` "
"statement will bind this method's return value to the target(s) specified in "
"the :keyword:`!as` clause of the statement, if any."
msgstr ""
"Ingresa al contexto en tiempo de ejecución relacionado con este objeto. La "
"declaración :keyword:`with` ligará el valor de retorno de este método al "
"objetivo especificado en cláusula :keyword:`!as` de la declaración, en caso "
"de existir."

#: ../Doc/reference/datamodel.rst:2494
msgid ""
"Exit the runtime context related to this object. The parameters describe the "
"exception that caused the context to be exited. If the context was exited "
"without an exception, all three arguments will be :const:`None`."
msgstr ""
"Sale del contexto en tiempo de ejecución relacionado a este objeto. Los "
"parámetros describen la excepción que causa la salida del contexto. Si éste "
"se termina sin excepción, los tres argumentos serán :const:`None`."

#: ../Doc/reference/datamodel.rst:2498
msgid ""
Expand All @@ -4169,26 +4245,35 @@ msgid ""
"Otherwise, the exception will be processed normally upon exit from this "
"method."
msgstr ""
"Si se proporciona una excepción, y el método desea eliminarla (por ejemplo, "
"prevenir que sea propagada), debe retornar un valor verdadero. De lo "
"contrario, la excepción será procesada de forma normal al salir de este "
"método."

#: ../Doc/reference/datamodel.rst:2502
msgid ""
"Note that :meth:`__exit__` methods should not reraise the passed-in "
"exception; this is the caller's responsibility."
msgstr ""
"Se debe tomar en cuenta que los métodos :meth:`__exit__` no deben lanzar de "
"nuevo la excepción que se pasa; esto es la responsabilidad de quien hace el "
"llamado."

#: ../Doc/reference/datamodel.rst:2509
msgid ":pep:`343` - The \"with\" statement"
msgstr ""
msgstr ":pep:`343` - La declaración “with”"

#: ../Doc/reference/datamodel.rst:2509
msgid ""
"The specification, background, and examples for the Python :keyword:`with` "
"statement."
msgstr ""
"La especificación, el antecedente, y los ejemplos para la declaración de "
"Python :keyword:`with`."

#: ../Doc/reference/datamodel.rst:2516
msgid "Special method lookup"
msgstr ""
msgstr "Búsqueda de método especial"

#: ../Doc/reference/datamodel.rst:2518
msgid ""
Expand Down