Skip to content

Commit 37a90b0

Browse files
sync with cpython f206b98c
1 parent 88a5c51 commit 37a90b0

File tree

6 files changed

+539
-507
lines changed

6 files changed

+539
-507
lines changed

c-api/typeobj.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.13\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2025-03-21 00:15+0000\n"
9+
"POT-Creation-Date: 2025-04-14 00:15+0000\n"
1010
"PO-Revision-Date: 2018-05-23 14:33+0000\n"
1111
"Last-Translator: Adrian Liaw <[email protected]>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1467,7 +1467,7 @@ msgid ""
14671467
"field. Note that the :c:member:`~PyVarObject.ob_size` field may later be "
14681468
"used for other purposes. For example, :py:type:`int` instances use the bits "
14691469
"of :c:member:`~PyVarObject.ob_size` in an implementation-defined way; the "
1470-
"underlying storage and its size should be acessed using :c:func:"
1470+
"underlying storage and its size should be accessed using :c:func:"
14711471
"`PyLong_Export`."
14721472
msgstr ""
14731473

library/asyncio-task.po

+27-21
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ msgid ""
66
msgstr ""
77
"Project-Id-Version: Python 3.13\n"
88
"Report-Msgid-Bugs-To: \n"
9-
"POT-Creation-Date: 2025-02-23 00:15+0000\n"
9+
"POT-Creation-Date: 2025-04-14 00:15+0000\n"
1010
"PO-Revision-Date: 2018-05-23 14:39+0000\n"
1111
"Last-Translator: Adrian Liaw <[email protected]>\n"
1212
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1779,12 +1779,18 @@ msgstr ""
17791779

17801780
#: ../../library/asyncio-task.rst:1339
17811781
msgid ""
1782-
"This arranges for a :exc:`CancelledError` exception to be thrown into the "
1783-
"wrapped coroutine on the next cycle of the event loop."
1782+
"If the Task is already *done* or *cancelled*, return ``False``, otherwise, "
1783+
"return ``True``."
17841784
msgstr ""
17851785

17861786
#: ../../library/asyncio-task.rst:1342
17871787
msgid ""
1788+
"The method arranges for a :exc:`CancelledError` exception to be thrown into "
1789+
"the wrapped coroutine on the next cycle of the event loop."
1790+
msgstr ""
1791+
1792+
#: ../../library/asyncio-task.rst:1345
1793+
msgid ""
17881794
"The coroutine then has a chance to clean up or even deny the request by "
17891795
"suppressing the exception with a :keyword:`try` ... ... ``except "
17901796
"CancelledError`` ... :keyword:`finally` block. Therefore, unlike :meth:"
@@ -1795,21 +1801,21 @@ msgid ""
17951801
"addition to catching the exception."
17961802
msgstr ""
17971803

1798-
#: ../../library/asyncio-task.rst:1352
1804+
#: ../../library/asyncio-task.rst:1355
17991805
msgid "Added the *msg* parameter."
18001806
msgstr "新增 *msg* 參數。"
18011807

1802-
#: ../../library/asyncio-task.rst:1355
1808+
#: ../../library/asyncio-task.rst:1358
18031809
msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter."
18041810
msgstr ""
18051811

1806-
#: ../../library/asyncio-task.rst:1360
1812+
#: ../../library/asyncio-task.rst:1363
18071813
msgid ""
18081814
"The following example illustrates how coroutines can intercept the "
18091815
"cancellation request::"
18101816
msgstr ""
18111817

1812-
#: ../../library/asyncio-task.rst:1363
1818+
#: ../../library/asyncio-task.rst:1366
18131819
msgid ""
18141820
"async def cancel_me():\n"
18151821
" print('cancel_me(): before sleep')\n"
@@ -1846,32 +1852,32 @@ msgid ""
18461852
"# main(): cancel_me is cancelled now"
18471853
msgstr ""
18481854

1849-
#: ../../library/asyncio-task.rst:1399
1855+
#: ../../library/asyncio-task.rst:1402
18501856
msgid "Return ``True`` if the Task is *cancelled*."
18511857
msgstr ""
18521858

1853-
#: ../../library/asyncio-task.rst:1401
1859+
#: ../../library/asyncio-task.rst:1404
18541860
msgid ""
18551861
"The Task is *cancelled* when the cancellation was requested with :meth:"
18561862
"`cancel` and the wrapped coroutine propagated the :exc:`CancelledError` "
18571863
"exception thrown into it."
18581864
msgstr ""
18591865

1860-
#: ../../library/asyncio-task.rst:1407
1866+
#: ../../library/asyncio-task.rst:1410
18611867
msgid "Decrement the count of cancellation requests to this Task."
18621868
msgstr ""
18631869

1864-
#: ../../library/asyncio-task.rst:1409
1870+
#: ../../library/asyncio-task.rst:1412
18651871
msgid "Returns the remaining number of cancellation requests."
18661872
msgstr ""
18671873

1868-
#: ../../library/asyncio-task.rst:1411
1874+
#: ../../library/asyncio-task.rst:1414
18691875
msgid ""
18701876
"Note that once execution of a cancelled task completed, further calls to :"
18711877
"meth:`uncancel` are ineffective."
18721878
msgstr ""
18731879

1874-
#: ../../library/asyncio-task.rst:1416
1880+
#: ../../library/asyncio-task.rst:1419
18751881
msgid ""
18761882
"This method is used by asyncio's internals and isn't expected to be used by "
18771883
"end-user code. In particular, if a Task gets successfully uncancelled, this "
@@ -1880,7 +1886,7 @@ msgid ""
18801886
"respective structured block. For example::"
18811887
msgstr ""
18821888

1883-
#: ../../library/asyncio-task.rst:1423
1889+
#: ../../library/asyncio-task.rst:1426
18841890
msgid ""
18851891
"async def make_request_with_timeout():\n"
18861892
" try:\n"
@@ -1894,7 +1900,7 @@ msgid ""
18941900
" await unrelated_code()"
18951901
msgstr ""
18961902

1897-
#: ../../library/asyncio-task.rst:1434
1903+
#: ../../library/asyncio-task.rst:1437
18981904
msgid ""
18991905
"While the block with ``make_request()`` and ``make_another_request()`` might "
19001906
"get cancelled due to the timeout, ``unrelated_code()`` should continue "
@@ -1903,14 +1909,14 @@ msgid ""
19031909
"similar fashion."
19041910
msgstr ""
19051911

1906-
#: ../../library/asyncio-task.rst:1440
1912+
#: ../../library/asyncio-task.rst:1443
19071913
msgid ""
19081914
"If end-user code is, for some reason, suppressing cancellation by catching :"
19091915
"exc:`CancelledError`, it needs to call this method to remove the "
19101916
"cancellation state."
19111917
msgstr ""
19121918

1913-
#: ../../library/asyncio-task.rst:1444
1919+
#: ../../library/asyncio-task.rst:1447
19141920
msgid ""
19151921
"When this method decrements the cancellation count to zero, the method "
19161922
"checks if a previous :meth:`cancel` call had arranged for :exc:"
@@ -1919,17 +1925,17 @@ msgid ""
19191925
"``_must_cancel`` flag)."
19201926
msgstr ""
19211927

1922-
#: ../../library/asyncio-task.rst:1450
1928+
#: ../../library/asyncio-task.rst:1453
19231929
msgid "Changed to rescind pending cancellation requests upon reaching zero."
19241930
msgstr ""
19251931

1926-
#: ../../library/asyncio-task.rst:1455
1932+
#: ../../library/asyncio-task.rst:1458
19271933
msgid ""
19281934
"Return the number of pending cancellation requests to this Task, i.e., the "
19291935
"number of calls to :meth:`cancel` less the number of :meth:`uncancel` calls."
19301936
msgstr ""
19311937

1932-
#: ../../library/asyncio-task.rst:1459
1938+
#: ../../library/asyncio-task.rst:1462
19331939
msgid ""
19341940
"Note that if this number is greater than zero but the Task is still "
19351941
"executing, :meth:`cancelled` will still return ``False``. This is because "
@@ -1938,7 +1944,7 @@ msgid ""
19381944
"to zero."
19391945
msgstr ""
19401946

1941-
#: ../../library/asyncio-task.rst:1465
1947+
#: ../../library/asyncio-task.rst:1468
19421948
msgid ""
19431949
"This method is used by asyncio's internals and isn't expected to be used by "
19441950
"end-user code. See :meth:`uncancel` for more details."

0 commit comments

Comments
 (0)