Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e101b96

Browse files
committed
avance
1 parent 7aecce0 commit e101b96

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

whatsnew/2.6.po

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgstr ""
1111
"Project-Id-Version: Python 3.8\n"
1212
"Report-Msgid-Bugs-To: \n"
1313
"POT-Creation-Date: 2020-05-05 12:54+0200\n"
14-
"PO-Revision-Date: 2021-05-23 18:58-0300\n"
14+
"PO-Revision-Date: 2021-06-12 19:34-0300\n"
1515
"Language-Team: python-doc-es\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
@@ -583,17 +583,23 @@ msgid ""
583583
"\"context manager\". The context manager must have :meth:`__enter__` and :"
584584
"meth:`__exit__` methods."
585585
msgstr ""
586+
"La expresión se evalúa y debería dar como resultado un objeto llamado "
587+
"\"gestor de contexto\". El gestor de contexto debe tener los métodos :meth:"
588+
"`__enter__` y :meth:`__exit__`."
586589

587590
#: ../Doc/whatsnew/2.6.rst:345
588591
msgid ""
589592
"The context manager's :meth:`__enter__` method is called. The value "
590593
"returned is assigned to *VAR*. If no ``as VAR`` clause is present, the "
591594
"value is simply discarded."
592595
msgstr ""
596+
"Se llama al método :meth:`__enter__` del gestor de contexto. El valor "
597+
"retornado se asigna a *VAR*. Si no hay una cláusula ``as VAR``, el valor "
598+
"simplemente se descarta."
593599

594600
#: ../Doc/whatsnew/2.6.rst:349
595601
msgid "The code in *BLOCK* is executed."
596-
msgstr ""
602+
msgstr "Se ejecuta el código en *BLOCK*."
597603

598604
#: ../Doc/whatsnew/2.6.rst:351
599605
msgid ""
@@ -607,18 +613,31 @@ msgid ""
607613
"containing the ':keyword:`with`' statement will never realize anything went "
608614
"wrong."
609615
msgstr ""
616+
"Si *BLOCK* lanza una excepción, se llama al método :meth:`__exit__` del "
617+
"gestor de contexto con tres argumentos, los detalles de la excepción "
618+
"(``type, value, traceback``, los mismos valores retornados por :func:`sys."
619+
"exc_info`, que también puede ser ``None`` si no se produjo ninguna "
620+
"excepción). El valor de retorno del método controla si se vuelve a generar "
621+
"una excepción: cualquier valor *false* vuelve a lanzar la excepción, y "
622+
"``True`` resultará en inhibirla. Rara vez querrá suprimir la excepción, "
623+
"porque si lo hace, el autor del código que contenga la sentencia ':keyword:"
624+
"`with`' nunca se dará cuenta de que algo salió mal."
610625

611626
#: ../Doc/whatsnew/2.6.rst:360
612627
msgid ""
613628
"If *BLOCK* didn't raise an exception, the :meth:`__exit__` method is still "
614629
"called, but *type*, *value*, and *traceback* are all ``None``."
615630
msgstr ""
631+
"Si *BLOCK* no lanzó una excepción, el método :meth:`__exit__` continúa "
632+
"llamándose, pero *type*, *value* y *traceback* son todos``None``."
616633

617634
#: ../Doc/whatsnew/2.6.rst:363
618635
msgid ""
619636
"Let's think through an example. I won't present detailed code but will only "
620637
"sketch the methods necessary for a database that supports transactions."
621638
msgstr ""
639+
"Pensemos en un ejemplo. No presentaré un código detallado, solo bosquejaré "
640+
"los métodos necesarios para una base de datos que admita transacciones."
622641

623642
#: ../Doc/whatsnew/2.6.rst:366
624643
msgid ""
@@ -628,19 +647,31 @@ msgid ""
628647
"rolled back, meaning that the changes are all discarded and the database is "
629648
"unchanged. See any database textbook for more information.)"
630649
msgstr ""
650+
"(Para las personas que no están familiarizadas con la terminología de la "
651+
"base de datos: un conjunto de cambios en la base de datos se agrupa en una "
652+
"transacción. Las transacciones pueden confirmarse, lo que significa que "
653+
"todos los cambios se escriben en la base de datos, o deshacerse, lo que "
654+
"significa que todos los cambios se descartan y la base de datos no ha "
655+
"cambiado. Consulte cualquier libro de texto de base de datos para obtener "
656+
"más información)."
631657

632658
#: ../Doc/whatsnew/2.6.rst:372
633659
msgid ""
634660
"Let's assume there's an object representing a database connection. Our goal "
635661
"will be to let the user write code like this::"
636662
msgstr ""
663+
"Supongamos que hay un objeto que representa una conexión de base de datos. "
664+
"Nuestro objetivo será permitir que el usuario escriba un código como este::"
637665

638666
#: ../Doc/whatsnew/2.6.rst:381
639667
msgid ""
640668
"The transaction should be committed if the code in the block runs flawlessly "
641669
"or rolled back if there's an exception. Here's the basic interface for :"
642670
"class:`DatabaseConnection` that I'll assume::"
643671
msgstr ""
672+
"La transacción debe confirmarse si el código del bloque se ejecuta sin "
673+
"problemas o revertirse si hay una excepción. Aquí está la interfaz básica "
674+
"para :class:`DatabaseConnection` que asumiré::"
644675

645676
#: ../Doc/whatsnew/2.6.rst:394
646677
msgid ""
@@ -650,6 +681,11 @@ msgid ""
650681
"cursor`` to their ':keyword:`with`' statement to bind the cursor to a "
651682
"variable name. ::"
652683
msgstr ""
684+
"El método :meth:`__enter__` es bastante fácil, ya que solo tiene que iniciar "
685+
"una nueva transacción. Para esta aplicación, el objeto cursor resultante "
686+
"sería un resultado útil, por lo que el método lo retornará. Luego, el "
687+
"usuario puede agregar ``as cursor`` a su sentencia ':keyword:`with`' para "
688+
"vincular el cursor a un nombre de variable. ::"
653689

654690
#: ../Doc/whatsnew/2.6.rst:406
655691
msgid ""
@@ -658,6 +694,10 @@ msgid ""
658694
"occurred. If there was no exception, the transaction is committed. The "
659695
"transaction is rolled back if there was an exception."
660696
msgstr ""
697+
"El método :meth:`__exit__` es el más complicado porque es donde se debe "
698+
"realizar la mayor parte del trabajo. El método debe verificar si ocurrió una "
699+
"excepción. Si no hubo excepción, la transacción se confirma. La transacción "
700+
"se revierte si hubo una excepción."
661701

662702
#: ../Doc/whatsnew/2.6.rst:411
663703
msgid ""
@@ -666,6 +706,11 @@ msgid ""
666706
"exception will be re-raised automatically. If you wished, you could be more "
667707
"explicit and add a :keyword:`return` statement at the marked location. ::"
668708
msgstr ""
709+
"En el siguiente código, la ejecución simplemente caerá al final de la "
710+
"función, retornando el valor predeterminado ``None``. ``None`` es falso, por "
711+
"lo que la excepción se volverá a lanzar automáticamente. Si lo desea, puede "
712+
"ser más explícito y agregar una sentencia keyword:`return` en la ubicación "
713+
"marcada. ::"
669714

670715
#: ../Doc/whatsnew/2.6.rst:431
671716
msgid "The contextlib module"

0 commit comments

Comments
 (0)