@@ -11,7 +11,7 @@ msgstr ""
11
11
"Project-Id-Version : Python 3.8\n "
12
12
"Report-Msgid-Bugs-To : \n "
13
13
"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 "
15
15
"Last-Translator : Marco Richetta <marcorichetta@gmail.com>\n "
16
16
"Language-Team : python-doc-es\n "
17
17
"Language : es\n "
@@ -1414,6 +1414,11 @@ msgid ""
1414
1414
"recognised by :keyword:`except*<except_star>`, which matches their subgroups "
1415
1415
"based on the types of the contained exceptions."
1416
1416
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."
1417
1422
1418
1423
#: ../Doc/library/exceptions.rst:886
1419
1424
msgid ""
@@ -1425,6 +1430,13 @@ msgid ""
1425
1430
"is so that ``except Exception`` catches an :exc:`ExceptionGroup` but not :"
1426
1431
"exc:`BaseExceptionGroup`."
1427
1432
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`"
1428
1440
1429
1441
#: ../Doc/library/exceptions.rst:894
1430
1442
msgid ""
@@ -1434,22 +1446,33 @@ msgid ""
1434
1446
"The :exc:`ExceptionGroup` constructor, on the other hand, raises a :exc:"
1435
1447
"`TypeError` if any contained exception is not an :exc:`Exception` subclass."
1436
1448
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`."
1437
1455
1438
1456
#: ../Doc/library/exceptions.rst:903
1439
1457
msgid "The ``msg`` argument to the constructor. This is a read-only attribute."
1440
1458
msgstr ""
1459
+ "El argumento ``msg`` para el constructor. Este atributo es de sólo lectura."
1441
1460
1442
1461
#: ../Doc/library/exceptions.rst:907
1443
1462
msgid ""
1444
1463
"A tuple of the exceptions in the ``excs`` sequence given to the constructor. "
1445
1464
"This is a read-only attribute."
1446
1465
msgstr ""
1466
+ "Una tupla de la excepciones en la sequencia ``excs`` pasada al constructor. "
1467
+ "Este atributo es de sólo lectura."
1447
1468
1448
1469
#: ../Doc/library/exceptions.rst:912
1449
1470
msgid ""
1450
1471
"Returns an exception group that contains only the exceptions from the "
1451
1472
"current group that match *condition*, or ``None`` if the result is empty."
1452
1473
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."
1453
1476
1454
1477
#: ../Doc/library/exceptions.rst:915
1455
1478
msgid ""
@@ -1458,6 +1481,11 @@ msgid ""
1458
1481
"type or a tuple of exception types, which is used to check for a match using "
1459
1482
"the same check that is used in an ``except`` clause."
1460
1483
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``."
1461
1489
1462
1490
#: ../Doc/library/exceptions.rst:920
1463
1491
msgid ""
@@ -1466,43 +1494,66 @@ msgid ""
1466
1494
"`__cause__`, :attr:`__context__` and :attr:`__notes__` fields. Empty nested "
1467
1495
"groups are omitted from the result."
1468
1496
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."
1469
1501
1470
1502
#: ../Doc/library/exceptions.rst:925
1471
1503
msgid ""
1472
1504
"The condition is checked for all exceptions in the nested exception group, "
1473
1505
"including the top-level and any nested exception groups. If the condition is "
1474
1506
"true for such an exception group, it is included in the result in full."
1475
1507
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."
1476
1512
1477
1513
#: ../Doc/library/exceptions.rst:931
1478
1514
msgid ""
1479
1515
"Like :meth:`subgroup`, but returns the pair ``(match, rest)`` where "
1480
1516
"``match`` is ``subgroup(condition)`` and ``rest`` is the remaining non-"
1481
1517
"matching part."
1482
1518
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."
1483
1522
1484
1523
#: ../Doc/library/exceptions.rst:937
1485
1524
msgid ""
1486
1525
"Returns an exception group with the same :attr:`message`, :attr:"
1487
1526
"`__traceback__`, :attr:`__cause__`, :attr:`__context__` and :attr:"
1488
1527
"`__notes__` but which wraps the exceptions in ``excs``."
1489
1528
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``."
1490
1532
1491
1533
#: ../Doc/library/exceptions.rst:941
1492
1534
msgid ""
1493
1535
"This method is used by :meth:`subgroup` and :meth:`split`. A subclass needs "
1494
1536
"to override it in order to make :meth:`subgroup` and :meth:`split` return "
1495
1537
"instances of the subclass rather than :exc:`ExceptionGroup`. ::"
1496
1538
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`. ::"
1497
1542
1498
1543
#: ../Doc/library/exceptions.rst:953
1544
+ #, fuzzy
1499
1545
msgid ""
1500
1546
"Note that :exc:`BaseExceptionGroup` defines :meth:`__new__`, so subclasses "
1501
1547
"that need a different constructor signature need to override that rather "
1502
1548
"than :meth:`__init__`. For example, the following defines an exception group "
1503
1549
"subclass which accepts an exit_code and and constructs the group's message "
1504
1550
"from it. ::"
1505
1551
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. ::"
1506
1557
1507
1558
#: ../Doc/library/exceptions.rst:972
1508
1559
msgid "Exception hierarchy"
0 commit comments