@@ -771,7 +771,7 @@ msgstr ""
771
771
msgid ""
772
772
"Return the official copyright string for the current Python version, for "
773
773
"example"
774
- msgstr ""
774
+ msgstr "返回当前 Python 版本的官方版权字符串,例如 "
775
775
776
776
#: ../../c-api/init.rst:523
777
777
msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``"
@@ -812,27 +812,35 @@ msgid ""
812
812
"empty string. If this function fails to initialize :data:`sys.argv`, a "
813
813
"fatal condition is signalled using :c:func:`Py_FatalError`."
814
814
msgstr ""
815
+ "根据 *argc* 和 *argv* 设置 :data:`sys.argv`。 这些形参与传给程序的 :c:func:`main` "
816
+ "函数的类似,区别在于第一项应当指向要执行的脚本文件而不是 Python 解释器对应的可执行文件。 如果没有要运行的脚本,则 *argv* "
817
+ "中的第一项可以为空字符串。 如果此函数无法初始化 :data:`sys.argv`,则将使用 :c:func:`Py_FatalError` "
818
+ "发出严重情况信号。"
815
819
816
820
#: ../../c-api/init.rst:574
817
821
msgid ""
818
822
"If *updatepath* is zero, this is all the function does. If *updatepath* is "
819
823
"non-zero, the function also modifies :data:`sys.path` according to the "
820
824
"following algorithm:"
821
825
msgstr ""
826
+ "如果 *updatepath* 为零,此函数将完成操作。 如果 *updatepath* 为非零值,则此函数还将根据以下算法修改 "
827
+ ":data:`sys.path`:"
822
828
823
829
#: ../../c-api/init.rst:578
824
830
msgid ""
825
831
"If the name of an existing script is passed in ``argv[0]``, the absolute "
826
832
"path of the directory where the script is located is prepended to "
827
833
":data:`sys.path`."
828
- msgstr ""
834
+ msgstr "如果在 ``argv[0]`` 中传入一个现有脚本,则脚本所在目录的绝对路径将被添加到 :data:`sys.path` 的开头。 "
829
835
830
836
#: ../../c-api/init.rst:581
831
837
msgid ""
832
838
"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an "
833
839
"existing file name), an empty string is prepended to :data:`sys.path`, which"
834
840
" is the same as prepending the current working directory (``\" .\" ``)."
835
841
msgstr ""
842
+ "在其他情况下 (也就是说,如果 *argc* 为 ``0`` 或 ``argv[0]`` 未指向现有文件名),则将在 :data:`sys.path` "
843
+ "的开头添加一个空字符串,这等价于添加当前工作目录 (``\" .\" ``)。"
836
844
837
845
#: ../../c-api/init.rst:590
838
846
msgid ""
@@ -841,13 +849,18 @@ msgid ""
841
849
"and update :data:`sys.path` themselves if desired. See `CVE-2008-5983 "
842
850
"<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_."
843
851
msgstr ""
852
+ "建议在出于执行单个脚本以外的目的嵌入 Python 解释器的应用程序传入 ``0`` 作为 *updatepath*,并在需要时更新 "
853
+ ":data:`sys.path` 本身。 参见 `CVE-2008-5983 <https://cve.mitre.org/cgi-"
854
+ "bin/cvename.cgi?name=CVE-2008-5983>`_。"
844
855
845
856
#: ../../c-api/init.rst:595
846
857
msgid ""
847
858
"On versions before 3.1.3, you can achieve the same effect by manually "
848
859
"popping the first :data:`sys.path` element after having called "
849
860
":c:func:`PySys_SetArgv`, for example using::"
850
861
msgstr ""
862
+ "在 3.1.3 之前的版本中,你可以通过在调用 :c:func:`PySys_SetArgv` 之后手动弹出第一个 :data:`sys.path` "
863
+ "元素,例如使用::"
851
864
852
865
#: ../../c-api/init.rst:609
853
866
msgid ""
0 commit comments