@@ -572,6 +572,16 @@ msgid ""
572
572
"renaming '/home/me/random.py' since it has the same name as the standard "
573
573
"library module named 'random' and the import system gives it precedence)"
574
574
msgstr ""
575
+ "$ python random.py\n"
576
+ "Traceback (most recent call last):\n"
577
+ " File \" /home/me/random.py\" , line 1, in <module>\n"
578
+ " import random\n"
579
+ " File \" /home/me/random.py\" , line 3, in <module>\n"
580
+ " print(random.randint(5))\n"
581
+ " ^^^^^^^^^^^^^^\n"
582
+ "AttributeError: module 'random' has no attribute 'randint' (consider "
583
+ "renaming '/home/me/random.py' since it has the same name as the standard "
584
+ "library module named 'random' and the import system gives it precedence)"
575
585
576
586
#: ../../whatsnew/3.13.rst:281
577
587
msgid ""
@@ -596,6 +606,16 @@ msgid ""
596
606
"home/me/numpy.py' if it has the same name as a third-party module you "
597
607
"intended to import)"
598
608
msgstr ""
609
+ "$ python numpy.py\n"
610
+ "Traceback (most recent call last):\n"
611
+ " File \" /home/me/numpy.py\" , line 1, in <module>\n"
612
+ " import numpy as np\n"
613
+ " File \" /home/me/numpy.py\" , line 3, in <module>\n"
614
+ " np.array([1, 2, 3])\n"
615
+ " ^^^^^^^^\n"
616
+ "AttributeError: module 'numpy' has no attribute 'array' (consider renaming '/"
617
+ "home/me/numpy.py' if it has the same name as a third-party module you "
618
+ "intended to import)"
599
619
600
620
#: ../../whatsnew/3.13.rst:296
601
621
msgid "(Contributed by Shantanu Jain in :gh:`95754`.)"
@@ -619,6 +639,13 @@ msgid ""
619
639
"TypeError: split() got an unexpected keyword argument 'max_split'. Did you "
620
640
"mean 'maxsplit'?"
621
641
msgstr ""
642
+ ">>> \" Better error messages!\" .split(max_split=1)\n"
643
+ "Traceback (most recent call last):\n"
644
+ " File \" <python-input-0>\" , line 1, in <module>\n"
645
+ " \" Better error messages!\" .split(max_split=1)\n"
646
+ " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n"
647
+ "TypeError: split() got an unexpected keyword argument 'max_split'. Did you "
648
+ "mean 'maxsplit'?"
622
649
623
650
#: ../../whatsnew/3.13.rst:310
624
651
msgid ""
@@ -1064,6 +1091,8 @@ msgid ""
1064
1091
"class C[T]:\n"
1065
1092
" type Alias = lambda: T"
1066
1093
msgstr ""
1094
+ "class C[T]:\n"
1095
+ " type Alias = lambda: T"
1067
1096
1068
1097
#: ../../whatsnew/3.13.rst:536
1069
1098
msgid "(Contributed by Jelle Zijlstra in :gh:`109118` and :gh:`118160`.)"
@@ -1453,6 +1482,12 @@ msgid ""
1453
1482
"simultaneously, it was possible that the outer task group would hang, "
1454
1483
"because its internal cancellation was swallowed by the inner task group."
1455
1484
msgstr ""
1485
+ "Melhora o comportamento de :class:`~asyncio.TaskGroup` quando um "
1486
+ "cancelamento externo colide com um cancelamento interno. Por exemplo, quando "
1487
+ "dois grupos de tarefas estão aninhados e ambos experimentam uma exceção em "
1488
+ "uma tarefa filho simultaneamente, é possível que o grupo de tarefas externo "
1489
+ "seja interrompido, porque seu cancelamento interno foi engolido pelo grupo "
1490
+ "de tarefas interno."
1456
1491
1457
1492
#: ../../whatsnew/3.13.rst:721
1458
1493
msgid ""
@@ -1461,19 +1496,29 @@ msgid ""
1461
1496
"Task.cancel` method. This ensures that a :exc:`~asyncio.CancelledError` will "
1462
1497
"be raised at the next :keyword:`await`, so the cancellation is not lost."
1463
1498
msgstr ""
1499
+ "No caso em que um grupo de tarefas é cancelado externamente e também deve "
1500
+ "levantar :exc:`ExceptionGroup`, ele agora chamará o método :meth:`~asyncio."
1501
+ "Task.cancel` da tarefa pai. Isso garante que uma :exc:`~asyncio."
1502
+ "CancelledError` será levantada no próximo :keyword:`await`, para que o "
1503
+ "cancelamento não seja perdido."
1464
1504
1465
1505
#: ../../whatsnew/3.13.rst:727
1466
1506
msgid ""
1467
1507
"An added benefit of these changes is that task groups now preserve the "
1468
1508
"cancellation count (:meth:`~asyncio.Task.cancelling`)."
1469
1509
msgstr ""
1510
+ "Um benefício adicional dessas mudanças é que os grupos de tarefas agora "
1511
+ "preservam a contagem de cancelamentos (:meth:`~asyncio.Task.cancelling`)."
1470
1512
1471
1513
#: ../../whatsnew/3.13.rst:730
1472
1514
msgid ""
1473
1515
"In order to handle some corner cases, :meth:`~asyncio.Task.uncancel` may now "
1474
1516
"reset the undocumented ``_must_cancel`` flag when the cancellation count "
1475
1517
"reaches zero."
1476
1518
msgstr ""
1519
+ "Para lidar com alguns casos extremos, :meth:`~asyncio.Task.uncancel` agora "
1520
+ "pode redefinir o sinalizador não documentado ``_must_cancel`` quando a "
1521
+ "contagem de cancelamentos chegar a zero."
1477
1522
1478
1523
#: ../../whatsnew/3.13.rst:734
1479
1524
msgid "(Inspired by an issue reported by Arthur Tacca in :gh:`116720`.)"
@@ -1488,6 +1533,10 @@ msgid ""
1488
1533
"exc:`RuntimeWarning` about the given coroutine being never awaited). "
1489
1534
"(Contributed by Arthur Tacca and Jason Zhang in :gh:`115957`.)"
1490
1535
msgstr ""
1536
+ "Quando :meth:`.TaskGroup.create_task` é chamado em um :class:`~asyncio."
1537
+ "TaskGroup` inativo, a corrotina fornecida será fechada (o que evita que um :"
1538
+ "exc:`RuntimeWarning` sobre a corrotina fornecida nunca seja aguardado). "
1539
+ "(Contribuição de Arthur Tacca e Jason Zhang em :gh:`115957`.)"
1491
1540
1492
1541
#: ../../whatsnew/3.13.rst:744
1493
1542
msgid "base64"
@@ -1499,6 +1548,10 @@ msgid ""
1499
1548
"encoding :class:`bytes` as `Z85 data`_ and decoding Z85-encoded data to :"
1500
1549
"class:`!bytes`. (Contributed by Matan Perelman in :gh:`75299`.)"
1501
1550
msgstr ""
1551
+ "Adiciona as funções :func:`~base64.z85encode` e :func:`~base64.z85decode` "
1552
+ "para codificar :class:`bytes` como `dados Z85`_ e decodificar dados "
1553
+ "codificados em Z85 para :class:`!bytes`. (Contribuição de Matan Perelman em :"
1554
+ "gh:`75299`.)"
1502
1555
1503
1556
#: ../../whatsnew/3.13.rst:755
1504
1557
msgid "compileall"
0 commit comments