7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.11\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2022-11-26 00:17 +0000\n "
10
+ "POT-Creation-Date : 2023-01-01 00:18 +0000\n "
11
11
"PO-Revision-Date : 2018-05-23 16:17+0000\n "
12
12
"Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com>\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -3344,14 +3344,22 @@ msgid ""
3344
3344
msgstr ""
3345
3345
3346
3346
#: ../../reference/datamodel.rst:2955
3347
+ msgid ""
3348
+ "The language doesn't place any restriction on the type or value of the "
3349
+ "objects yielded by the iterator returned by ``__await__``, as this is "
3350
+ "specific to the implementation of the asynchronous execution framework (e."
3351
+ "g. :mod:`asyncio`) that will be managing the :term:`awaitable` object."
3352
+ msgstr ""
3353
+
3354
+ #: ../../reference/datamodel.rst:2963
3347
3355
msgid ":pep:`492` for additional information about awaitable objects."
3348
3356
msgstr ""
3349
3357
3350
- #: ../../reference/datamodel.rst:2961
3358
+ #: ../../reference/datamodel.rst:2969
3351
3359
msgid "Coroutine Objects"
3352
3360
msgstr ""
3353
3361
3354
- #: ../../reference/datamodel.rst:2963
3362
+ #: ../../reference/datamodel.rst:2971
3355
3363
msgid ""
3356
3364
":term:`Coroutine objects <coroutine>` are :term:`awaitable` objects. A "
3357
3365
"coroutine's execution can be controlled by calling :meth:`~object.__await__` "
@@ -3362,18 +3370,18 @@ msgid ""
3362
3370
"should not directly raise unhandled :exc:`StopIteration` exceptions."
3363
3371
msgstr ""
3364
3372
3365
- #: ../../reference/datamodel.rst:2971
3373
+ #: ../../reference/datamodel.rst:2979
3366
3374
msgid ""
3367
3375
"Coroutines also have the methods listed below, which are analogous to those "
3368
3376
"of generators (see :ref:`generator-methods`). However, unlike generators, "
3369
3377
"coroutines do not directly support iteration."
3370
3378
msgstr ""
3371
3379
3372
- #: ../../reference/datamodel.rst:2975
3380
+ #: ../../reference/datamodel.rst:2983
3373
3381
msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once."
3374
3382
msgstr ""
3375
3383
3376
- #: ../../reference/datamodel.rst:2981
3384
+ #: ../../reference/datamodel.rst:2989
3377
3385
msgid ""
3378
3386
"Starts or resumes execution of the coroutine. If *value* is ``None``, this "
3379
3387
"is equivalent to advancing the iterator returned by :meth:`~object."
@@ -3384,7 +3392,7 @@ msgid ""
3384
3392
"value, described above."
3385
3393
msgstr ""
3386
3394
3387
- #: ../../reference/datamodel.rst:2992
3395
+ #: ../../reference/datamodel.rst:3000
3388
3396
msgid ""
3389
3397
"Raises the specified exception in the coroutine. This method delegates to "
3390
3398
"the :meth:`~generator.throw` method of the iterator that caused the "
@@ -3395,7 +3403,7 @@ msgid ""
3395
3403
"not caught in the coroutine, it propagates back to the caller."
3396
3404
msgstr ""
3397
3405
3398
- #: ../../reference/datamodel.rst:3003
3406
+ #: ../../reference/datamodel.rst:3011
3399
3407
msgid ""
3400
3408
"Causes the coroutine to clean itself up and exit. If the coroutine is "
3401
3409
"suspended, this method first delegates to the :meth:`~generator.close` "
@@ -3405,115 +3413,115 @@ msgid ""
3405
3413
"is marked as having finished executing, even if it was never started."
3406
3414
msgstr ""
3407
3415
3408
- #: ../../reference/datamodel.rst:3011
3416
+ #: ../../reference/datamodel.rst:3019
3409
3417
msgid ""
3410
3418
"Coroutine objects are automatically closed using the above process when they "
3411
3419
"are about to be destroyed."
3412
3420
msgstr ""
3413
3421
3414
- #: ../../reference/datamodel.rst:3017
3422
+ #: ../../reference/datamodel.rst:3025
3415
3423
msgid "Asynchronous Iterators"
3416
3424
msgstr ""
3417
3425
3418
- #: ../../reference/datamodel.rst:3019
3426
+ #: ../../reference/datamodel.rst:3027
3419
3427
msgid ""
3420
3428
"An *asynchronous iterator* can call asynchronous code in its ``__anext__`` "
3421
3429
"method."
3422
3430
msgstr ""
3423
3431
3424
- #: ../../reference/datamodel.rst:3022
3432
+ #: ../../reference/datamodel.rst:3030
3425
3433
msgid ""
3426
3434
"Asynchronous iterators can be used in an :keyword:`async for` statement."
3427
3435
msgstr ""
3428
3436
3429
- #: ../../reference/datamodel.rst:3026
3437
+ #: ../../reference/datamodel.rst:3034
3430
3438
msgid "Must return an *asynchronous iterator* object."
3431
3439
msgstr ""
3432
3440
3433
- #: ../../reference/datamodel.rst:3030
3441
+ #: ../../reference/datamodel.rst:3038
3434
3442
msgid ""
3435
3443
"Must return an *awaitable* resulting in a next value of the iterator. "
3436
3444
"Should raise a :exc:`StopAsyncIteration` error when the iteration is over."
3437
3445
msgstr ""
3438
3446
3439
- #: ../../reference/datamodel.rst:3033
3447
+ #: ../../reference/datamodel.rst:3041
3440
3448
msgid "An example of an asynchronous iterable object::"
3441
3449
msgstr ""
3442
3450
3443
- #: ../../reference/datamodel.rst:3050
3451
+ #: ../../reference/datamodel.rst:3058
3444
3452
msgid ""
3445
3453
"Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* "
3446
3454
"that would resolve to an :term:`asynchronous iterator <asynchronous "
3447
3455
"iterator>`."
3448
3456
msgstr ""
3449
3457
3450
- #: ../../reference/datamodel.rst:3055
3458
+ #: ../../reference/datamodel.rst:3063
3451
3459
msgid ""
3452
3460
"Starting with Python 3.7, :meth:`~object.__aiter__` must return an "
3453
3461
"asynchronous iterator object. Returning anything else will result in a :exc:"
3454
3462
"`TypeError` error."
3455
3463
msgstr ""
3456
3464
3457
- #: ../../reference/datamodel.rst:3063
3465
+ #: ../../reference/datamodel.rst:3071
3458
3466
msgid "Asynchronous Context Managers"
3459
3467
msgstr ""
3460
3468
3461
- #: ../../reference/datamodel.rst:3065
3469
+ #: ../../reference/datamodel.rst:3073
3462
3470
msgid ""
3463
3471
"An *asynchronous context manager* is a *context manager* that is able to "
3464
3472
"suspend execution in its ``__aenter__`` and ``__aexit__`` methods."
3465
3473
msgstr ""
3466
3474
3467
- #: ../../reference/datamodel.rst:3068
3475
+ #: ../../reference/datamodel.rst:3076
3468
3476
msgid ""
3469
3477
"Asynchronous context managers can be used in an :keyword:`async with` "
3470
3478
"statement."
3471
3479
msgstr ""
3472
3480
3473
- #: ../../reference/datamodel.rst:3072
3481
+ #: ../../reference/datamodel.rst:3080
3474
3482
msgid ""
3475
3483
"Semantically similar to :meth:`__enter__`, the only difference being that it "
3476
3484
"must return an *awaitable*."
3477
3485
msgstr ""
3478
3486
3479
- #: ../../reference/datamodel.rst:3077
3487
+ #: ../../reference/datamodel.rst:3085
3480
3488
msgid ""
3481
3489
"Semantically similar to :meth:`__exit__`, the only difference being that it "
3482
3490
"must return an *awaitable*."
3483
3491
msgstr ""
3484
3492
3485
- #: ../../reference/datamodel.rst:3080
3493
+ #: ../../reference/datamodel.rst:3088
3486
3494
msgid "An example of an asynchronous context manager class::"
3487
3495
msgstr ""
3488
3496
3489
- #: ../../reference/datamodel.rst:3093
3497
+ #: ../../reference/datamodel.rst:3101
3490
3498
msgid "Footnotes"
3491
3499
msgstr "註解"
3492
3500
3493
- #: ../../reference/datamodel.rst:3094
3501
+ #: ../../reference/datamodel.rst:3102
3494
3502
msgid ""
3495
3503
"It *is* possible in some cases to change an object's type, under certain "
3496
3504
"controlled conditions. It generally isn't a good idea though, since it can "
3497
3505
"lead to some very strange behaviour if it is handled incorrectly."
3498
3506
msgstr ""
3499
3507
3500
- #: ../../reference/datamodel.rst:3098
3508
+ #: ../../reference/datamodel.rst:3106
3501
3509
msgid ""
3502
3510
"The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object."
3503
3511
"__reversed__`, and :meth:`~object.__contains__` methods have special "
3504
3512
"handling for this; others will still raise a :exc:`TypeError`, but may do so "
3505
3513
"by relying on the behavior that ``None`` is not callable."
3506
3514
msgstr ""
3507
3515
3508
- #: ../../reference/datamodel.rst:3104
3516
+ #: ../../reference/datamodel.rst:3112
3509
3517
msgid ""
3510
3518
"\" Does not support\" here means that the class has no such method, or the "
3511
3519
"method returns ``NotImplemented``. Do not set the method to ``None`` if you "
3512
3520
"want to force fallback to the right operand's reflected method—that will "
3513
3521
"instead have the opposite effect of explicitly *blocking* such fallback."
3514
3522
msgstr ""
3515
3523
3516
- #: ../../reference/datamodel.rst:3110
3524
+ #: ../../reference/datamodel.rst:3118
3517
3525
msgid ""
3518
3526
"For operands of the same type, it is assumed that if the non-reflected "
3519
3527
"method -- such as :meth:`~object.__add__` -- fails then the overall "
0 commit comments