@@ -775,12 +775,15 @@ msgid ""
775775"into static storage; the caller should not modify its value. The value is "
776776"available to Python code as ``sys.platform``."
777777msgstr ""
778+ "返回当前平台的平台标识符。 在 Unix 上,这将以操作系统的“官方”名称为基础,转换为小写形式,再加上主版本号;例如,对于 Solaris "
779+ "2.x,或称 SunOS 5.x,该值将为 ``'sunos5'``。 在 macOS 上,它将为 ``'darwin'``。 在 Windows "
780+ "上它将为 ``'win'``。 返回的字符串指向静态存储;调用方不应修改其值。 Python 代码可通过 ``sys.platform`` 获取该值。"
778781
779782#: ../../c-api/init.rst:521
780783msgid ""
781784"Return the official copyright string for the current Python version, for "
782785"example"
783- msgstr ""
786+ msgstr "返回当前 Python 版本的官方版权字符串,例如 "
784787
785788#: ../../c-api/init.rst:523
786789msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``"
@@ -821,27 +824,35 @@ msgid ""
821824"empty string. If this function fails to initialize :data:`sys.argv`, a "
822825"fatal condition is signalled using :c:func:`Py_FatalError`."
823826msgstr ""
827+ "根据 *argc* 和 *argv* 设置 :data:`sys.argv`。 这些形参与传给程序的 :c:func:`main` "
828+ "函数的类似,区别在于第一项应当指向要执行的脚本文件而不是 Python 解释器对应的可执行文件。 如果没有要运行的脚本,则 *argv* "
829+ "中的第一项可以为空字符串。 如果此函数无法初始化 :data:`sys.argv`,则将使用 :c:func:`Py_FatalError` "
830+ "发出严重情况信号。"
824831
825832#: ../../c-api/init.rst:574
826833msgid ""
827834"If *updatepath* is zero, this is all the function does. If *updatepath* is "
828835"non-zero, the function also modifies :data:`sys.path` according to the "
829836"following algorithm:"
830837msgstr ""
838+ "如果 *updatepath* 为零,此函数将完成操作。 如果 *updatepath* 为非零值,则此函数还将根据以下算法修改 "
839+ ":data:`sys.path`:"
831840
832841#: ../../c-api/init.rst:578
833842msgid ""
834843"If the name of an existing script is passed in ``argv[0]``, the absolute "
835844"path of the directory where the script is located is prepended to "
836845":data:`sys.path`."
837- msgstr ""
846+ msgstr "如果在 ``argv[0]`` 中传入一个现有脚本,则脚本所在目录的绝对路径将被添加到 :data:`sys.path` 的开头。 "
838847
839848#: ../../c-api/init.rst:581
840849msgid ""
841850"Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an "
842851"existing file name), an empty string is prepended to :data:`sys.path`, which"
843852" is the same as prepending the current working directory (``\" .\" ``)."
844853msgstr ""
854+ "在其他情况下 (也就是说,如果 *argc* 为 ``0`` 或 ``argv[0]`` 未指向现有文件名),则将在 :data:`sys.path` "
855+ "的开头添加一个空字符串,这等价于添加当前工作目录 (``\" .\" ``)。"
845856
846857#: ../../c-api/init.rst:590
847858msgid ""
@@ -850,13 +861,18 @@ msgid ""
850861"and update :data:`sys.path` themselves if desired. See `CVE-2008-5983 "
851862"<https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_."
852863msgstr ""
864+ "建议在出于执行单个脚本以外的目的嵌入 Python 解释器的应用程序传入 ``0`` 作为 *updatepath*,并在需要时更新 "
865+ ":data:`sys.path` 本身。 参见 `CVE-2008-5983 <https://cve.mitre.org/cgi-"
866+ "bin/cvename.cgi?name=CVE-2008-5983>`_。"
853867
854868#: ../../c-api/init.rst:595
855869msgid ""
856870"On versions before 3.1.3, you can achieve the same effect by manually "
857871"popping the first :data:`sys.path` element after having called "
858872":c:func:`PySys_SetArgv`, for example using::"
859873msgstr ""
874+ "在 3.1.3 之前的版本中,你可以通过在调用 :c:func:`PySys_SetArgv` 之后手动弹出第一个 :data:`sys.path` "
875+ "元素,例如使用::"
860876
861877#: ../../c-api/init.rst:609
862878msgid ""
@@ -1314,13 +1330,16 @@ msgid ""
13141330"Raises an :ref:`auditing event <auditing>` "
13151331"``cpython.PyInterpreterState_Clear`` with no arguments."
13161332msgstr ""
1333+ "引发一个 :ref:`审计事件 <auditing>` ``cpython.PyInterpreterState_Clear``,不附带任何参数。"
13171334
13181335#: ../../c-api/init.rst:1038
13191336msgid ""
13201337"Destroy an interpreter state object. The global interpreter lock need not "
13211338"be held. The interpreter state must have been reset with a previous call to"
13221339" :c:func:`PyInterpreterState_Clear`."
13231340msgstr ""
1341+ "销毁解释器状态对象。 不需要持有全局解释器锁。 解释器状态必须使用之前对 :c:func:`PyInterpreterState_Clear` "
1342+ "的调用来重置。"
13241343
13251344#: ../../c-api/init.rst:1045
13261345msgid ""
@@ -1333,13 +1352,15 @@ msgstr "创建属于给定解释器对象的新线程状态对象。全局解释
13331352msgid ""
13341353"Reset all information in a thread state object. The global interpreter lock"
13351354" must be held."
1336- msgstr ""
1355+ msgstr "重置线程状态对象中的所有信息。 必须持有全局解释器锁。 "
13371356
13381357#: ../../c-api/init.rst:1055
13391358msgid ""
13401359"This function now calls the :c:member:`PyThreadState.on_delete` callback. "
13411360"Previously, that happened in :c:func:`PyThreadState_Delete`."
13421361msgstr ""
1362+ "此函数现在会调用 :c:member:`PyThreadState.on_delete` 回调。 在之前版本中,此操作是发生在 "
1363+ ":c:func:`PyThreadState_Delete` 中的。"
13431364
13441365#: ../../c-api/init.rst:1062
13451366msgid ""
0 commit comments