Skip to content

Commit 0211b0c

Browse files
sync with cpython 200af429
1 parent a0e5cac commit 0211b0c

26 files changed

+2293
-2179
lines changed

c-api/exceptions.po

+345-341
Large diffs are not rendered by default.

c-api/init_config.po

+420-420
Large diffs are not rendered by default.

c-api/module.po

+51-51
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.12\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2023-08-09 00:03+0000\n"
11+
"POT-Creation-Date: 2023-08-23 00:03+0000\n"
1212
"PO-Revision-Date: 2018-05-23 14:32+0000\n"
1313
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1414
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -373,27 +373,27 @@ msgid ""
373373
"*value* pointer of this slot must point to a function of the signature:"
374374
msgstr ""
375375

376-
#: ../../c-api/module.rst:342
376+
#: ../../c-api/module.rst:343
377377
msgid ""
378378
"The function receives a :py:class:`~importlib.machinery.ModuleSpec` "
379379
"instance, as defined in :PEP:`451`, and the module definition. It should "
380380
"return a new module object, or set an error and return ``NULL``."
381381
msgstr ""
382382

383-
#: ../../c-api/module.rst:347
383+
#: ../../c-api/module.rst:348
384384
msgid ""
385385
"This function should be kept minimal. In particular, it should not call "
386386
"arbitrary Python code, as trying to import the same module again may result "
387387
"in an infinite loop."
388388
msgstr ""
389389

390-
#: ../../c-api/module.rst:351
390+
#: ../../c-api/module.rst:352
391391
msgid ""
392392
"Multiple ``Py_mod_create`` slots may not be specified in one module "
393393
"definition."
394394
msgstr ""
395395

396-
#: ../../c-api/module.rst:354
396+
#: ../../c-api/module.rst:355
397397
msgid ""
398398
"If ``Py_mod_create`` is not specified, the import machinery will create a "
399399
"normal module object using :c:func:`PyModule_New`. The name is taken from "
@@ -402,7 +402,7 @@ msgid ""
402402
"through symlinks, all while sharing a single module definition."
403403
msgstr ""
404404

405-
#: ../../c-api/module.rst:360
405+
#: ../../c-api/module.rst:361
406406
msgid ""
407407
"There is no requirement for the returned object to be an instance of :c:type:"
408408
"`PyModule_Type`. Any type can be used, as long as it supports setting and "
@@ -412,107 +412,107 @@ msgid ""
412412
"``Py_mod_create``."
413413
msgstr ""
414414

415-
#: ../../c-api/module.rst:369
415+
#: ../../c-api/module.rst:370
416416
msgid ""
417417
"Specifies a function that is called to *execute* the module. This is "
418418
"equivalent to executing the code of a Python module: typically, this "
419419
"function adds classes and constants to the module. The signature of the "
420420
"function is:"
421421
msgstr ""
422422

423-
#: ../../c-api/module.rst:376
423+
#: ../../c-api/module.rst:378
424424
msgid ""
425425
"If multiple ``Py_mod_exec`` slots are specified, they are processed in the "
426426
"order they appear in the *m_slots* array."
427427
msgstr ""
428428

429-
#: ../../c-api/module.rst:381
429+
#: ../../c-api/module.rst:383
430430
msgid "Specifies one of the following values:"
431431
msgstr ""
432432

433-
#: ../../c-api/module.rst:385
433+
#: ../../c-api/module.rst:389
434434
msgid "The module does not support being imported in subinterpreters."
435435
msgstr ""
436436

437-
#: ../../c-api/module.rst:389
437+
#: ../../c-api/module.rst:393
438438
msgid ""
439439
"The module supports being imported in subinterpreters, but only when they "
440440
"share the main interpreter's GIL. (See :ref:`isolating-extensions-howto`.)"
441441
msgstr ""
442442

443-
#: ../../c-api/module.rst:395
443+
#: ../../c-api/module.rst:399
444444
msgid ""
445445
"The module supports being imported in subinterpreters, even when they have "
446446
"their own GIL. (See :ref:`isolating-extensions-howto`.)"
447447
msgstr ""
448448

449-
#: ../../c-api/module.rst:399
449+
#: ../../c-api/module.rst:403
450450
msgid ""
451451
"This slot determines whether or not importing this module in a "
452452
"subinterpreter will fail."
453453
msgstr ""
454454

455-
#: ../../c-api/module.rst:402
455+
#: ../../c-api/module.rst:406
456456
msgid ""
457457
"Multiple ``Py_mod_multiple_interpreters`` slots may not be specified in one "
458458
"module definition."
459459
msgstr ""
460460

461-
#: ../../c-api/module.rst:405
461+
#: ../../c-api/module.rst:409
462462
msgid ""
463463
"If ``Py_mod_multiple_interpreters`` is not specified, the import machinery "
464464
"defaults to ``Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED``."
465465
msgstr ""
466466

467-
#: ../../c-api/module.rst:410
467+
#: ../../c-api/module.rst:414
468468
msgid "See :PEP:`489` for more details on multi-phase initialization."
469469
msgstr ""
470470

471-
#: ../../c-api/module.rst:413
471+
#: ../../c-api/module.rst:417
472472
msgid "Low-level module creation functions"
473473
msgstr ""
474474

475-
#: ../../c-api/module.rst:415
475+
#: ../../c-api/module.rst:419
476476
msgid ""
477477
"The following functions are called under the hood when using multi-phase "
478478
"initialization. They can be used directly, for example when creating module "
479479
"objects dynamically. Note that both ``PyModule_FromDefAndSpec`` and "
480480
"``PyModule_ExecDef`` must be called to fully initialize a module."
481481
msgstr ""
482482

483-
#: ../../c-api/module.rst:422
483+
#: ../../c-api/module.rst:426
484484
msgid ""
485485
"Create a new module object, given the definition in *def* and the ModuleSpec "
486486
"*spec*. This behaves like :c:func:`PyModule_FromDefAndSpec2` with "
487487
"*module_api_version* set to :c:macro:`PYTHON_API_VERSION`."
488488
msgstr ""
489489

490-
#: ../../c-api/module.rst:430
490+
#: ../../c-api/module.rst:434
491491
msgid ""
492492
"Create a new module object, given the definition in *def* and the ModuleSpec "
493493
"*spec*, assuming the API version *module_api_version*. If that version does "
494494
"not match the version of the running interpreter, a :exc:`RuntimeWarning` is "
495495
"emitted."
496496
msgstr ""
497497

498-
#: ../../c-api/module.rst:437
498+
#: ../../c-api/module.rst:441
499499
msgid ""
500500
"Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` "
501501
"instead; only use this if you are sure you need it."
502502
msgstr ""
503503

504-
#: ../../c-api/module.rst:444
504+
#: ../../c-api/module.rst:448
505505
msgid "Process any execution slots (:c:data:`Py_mod_exec`) given in *def*."
506506
msgstr ""
507507

508-
#: ../../c-api/module.rst:450
508+
#: ../../c-api/module.rst:454
509509
msgid ""
510510
"Set the docstring for *module* to *docstring*. This function is called "
511511
"automatically when creating a module from ``PyModuleDef``, using either "
512512
"``PyModule_Create`` or ``PyModule_FromDefAndSpec``."
513513
msgstr ""
514514

515-
#: ../../c-api/module.rst:459
515+
#: ../../c-api/module.rst:463
516516
msgid ""
517517
"Add the functions from the ``NULL`` terminated *functions* array to "
518518
"*module*. Refer to the :c:type:`PyMethodDef` documentation for details on "
@@ -524,132 +524,132 @@ msgid ""
524524
"``PyModule_FromDefAndSpec``."
525525
msgstr ""
526526

527-
#: ../../c-api/module.rst:471
527+
#: ../../c-api/module.rst:475
528528
msgid "Support functions"
529529
msgstr ""
530530

531-
#: ../../c-api/module.rst:473
531+
#: ../../c-api/module.rst:477
532532
msgid ""
533533
"The module initialization function (if using single phase initialization) or "
534534
"a function called from a module execution slot (if using multi-phase "
535535
"initialization), can use the following functions to help initialize the "
536536
"module state:"
537537
msgstr ""
538538

539-
#: ../../c-api/module.rst:480
539+
#: ../../c-api/module.rst:484
540540
msgid ""
541541
"Add an object to *module* as *name*. This is a convenience function which "
542542
"can be used from the module's initialization function."
543543
msgstr ""
544544

545-
#: ../../c-api/module.rst:483
545+
#: ../../c-api/module.rst:487
546546
msgid ""
547547
"On success, return ``0``. On error, raise an exception and return ``-1``."
548548
msgstr ""
549549

550-
#: ../../c-api/module.rst:485
550+
#: ../../c-api/module.rst:489
551551
msgid ""
552552
"Return ``NULL`` if *value* is ``NULL``. It must be called with an exception "
553553
"raised in this case."
554554
msgstr ""
555555

556-
#: ../../c-api/module.rst:488 ../../c-api/module.rst:537
556+
#: ../../c-api/module.rst:492 ../../c-api/module.rst:541
557557
msgid "Example usage::"
558558
msgstr ""
559559
"用法範例:\n"
560560
"\n"
561561
"::"
562562

563-
#: ../../c-api/module.rst:502 ../../c-api/module.rst:555
563+
#: ../../c-api/module.rst:506 ../../c-api/module.rst:559
564564
msgid ""
565565
"The example can also be written without checking explicitly if *obj* is "
566566
"``NULL``::"
567567
msgstr ""
568568

569-
#: ../../c-api/module.rst:514 ../../c-api/module.rst:571
569+
#: ../../c-api/module.rst:518 ../../c-api/module.rst:575
570570
msgid ""
571571
"Note that ``Py_XDECREF()`` should be used instead of ``Py_DECREF()`` in this "
572572
"case, since *obj* can be ``NULL``."
573573
msgstr ""
574574

575-
#: ../../c-api/module.rst:522
575+
#: ../../c-api/module.rst:526
576576
msgid ""
577577
"Similar to :c:func:`PyModule_AddObjectRef`, but steals a reference to "
578578
"*value* on success (if it returns ``0``)."
579579
msgstr ""
580580

581-
#: ../../c-api/module.rst:525
581+
#: ../../c-api/module.rst:529
582582
msgid ""
583583
"The new :c:func:`PyModule_AddObjectRef` function is recommended, since it is "
584584
"easy to introduce reference leaks by misusing the :c:func:"
585585
"`PyModule_AddObject` function."
586586
msgstr ""
587587

588-
#: ../../c-api/module.rst:531
588+
#: ../../c-api/module.rst:535
589589
msgid ""
590590
"Unlike other functions that steal references, ``PyModule_AddObject()`` only "
591591
"releases the reference to *value* **on success**."
592592
msgstr ""
593593

594-
#: ../../c-api/module.rst:534
594+
#: ../../c-api/module.rst:538
595595
msgid ""
596596
"This means that its return value must be checked, and calling code must :c:"
597597
"func:`Py_DECREF` *value* manually on error."
598598
msgstr ""
599599

600-
#: ../../c-api/module.rst:577
600+
#: ../../c-api/module.rst:581
601601
msgid ""
602602
"Add an integer constant to *module* as *name*. This convenience function "
603603
"can be used from the module's initialization function. Return ``-1`` on "
604604
"error, ``0`` on success."
605605
msgstr ""
606606

607-
#: ../../c-api/module.rst:584
607+
#: ../../c-api/module.rst:588
608608
msgid ""
609609
"Add a string constant to *module* as *name*. This convenience function can "
610610
"be used from the module's initialization function. The string *value* must "
611611
"be ``NULL``-terminated. Return ``-1`` on error, ``0`` on success."
612612
msgstr ""
613613

614-
#: ../../c-api/module.rst:591
614+
#: ../../c-api/module.rst:595
615615
msgid ""
616616
"Add an int constant to *module*. The name and the value are taken from "
617617
"*macro*. For example ``PyModule_AddIntMacro(module, AF_INET)`` adds the int "
618618
"constant *AF_INET* with the value of *AF_INET* to *module*. Return ``-1`` on "
619619
"error, ``0`` on success."
620620
msgstr ""
621621

622-
#: ../../c-api/module.rst:599
622+
#: ../../c-api/module.rst:603
623623
msgid "Add a string constant to *module*."
624624
msgstr ""
625625

626-
#: ../../c-api/module.rst:603
626+
#: ../../c-api/module.rst:607
627627
msgid ""
628628
"Add a type object to *module*. The type object is finalized by calling "
629629
"internally :c:func:`PyType_Ready`. The name of the type object is taken from "
630630
"the last component of :c:member:`~PyTypeObject.tp_name` after dot. Return "
631631
"``-1`` on error, ``0`` on success."
632632
msgstr ""
633633

634-
#: ../../c-api/module.rst:613
634+
#: ../../c-api/module.rst:617
635635
msgid "Module lookup"
636636
msgstr ""
637637

638-
#: ../../c-api/module.rst:615
638+
#: ../../c-api/module.rst:619
639639
msgid ""
640640
"Single-phase initialization creates singleton modules that can be looked up "
641641
"in the context of the current interpreter. This allows the module object to "
642642
"be retrieved later with only a reference to the module definition."
643643
msgstr ""
644644

645-
#: ../../c-api/module.rst:619
645+
#: ../../c-api/module.rst:623
646646
msgid ""
647647
"These functions will not work on modules created using multi-phase "
648648
"initialization, since multiple such modules can be created from a single "
649649
"definition."
650650
msgstr ""
651651

652-
#: ../../c-api/module.rst:624
652+
#: ../../c-api/module.rst:628
653653
msgid ""
654654
"Returns the module object that was created from *def* for the current "
655655
"interpreter. This method requires that the module object has been attached "
@@ -658,18 +658,18 @@ msgid ""
658658
"to the interpreter state yet, it returns ``NULL``."
659659
msgstr ""
660660

661-
#: ../../c-api/module.rst:631
661+
#: ../../c-api/module.rst:635
662662
msgid ""
663663
"Attaches the module object passed to the function to the interpreter state. "
664664
"This allows the module object to be accessible via :c:func:"
665665
"`PyState_FindModule`."
666666
msgstr ""
667667

668-
#: ../../c-api/module.rst:634
668+
#: ../../c-api/module.rst:638
669669
msgid "Only effective on modules created using single-phase initialization."
670670
msgstr ""
671671

672-
#: ../../c-api/module.rst:636
672+
#: ../../c-api/module.rst:640
673673
msgid ""
674674
"Python calls ``PyState_AddModule`` automatically after importing a module, "
675675
"so it is unnecessary (but harmless) to call it from module initialization "
@@ -680,15 +680,15 @@ msgid ""
680680
"state updates)."
681681
msgstr ""
682682

683-
#: ../../c-api/module.rst:644 ../../c-api/module.rst:655
683+
#: ../../c-api/module.rst:648 ../../c-api/module.rst:659
684684
msgid "The caller must hold the GIL."
685685
msgstr ""
686686

687-
#: ../../c-api/module.rst:646
687+
#: ../../c-api/module.rst:650
688688
msgid "Return 0 on success or -1 on failure."
689689
msgstr ""
690690

691-
#: ../../c-api/module.rst:652
691+
#: ../../c-api/module.rst:656
692692
msgid ""
693693
"Removes the module object created from *def* from the interpreter state. "
694694
"Return 0 on success or -1 on failure."

c-api/unicode.po

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgid ""
99
msgstr ""
1010
"Project-Id-Version: Python 3.12\n"
1111
"Report-Msgid-Bugs-To: \n"
12-
"POT-Creation-Date: 2023-08-09 00:03+0000\n"
12+
"POT-Creation-Date: 2023-08-23 00:03+0000\n"
1313
"PO-Revision-Date: 2018-05-23 14:08+0000\n"
1414
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1515
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1538,7 +1538,7 @@ msgstr ""
15381538
msgid ""
15391539
"Encode the Unicode object using the specified code page and return a Python "
15401540
"bytes object. Return ``NULL`` if an exception was raised by the codec. Use :"
1541-
"c:macro:`CP_ACP` code page to get the MBCS encoder."
1541+
"c:macro:`!CP_ACP` code page to get the MBCS encoder."
15421542
msgstr ""
15431543

15441544
#: ../../c-api/unicode.rst:1308

0 commit comments

Comments
 (0)