66msgstr ""
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 <adrianliaw2000@gmail.com>\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
17811781msgid ""
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`` ."
17841784msgstr ""
17851785
17861786#: ../../library/asyncio-task.rst:1342
17871787msgid ""
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."
17961802msgstr ""
17971803
1798- #: ../../library/asyncio-task.rst:1352
1804+ #: ../../library/asyncio-task.rst:1355
17991805msgid "Added the *msg* parameter."
18001806msgstr "新增 *msg* 參數。"
18011807
1802- #: ../../library/asyncio-task.rst:1355
1808+ #: ../../library/asyncio-task.rst:1358
18031809msgid "The ``msg`` parameter is propagated from cancelled task to its awaiter."
18041810msgstr ""
18051811
1806- #: ../../library/asyncio-task.rst:1360
1812+ #: ../../library/asyncio-task.rst:1363
18071813msgid ""
18081814"The following example illustrates how coroutines can intercept the "
18091815"cancellation request::"
18101816msgstr ""
18111817
1812- #: ../../library/asyncio-task.rst:1363
1818+ #: ../../library/asyncio-task.rst:1366
18131819msgid ""
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"
18471853msgstr ""
18481854
1849- #: ../../library/asyncio-task.rst:1399
1855+ #: ../../library/asyncio-task.rst:1402
18501856msgid "Return ``True`` if the Task is *cancelled*."
18511857msgstr ""
18521858
1853- #: ../../library/asyncio-task.rst:1401
1859+ #: ../../library/asyncio-task.rst:1404
18541860msgid ""
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."
18581864msgstr ""
18591865
1860- #: ../../library/asyncio-task.rst:1407
1866+ #: ../../library/asyncio-task.rst:1410
18611867msgid "Decrement the count of cancellation requests to this Task."
18621868msgstr ""
18631869
1864- #: ../../library/asyncio-task.rst:1409
1870+ #: ../../library/asyncio-task.rst:1412
18651871msgid "Returns the remaining number of cancellation requests."
18661872msgstr ""
18671873
1868- #: ../../library/asyncio-task.rst:1411
1874+ #: ../../library/asyncio-task.rst:1414
18691875msgid ""
18701876"Note that once execution of a cancelled task completed, further calls to :"
18711877"meth:`uncancel` are ineffective."
18721878msgstr ""
18731879
1874- #: ../../library/asyncio-task.rst:1416
1880+ #: ../../library/asyncio-task.rst:1419
18751881msgid ""
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::"
18811887msgstr ""
18821888
1883- #: ../../library/asyncio-task.rst:1423
1889+ #: ../../library/asyncio-task.rst:1426
18841890msgid ""
18851891"async def make_request_with_timeout():\n"
18861892" try:\n"
@@ -1894,7 +1900,7 @@ msgid ""
18941900" await unrelated_code()"
18951901msgstr ""
18961902
1897- #: ../../library/asyncio-task.rst:1434
1903+ #: ../../library/asyncio-task.rst:1437
18981904msgid ""
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."
19041910msgstr ""
19051911
1906- #: ../../library/asyncio-task.rst:1440
1912+ #: ../../library/asyncio-task.rst:1443
19071913msgid ""
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."
19111917msgstr ""
19121918
1913- #: ../../library/asyncio-task.rst:1444
1919+ #: ../../library/asyncio-task.rst:1447
19141920msgid ""
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)."
19201926msgstr ""
19211927
1922- #: ../../library/asyncio-task.rst:1450
1928+ #: ../../library/asyncio-task.rst:1453
19231929msgid "Changed to rescind pending cancellation requests upon reaching zero."
19241930msgstr ""
19251931
1926- #: ../../library/asyncio-task.rst:1455
1932+ #: ../../library/asyncio-task.rst:1458
19271933msgid ""
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."
19301936msgstr ""
19311937
1932- #: ../../library/asyncio-task.rst:1459
1938+ #: ../../library/asyncio-task.rst:1462
19331939msgid ""
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."
19391945msgstr ""
19401946
1941- #: ../../library/asyncio-task.rst:1465
1947+ #: ../../library/asyncio-task.rst:1468
19421948msgid ""
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