7
7
msgstr ""
8
8
"Project-Id-Version : Python 3.12\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
- "POT-Creation-Date : 2023-07-17 17:39+0800 \n "
10
+ "POT-Creation-Date : 2024-04-22 00:04+0000 \n "
11
11
"PO-Revision-Date : 2018-05-23 16:17+0000\n "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -197,19 +197,20 @@ msgid ""
197
197
"searching the global namespace, i.e. the namespace of the module containing "
198
198
"the code block, and the builtins namespace, the namespace of the module :mod:"
199
199
"`builtins`. The global namespace is searched first. If the names are not "
200
- "found there, the builtins namespace is searched. The :keyword:`!global` "
201
- "statement must precede all uses of the listed names."
200
+ "found there, the builtins namespace is searched next. If the names are also "
201
+ "not found in the builtins namespace, new variables are created in the global "
202
+ "namespace. The global statement must precede all uses of the listed names."
202
203
msgstr ""
203
204
204
- #: ../../reference/executionmodel.rst:145
205
+ #: ../../reference/executionmodel.rst:146
205
206
msgid ""
206
207
"The :keyword:`global` statement has the same scope as a name binding "
207
208
"operation in the same block. If the nearest enclosing scope for a free "
208
209
"variable contains a global statement, the free variable is treated as a "
209
210
"global."
210
211
msgstr ""
211
212
212
- #: ../../reference/executionmodel.rst:151
213
+ #: ../../reference/executionmodel.rst:152
213
214
msgid ""
214
215
"The :keyword:`nonlocal` statement causes corresponding names to refer to "
215
216
"previously bound variables in the nearest enclosing function scope. :exc:"
@@ -218,13 +219,13 @@ msgid ""
218
219
"rebound with the :keyword:`!nonlocal` statement."
219
220
msgstr ""
220
221
221
- #: ../../reference/executionmodel.rst:159
222
+ #: ../../reference/executionmodel.rst:160
222
223
msgid ""
223
224
"The namespace for a module is automatically created the first time a module "
224
225
"is imported. The main module for a script is always called :mod:`__main__`."
225
226
msgstr ""
226
227
227
- #: ../../reference/executionmodel.rst:162
228
+ #: ../../reference/executionmodel.rst:163
228
229
msgid ""
229
230
"Class definition blocks and arguments to :func:`exec` and :func:`eval` are "
230
231
"special in the context of name resolution. A class definition is an "
@@ -239,15 +240,15 @@ msgid ""
239
240
"the following will fail::"
240
241
msgstr ""
241
242
242
- #: ../../reference/executionmodel.rst:179
243
+ #: ../../reference/executionmodel.rst:180
243
244
msgid "However, the following will succeed::"
244
245
msgstr ""
245
246
246
- #: ../../reference/executionmodel.rst:190
247
+ #: ../../reference/executionmodel.rst:191
247
248
msgid "Annotation scopes"
248
249
msgstr ""
249
250
250
- #: ../../reference/executionmodel.rst:192
251
+ #: ../../reference/executionmodel.rst:193
251
252
msgid ""
252
253
":ref:`Type parameter lists <type-params>` and :keyword:`type` statements "
253
254
"introduce *annotation scopes*, which behave mostly like function scopes, but "
@@ -256,44 +257,44 @@ msgid ""
256
257
"annotation scopes in Python 3.13 when :pep:`649` is implemented."
257
258
msgstr ""
258
259
259
- #: ../../reference/executionmodel.rst:198
260
+ #: ../../reference/executionmodel.rst:199
260
261
msgid "Annotation scopes are used in the following contexts:"
261
262
msgstr ""
262
263
263
- #: ../../reference/executionmodel.rst:200
264
+ #: ../../reference/executionmodel.rst:201
264
265
msgid ""
265
266
"Type parameter lists for :ref:`generic type aliases <generic-type-aliases>`."
266
267
msgstr ""
267
268
268
- #: ../../reference/executionmodel.rst:201
269
+ #: ../../reference/executionmodel.rst:202
269
270
msgid ""
270
271
"Type parameter lists for :ref:`generic functions <generic-functions>`. A "
271
272
"generic function's annotations are executed within the annotation scope, but "
272
273
"its defaults and decorators are not."
273
274
msgstr ""
274
275
275
- #: ../../reference/executionmodel.rst:204
276
+ #: ../../reference/executionmodel.rst:205
276
277
msgid ""
277
278
"Type parameter lists for :ref:`generic classes <generic-classes>`. A generic "
278
279
"class's base classes and keyword arguments are executed within the "
279
280
"annotation scope, but its decorators are not."
280
281
msgstr ""
281
282
282
- #: ../../reference/executionmodel.rst:207
283
+ #: ../../reference/executionmodel.rst:208
283
284
msgid ""
284
285
"The bounds and constraints for type variables (:ref:`lazily evaluated <lazy-"
285
286
"evaluation>`)."
286
287
msgstr ""
287
288
288
- #: ../../reference/executionmodel.rst:209
289
+ #: ../../reference/executionmodel.rst:210
289
290
msgid "The value of type aliases (:ref:`lazily evaluated <lazy-evaluation>`)."
290
291
msgstr ""
291
292
292
- #: ../../reference/executionmodel.rst:211
293
+ #: ../../reference/executionmodel.rst:212
293
294
msgid "Annotation scopes differ from function scopes in the following ways:"
294
295
msgstr ""
295
296
296
- #: ../../reference/executionmodel.rst:213
297
+ #: ../../reference/executionmodel.rst:214
297
298
msgid ""
298
299
"Annotation scopes have access to their enclosing class namespace. If an "
299
300
"annotation scope is immediately within a class scope, or within another "
@@ -304,39 +305,39 @@ msgid ""
304
305
"class scope."
305
306
msgstr ""
306
307
307
- #: ../../reference/executionmodel.rst:219
308
+ #: ../../reference/executionmodel.rst:220
308
309
msgid ""
309
310
"Expressions in annotation scopes cannot contain :keyword:`yield`, ``yield "
310
311
"from``, :keyword:`await`, or :token:`:= <python-grammar:"
311
312
"assignment_expression>` expressions. (These expressions are allowed in other "
312
313
"scopes contained within the annotation scope.)"
313
314
msgstr ""
314
315
315
- #: ../../reference/executionmodel.rst:223
316
+ #: ../../reference/executionmodel.rst:224
316
317
msgid ""
317
318
"Names defined in annotation scopes cannot be rebound with :keyword:"
318
319
"`nonlocal` statements in inner scopes. This includes only type parameters, "
319
320
"as no other syntactic elements that can appear within annotation scopes can "
320
321
"introduce new names."
321
322
msgstr ""
322
323
323
- #: ../../reference/executionmodel.rst:226
324
+ #: ../../reference/executionmodel.rst:227
324
325
msgid ""
325
326
"While annotation scopes have an internal name, that name is not reflected in "
326
327
"the :term:`__qualname__ <qualified name>` of objects defined within the "
327
328
"scope. Instead, the :attr:`!__qualname__` of such objects is as if the "
328
329
"object were defined in the enclosing scope."
329
330
msgstr ""
330
331
331
- #: ../../reference/executionmodel.rst:231
332
+ #: ../../reference/executionmodel.rst:232
332
333
msgid "Annotation scopes were introduced in Python 3.12 as part of :pep:`695`."
333
334
msgstr ""
334
335
335
- #: ../../reference/executionmodel.rst:237
336
+ #: ../../reference/executionmodel.rst:238
336
337
msgid "Lazy evaluation"
337
338
msgstr ""
338
339
339
- #: ../../reference/executionmodel.rst:239
340
+ #: ../../reference/executionmodel.rst:240
340
341
msgid ""
341
342
"The values of type aliases created through the :keyword:`type` statement are "
342
343
"*lazily evaluated*. The same applies to the bounds and constraints of type "
@@ -346,43 +347,43 @@ msgid ""
346
347
"resolve an attribute access."
347
348
msgstr ""
348
349
349
- #: ../../reference/executionmodel.rst:246
350
+ #: ../../reference/executionmodel.rst:247
350
351
msgid "Example:"
351
352
msgstr ""
352
353
353
- #: ../../reference/executionmodel.rst:262
354
+ #: ../../reference/executionmodel.rst:263
354
355
msgid ""
355
356
"Here the exception is raised only when the ``__value__`` attribute of the "
356
357
"type alias or the ``__bound__`` attribute of the type variable is accessed."
357
358
msgstr ""
358
359
359
- #: ../../reference/executionmodel.rst:266
360
+ #: ../../reference/executionmodel.rst:267
360
361
msgid ""
361
362
"This behavior is primarily useful for references to types that have not yet "
362
363
"been defined when the type alias or type variable is created. For example, "
363
364
"lazy evaluation enables creation of mutually recursive type aliases::"
364
365
msgstr ""
365
366
366
- #: ../../reference/executionmodel.rst:276
367
+ #: ../../reference/executionmodel.rst:277
367
368
msgid ""
368
369
"Lazily evaluated values are evaluated in :ref:`annotation scope <annotation-"
369
370
"scopes>`, which means that names that appear inside the lazily evaluated "
370
371
"value are looked up as if they were used in the immediately enclosing scope."
371
372
msgstr ""
372
373
373
- #: ../../reference/executionmodel.rst:285
374
+ #: ../../reference/executionmodel.rst:286
374
375
msgid "Builtins and restricted execution"
375
376
msgstr ""
376
377
377
- #: ../../reference/executionmodel.rst:291
378
+ #: ../../reference/executionmodel.rst:292
378
379
msgid ""
379
380
"Users should not touch ``__builtins__``; it is strictly an implementation "
380
381
"detail. Users wanting to override values in the builtins namespace should :"
381
382
"keyword:`import` the :mod:`builtins` module and modify its attributes "
382
383
"appropriately."
383
384
msgstr ""
384
385
385
- #: ../../reference/executionmodel.rst:296
386
+ #: ../../reference/executionmodel.rst:297
386
387
msgid ""
387
388
"The builtins namespace associated with the execution of a code block is "
388
389
"actually found by looking up the name ``__builtins__`` in its global "
@@ -393,17 +394,17 @@ msgid ""
393
394
"`builtins` module itself."
394
395
msgstr ""
395
396
396
- #: ../../reference/executionmodel.rst:308
397
+ #: ../../reference/executionmodel.rst:309
397
398
msgid "Interaction with dynamic features"
398
399
msgstr ""
399
400
400
- #: ../../reference/executionmodel.rst:310
401
+ #: ../../reference/executionmodel.rst:311
401
402
msgid ""
402
403
"Name resolution of free variables occurs at runtime, not at compile time. "
403
404
"This means that the following code will print 42::"
404
405
msgstr ""
405
406
406
- #: ../../reference/executionmodel.rst:321
407
+ #: ../../reference/executionmodel.rst:322
407
408
msgid ""
408
409
"The :func:`eval` and :func:`exec` functions do not have access to the full "
409
410
"environment for resolving names. Names may be resolved in the local and "
@@ -414,11 +415,11 @@ msgid ""
414
415
"for both."
415
416
msgstr ""
416
417
417
- #: ../../reference/executionmodel.rst:332
418
+ #: ../../reference/executionmodel.rst:333
418
419
msgid "Exceptions"
419
420
msgstr "例外"
420
421
421
- #: ../../reference/executionmodel.rst:343
422
+ #: ../../reference/executionmodel.rst:344
422
423
msgid ""
423
424
"Exceptions are a means of breaking out of the normal flow of control of a "
424
425
"code block in order to handle errors or other exceptional conditions. An "
@@ -427,7 +428,7 @@ msgid ""
427
428
"or indirectly invoked the code block where the error occurred."
428
429
msgstr ""
429
430
430
- #: ../../reference/executionmodel.rst:349
431
+ #: ../../reference/executionmodel.rst:350
431
432
msgid ""
432
433
"The Python interpreter raises an exception when it detects a run-time error "
433
434
"(such as division by zero). A Python program can also explicitly raise an "
@@ -438,23 +439,23 @@ msgid ""
438
439
"exception occurred or not in the preceding code."
439
440
msgstr ""
440
441
441
- #: ../../reference/executionmodel.rst:359
442
+ #: ../../reference/executionmodel.rst:360
442
443
msgid ""
443
444
"Python uses the \" termination\" model of error handling: an exception "
444
445
"handler can find out what happened and continue execution at an outer level, "
445
446
"but it cannot repair the cause of the error and retry the failing operation "
446
447
"(except by re-entering the offending piece of code from the top)."
447
448
msgstr ""
448
449
449
- #: ../../reference/executionmodel.rst:366
450
+ #: ../../reference/executionmodel.rst:367
450
451
msgid ""
451
452
"When an exception is not handled at all, the interpreter terminates "
452
453
"execution of the program, or returns to its interactive main loop. In "
453
454
"either case, it prints a stack traceback, except when the exception is :exc:"
454
455
"`SystemExit`."
455
456
msgstr ""
456
457
457
- #: ../../reference/executionmodel.rst:370
458
+ #: ../../reference/executionmodel.rst:371
458
459
msgid ""
459
460
"Exceptions are identified by class instances. The :keyword:`except` clause "
460
461
"is selected depending on the class of the instance: it must reference the "
@@ -463,25 +464,25 @@ msgid ""
463
464
"additional information about the exceptional condition."
464
465
msgstr ""
465
466
466
- #: ../../reference/executionmodel.rst:378
467
+ #: ../../reference/executionmodel.rst:379
467
468
msgid ""
468
469
"Exception messages are not part of the Python API. Their contents may "
469
470
"change from one version of Python to the next without warning and should not "
470
471
"be relied on by code which will run under multiple versions of the "
471
472
"interpreter."
472
473
msgstr ""
473
474
474
- #: ../../reference/executionmodel.rst:382
475
+ #: ../../reference/executionmodel.rst:383
475
476
msgid ""
476
477
"See also the description of the :keyword:`try` statement in section :ref:"
477
478
"`try` and :keyword:`raise` statement in section :ref:`raise`."
478
479
msgstr ""
479
480
480
- #: ../../reference/executionmodel.rst:387
481
+ #: ../../reference/executionmodel.rst:388
481
482
msgid "Footnotes"
482
483
msgstr "註解"
483
484
484
- #: ../../reference/executionmodel.rst:388
485
+ #: ../../reference/executionmodel.rst:389
485
486
msgid ""
486
487
"This limitation occurs because the code that is executed by these operations "
487
488
"is not available at the time the module is compiled."
@@ -499,7 +500,7 @@ msgstr "code(程式碼)"
499
500
msgid "block"
500
501
msgstr "block"
501
502
502
- #: ../../reference/executionmodel.rst:31 ../../reference/executionmodel.rst:287
503
+ #: ../../reference/executionmodel.rst:31 ../../reference/executionmodel.rst:288
503
504
msgid "execution"
504
505
msgstr "execution(執行)"
505
506
@@ -551,46 +552,46 @@ msgstr "NameError(內建例外)"
551
552
msgid "UnboundLocalError"
552
553
msgstr "UnboundLocalError"
553
554
554
- #: ../../reference/executionmodel.rst:157
555
+ #: ../../reference/executionmodel.rst:158
555
556
msgid "module"
556
557
msgstr "module(模組)"
557
558
558
- #: ../../reference/executionmodel.rst:157
559
+ #: ../../reference/executionmodel.rst:158
559
560
msgid "__main__"
560
561
msgstr "__main__"
561
562
562
- #: ../../reference/executionmodel.rst:287
563
+ #: ../../reference/executionmodel.rst:288
563
564
msgid "restricted"
564
565
msgstr "restricted(受限)"
565
566
566
- #: ../../reference/executionmodel.rst:334
567
+ #: ../../reference/executionmodel.rst:335
567
568
msgid "exception"
568
569
msgstr "exception(例外)"
569
570
570
- #: ../../reference/executionmodel.rst:336
571
+ #: ../../reference/executionmodel.rst:337
571
572
msgid "raise an exception"
572
573
msgstr "raise an exception(引發例外)"
573
574
574
- #: ../../reference/executionmodel.rst:336
575
+ #: ../../reference/executionmodel.rst:337
575
576
msgid "handle an exception"
576
577
msgstr "handle an exception(處理例外)"
577
578
578
- #: ../../reference/executionmodel.rst:336
579
+ #: ../../reference/executionmodel.rst:337
579
580
msgid "exception handler"
580
581
msgstr "exception handler(例外處理器)"
581
582
582
- #: ../../reference/executionmodel.rst:336
583
+ #: ../../reference/executionmodel.rst:337
583
584
msgid "errors"
584
585
msgstr "errors(錯誤)"
585
586
586
- #: ../../reference/executionmodel.rst:336
587
+ #: ../../reference/executionmodel.rst:337
587
588
msgid "error handling"
588
589
msgstr "error handling(錯誤處理)"
589
590
590
- #: ../../reference/executionmodel.rst:357
591
+ #: ../../reference/executionmodel.rst:358
591
592
msgid "termination model"
592
593
msgstr "termination model(終止模型)"
593
594
594
- #: ../../reference/executionmodel.rst:364
595
+ #: ../../reference/executionmodel.rst:365
595
596
msgid "SystemExit (built-in exception)"
596
597
msgstr "SystemExit(內建例外)"
0 commit comments