@@ -12,7 +12,7 @@ msgid ""
12
12
msgstr ""
13
13
"Project-Id-Version : Python 3.10\n "
14
14
"Report-Msgid-Bugs-To : \n "
15
- "POT-Creation-Date : 2023-09-01 15:12 +0000\n "
15
+ "POT-Creation-Date : 2023-09-08 15:14 +0000\n "
16
16
"PO-Revision-Date : 2022-11-05 17:21+0000\n "
17
17
"Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2023\n "
18
18
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -371,13 +371,13 @@ msgstr ""
371
371
msgid ""
372
372
"Set by the :option:`-s` and :option:`-I` options, and the "
373
373
":envvar:`PYTHONNOUSERSITE` environment variable."
374
- msgstr ""
374
+ msgstr "由 :option:`-s` 和 :option:`-I` 选项以及 :envvar:`PYTHONNOUSERSITE` 环境变量设置。 "
375
375
376
376
#: ../../c-api/init.rst:196
377
377
msgid ""
378
378
"Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment "
379
379
"variable."
380
- msgstr ""
380
+ msgstr "由 :option:`-O` 选项和 :envvar:`PYTHONOPTIMIZE` 环境变量设置。 "
381
381
382
382
#: ../../c-api/init.rst:201
383
383
msgid ""
@@ -396,7 +396,7 @@ msgstr "强制 stdout 和 stderr 流不带缓冲。"
396
396
msgid ""
397
397
"Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` "
398
398
"environment variable."
399
- msgstr ""
399
+ msgstr "由 :option:`-u` 选项和 :envvar:`PYTHONUNBUFFERED` 环境变量设置。 "
400
400
401
401
#: ../../c-api/init.rst:216
402
402
msgid ""
@@ -405,12 +405,14 @@ msgid ""
405
405
"to ``2``, print a message for each file that is checked for when searching "
406
406
"for a module. Also provides information on module cleanup at exit."
407
407
msgstr ""
408
+ "每次初始化模块时打印一条消息,显示加载模块的位置(文件名或内置模块)。 如果大于或等于 ``2``,则为搜索模块时检查的每个文件打印一条消息。 "
409
+ "此外还会在退出时提供模块清理信息。"
408
410
409
411
#: ../../c-api/init.rst:221
410
412
msgid ""
411
413
"Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment "
412
414
"variable."
413
- msgstr ""
415
+ msgstr "由 :option:`-v` 选项和 :envvar:`PYTHONVERBOSE` 环境变量设置。 "
414
416
415
417
#: ../../c-api/init.rst:226
416
418
msgid "Initializing and finalizing the interpreter"
@@ -422,6 +424,8 @@ msgid ""
422
424
"this should be called before using any other Python/C API functions; see "
423
425
":ref:`Before Python Initialization <pre-init-safe>` for the few exceptions."
424
426
msgstr ""
427
+ "初始化 Python 解释器。 在嵌入 Python 的应用程序中,它应当在使用任何其他 Python/C API 函数之前被调用;请参阅 "
428
+ ":ref:`在 Python 初始化之前 <pre-init-safe>` 了解少数的例外情况。"
425
429
426
430
#: ../../c-api/init.rst:248
427
431
msgid ""
@@ -432,6 +436,10 @@ msgid ""
432
436
"called for a second time (without calling :c:func:`Py_FinalizeEx` first). "
433
437
"There is no return value; it is a fatal error if the initialization fails."
434
438
msgstr ""
439
+ "这将初始化已加载模块表 (``sys.modules``),并创建基本模块 :mod:`builtins`、:mod:`__main__` 和 "
440
+ ":mod:`sys`。 它还会初始化模块搜索路径 (``sys.path``)。 它不会设置 ``sys.argv``;如有需要请使用 "
441
+ ":c:func:`PySys_SetArgvEx`。 当第二次调用时 (在未事先调用 :c:func:`Py_FinalizeEx` 的情况下) "
442
+ "将不会执行任何操作。 它没有返回值;如果初始化失败则会发生致命错误。"
435
443
436
444
#: ../../c-api/init.rst:257
437
445
msgid ""
@@ -447,13 +455,17 @@ msgid ""
447
455
"*initsigs* is ``0``, it skips initialization registration of signal "
448
456
"handlers, which might be useful when Python is embedded."
449
457
msgstr ""
458
+ "如果 *initsigs* 为 ``1`` 则该函数的工作方式与 :c:func:`Py_Initialize` 类似。 如果 *initsigs* 为"
459
+ " ``0``,它将跳过信号处理句柄的初始化注册,这在嵌入 Python 时可能会很有用处。"
450
460
451
461
#: ../../c-api/init.rst:270
452
462
msgid ""
453
463
"Return true (nonzero) when the Python interpreter has been initialized, "
454
464
"false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns "
455
465
"false until :c:func:`Py_Initialize` is called again."
456
466
msgstr ""
467
+ "如果 Python 解释器已初始化,则返回真值(非零);否则返回假值(零)。 在调用 :c:func:`Py_FinalizeEx` "
468
+ "之后,此函数将返回假值直到 :c:func:`Py_Initialize` 再次被调用。"
457
469
458
470
#: ../../c-api/init.rst:277
459
471
msgid ""
@@ -466,6 +478,10 @@ msgid ""
466
478
"Normally the return value is ``0``. If there were errors during "
467
479
"finalization (flushing buffered data), ``-1`` is returned."
468
480
msgstr ""
481
+ "撤销 :c:func:`Py_Initialize` 所做的所有初始化操作和后续对 Python/C API 函数的使用,并销毁自上次调用 "
482
+ ":c:func:`Py_Initialize` 以来创建但尚未销毁的所有子解释器(参见下文 :c:func:`Py_NewInterpreter` "
483
+ "一节)。 在理想情况下,这会释放 Python 解释器分配的所有内存。 当第二次调用时(在未再次调用 :c:func:`Py_Initialize` "
484
+ "的情况下),这将不执行任何操作。 正常情况下返回值是 ``0``。 如果在最终化(刷新缓冲数据)过程中出现错误,则返回 ``-1``。"
469
485
470
486
#: ../../c-api/init.rst:286
471
487
msgid ""
@@ -499,41 +515,46 @@ msgid ""
499
515
"Raises an :ref:`auditing event <auditing>` "
500
516
"``cpython._PySys_ClearAuditHooks`` with no arguments."
501
517
msgstr ""
518
+ "引发一个 :ref:`审计事件 <auditing>` ``cpython._PySys_ClearAuditHooks``,不附带任何参数。"
502
519
503
520
#: ../../c-api/init.rst:311
504
521
msgid ""
505
522
"This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that "
506
523
"disregards the return value."
507
- msgstr ""
524
+ msgstr "这是一个不考虑返回值的 :c:func:`Py_FinalizeEx` 的向下兼容版本。 "
508
525
509
526
#: ../../c-api/init.rst:316
510
527
msgid "Process-wide parameters"
511
- msgstr ""
528
+ msgstr "进程级参数 "
512
529
513
530
#: ../../c-api/init.rst:326
514
531
msgid ""
515
532
"This function should be called before :c:func:`Py_Initialize`, if it is "
516
533
"called at all. It specifies which encoding and error handling to use with "
517
534
"standard IO, with the same meanings as in :func:`str.encode`."
518
535
msgstr ""
536
+ "如果要调用该函数,应当在 :c:func:`Py_Initialize` 之前调用。 它指定了标准 IO 使用的编码格式和错误处理方式,其含义与 "
537
+ ":func:`str.encode` 中的相同。"
519
538
520
539
#: ../../c-api/init.rst:330
521
540
msgid ""
522
541
"It overrides :envvar:`PYTHONIOENCODING` values, and allows embedding code to"
523
542
" control IO encoding when the environment variable does not work."
524
- msgstr ""
543
+ msgstr "它覆盖了 :envvar:`PYTHONIOENCODING` 的值,并允许嵌入代码以便在环境变量不起作用时控制 IO 编码格式。 "
525
544
526
545
#: ../../c-api/init.rst:333
527
546
msgid ""
528
547
"*encoding* and/or *errors* may be ``NULL`` to use :envvar:`PYTHONIOENCODING`"
529
548
" and/or default values (depending on other settings)."
530
549
msgstr ""
550
+ "*encoding* 和/或 *errors* 可以为 ``NULL`` 以使用 :envvar:`PYTHONIOENCODING` "
551
+ "和/或默认值(取决于其他设置)。"
531
552
532
553
#: ../../c-api/init.rst:337
533
554
msgid ""
534
555
"Note that :data:`sys.stderr` always uses the \" backslashreplace\" error "
535
556
"handler, regardless of this (or any other) setting."
536
- msgstr ""
557
+ msgstr "请注意无论是否有此设置(或任何其他设置),:data:`sys.stderr` 都会使用 \" backslashreplace \" 错误处理句柄。 "
537
558
538
559
#: ../../c-api/init.rst:340
539
560
msgid ""
0 commit comments