Skip to content

Commit 1893b7e

Browse files
committed
Traducido exception groups (100%)
1 parent e91883a commit 1893b7e

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

library/exceptions.po

Lines changed: 52 additions & 1 deletion
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: 2022-10-25 19:47+0200\n"
14-
"PO-Revision-Date: 2022-10-30 20:00-0300\n"
14+
"PO-Revision-Date: 2022-10-30 21:00-0300\n"
1515
"Last-Translator: Marco Richetta <marcorichetta@gmail.com>\n"
1616
"Language-Team: python-doc-es\n"
1717
"Language: es\n"
@@ -1414,6 +1414,11 @@ msgid ""
14141414
"recognised by :keyword:`except*<except_star>`, which matches their subgroups "
14151415
"based on the types of the contained exceptions."
14161416
msgstr ""
1417+
"Las siguientes se utilizan cuando es necesario lanzar múltiples excepciones "
1418+
"no relacionadas. Forman parte de la jerarquía de excepciones, por lo que "
1419+
"pueden ser manejadas con :keyword:`except` como todas las demás excepciones. "
1420+
"Además, son reconocidas por :keyword:`except*<except_star>`, lo que hace "
1421+
"coincidir sus subgrupos basándose en los tipos de las excepciones contenidas."
14171422

14181423
#: ../Doc/library/exceptions.rst:886
14191424
msgid ""
@@ -1425,6 +1430,13 @@ msgid ""
14251430
"is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :"
14261431
"exc:`BaseExceptionGroup`."
14271432
msgstr ""
1433+
"Ambos tipos de excepción envuelven las excepciones en la secuencia ``excs``. "
1434+
"El parámetro ``msg`` debe ser una cadena de caracteres. La diferencia entre "
1435+
"las dos clases es que :exc:`BaseExceptionGroup` extiende a :exc:"
1436+
"`BaseException` y puede envolver cualquier excepción, mientras que :exc:"
1437+
"`ExceptionGroup` extiende a :exc:`Exception` y solo puede envolver subclases "
1438+
"de :exc:`Exception`. Este diseño está pensado para que ``except Exception`` "
1439+
"capture un :exc:`ExceptionGroup` pero no :exc:`BaseExceptionGroup`"
14281440

14291441
#: ../Doc/library/exceptions.rst:894
14301442
msgid ""
@@ -1434,22 +1446,33 @@ msgid ""
14341446
"The :exc:`ExceptionGroup` constructor, on the other hand, raises a :exc:"
14351447
"`TypeError` if any contained exception is not an :exc:`Exception` subclass."
14361448
msgstr ""
1449+
"El constructor :exc:`BaseExceptionGroup` devuelve una :exc:`ExceptionGroup` "
1450+
"en lugar de una :exc:`BaseExceptionGroup` si todas las excepciones "
1451+
"contenidas son instancias de :exc:`Exception` , por lo que puede utilizarse "
1452+
"para hacer la selección automática. El constructor :exc:`ExceptionGroup`, "
1453+
"por su parte, lanza un :exc:`TypeError` si alguna de las excepciones "
1454+
"contenidas no es una subclase de :exc:`Exception`."
14371455

14381456
#: ../Doc/library/exceptions.rst:903
14391457
msgid "The ``msg`` argument to the constructor. This is a read-only attribute."
14401458
msgstr ""
1459+
"El argumento ``msg`` para el constructor. Este atributo es de sólo lectura."
14411460

14421461
#: ../Doc/library/exceptions.rst:907
14431462
msgid ""
14441463
"A tuple of the exceptions in the ``excs`` sequence given to the constructor. "
14451464
"This is a read-only attribute."
14461465
msgstr ""
1466+
"Una tupla de la excepciones en la sequencia ``excs`` pasada al constructor. "
1467+
"Este atributo es de sólo lectura."
14471468

14481469
#: ../Doc/library/exceptions.rst:912
14491470
msgid ""
14501471
"Returns an exception group that contains only the exceptions from the "
14511472
"current group that match *condition*, or ``None`` if the result is empty."
14521473
msgstr ""
1474+
"Devuelve un grupo de excepciones que contiene sólo las excepciones del grupo "
1475+
"actual que cumplen con *condition*, o ``None`` si el resultado está vacío."
14531476

14541477
#: ../Doc/library/exceptions.rst:915
14551478
msgid ""
@@ -1458,6 +1481,11 @@ msgid ""
14581481
"type or a tuple of exception types, which is used to check for a match using "
14591482
"the same check that is used in an ``except`` clause."
14601483
msgstr ""
1484+
"La condición puede ser una función que acepta una excepción y devuelve "
1485+
"*True* para aquellas que deberían estar en el subgrupo, o puede ser un tipo "
1486+
"de excepción o una tupla de tipos de excepción, que se utiliza para "
1487+
"comprobar una coincidencia utilizando la misma comprobación que se utiliza "
1488+
"en una cláusula ``except``."
14611489

14621490
#: ../Doc/library/exceptions.rst:920
14631491
msgid ""
@@ -1466,43 +1494,66 @@ msgid ""
14661494
"`__cause__`, :attr:`__context__` and :attr:`__notes__` fields. Empty nested "
14671495
"groups are omitted from the result."
14681496
msgstr ""
1497+
"La estructura de anidamiento de la excepción actual se conserva en el "
1498+
"resultado, así como también los valores de sus campos :attr:`message`, :attr:"
1499+
"`__traceback__`, :attr:`__cause__`, :attr:`__context__` y :attr:`__notes__`. "
1500+
"Los grupos anidados vacíos son omitidos del resultado."
14691501

14701502
#: ../Doc/library/exceptions.rst:925
14711503
msgid ""
14721504
"The condition is checked for all exceptions in the nested exception group, "
14731505
"including the top-level and any nested exception groups. If the condition is "
14741506
"true for such an exception group, it is included in the result in full."
14751507
msgstr ""
1508+
"La condición se comprueba para todas las excepciones del grupo de excepción "
1509+
"anidado, incluyendo el nivel superior y cualquier grupo de excepción "
1510+
"anidado. Si la condición es verdadera para dicho grupo de excepción, se "
1511+
"incluye en el resultado en su totalidad."
14761512

14771513
#: ../Doc/library/exceptions.rst:931
14781514
msgid ""
14791515
"Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where "
14801516
"``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-"
14811517
"matching part."
14821518
msgstr ""
1519+
"Al igual que :meth:`subgroup`, pero devuelve el par ``(match, rest)`` donde "
1520+
"``match`` es ``subgroup(condition)`` y ``rest`` es la parte restante que no "
1521+
"coincide."
14831522

14841523
#: ../Doc/library/exceptions.rst:937
14851524
msgid ""
14861525
"Returns an exception group with the same :attr:`message`, :attr:"
14871526
"`__traceback__`, :attr:`__cause__`, :attr:`__context__` and :attr:"
14881527
"`__notes__` but which wraps the exceptions in ``excs``."
14891528
msgstr ""
1529+
"Devuelve un grupo de excepción con los mismos :attr:`message`, :attr:"
1530+
"`__traceback__`, :attr:`__cause__`, :attr:`__context__` y :attr:`__notes__` "
1531+
"pero que envuelve las excepciones en ``excs``."
14901532

14911533
#: ../Doc/library/exceptions.rst:941
14921534
msgid ""
14931535
"This method is used by :meth:`subgroup` and :meth:`split`. A subclass needs "
14941536
"to override it in order to make :meth:`subgroup` and :meth:`split` return "
14951537
"instances of the subclass rather than :exc:`ExceptionGroup`. ::"
14961538
msgstr ""
1539+
"Este método es usado por :meth:`subgroup` y :meth:`split`. Se necesita una "
1540+
"subclase que lo sobrescriba para que :meth:`subgroup` y :meth:`split` "
1541+
"devuelvan instancias de la subclase en lugar de :exc:`ExceptionGroup`. ::"
14971542

14981543
#: ../Doc/library/exceptions.rst:953
1544+
#, fuzzy
14991545
msgid ""
15001546
"Note that :exc:`BaseExceptionGroup` defines :meth:`__new__`, so subclasses "
15011547
"that need a different constructor signature need to override that rather "
15021548
"than :meth:`__init__`. For example, the following defines an exception group "
15031549
"subclass which accepts an exit_code and and constructs the group's message "
15041550
"from it. ::"
15051551
msgstr ""
1552+
"Nota que :exc:`BaseExceptionGroup` define :meth:`__new__`, por lo que las "
1553+
"subclases que necesiten una firma de constructor diferente deben "
1554+
"sobrescribir ese método en lugar de :`__init__`. Por ejemplo, lo siguiente "
1555+
"define una subclase de grupo de excepción que acepta un *exit_code* y "
1556+
"construye el mensaje del grupo a partir del mismo. ::"
15061557

15071558
#: ../Doc/library/exceptions.rst:972
15081559
msgid "Exception hierarchy"

0 commit comments

Comments
 (0)