@@ -11,7 +11,7 @@ msgid ""
1111msgstr ""
1212"Project-Id-Version :Python 3.10\n "
1313"Report-Msgid-Bugs-To :\n "
14- "POT-Creation-Date :2025-01-03 16:02 +0000\n "
14+ "POT-Creation-Date :2025-09-22 21:19 +0000\n "
1515"PO-Revision-Date :2025-09-22 15:58+0000\n "
1616"Last-Translator :python-doc bot, 2025\n "
1717"Language-Team :Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -423,6 +423,7 @@ msgid ""
423423"(If you like, you can pass a custom argument list to :meth:`parse_args`, but"
424424" that's rarely necessary: by default it uses ``sys.argv[1:]``.)"
425425msgstr ""
426+ "(如果你愿意,你可以将自定义的参数列表传给 :meth:`parse_args`,但很少有必要这样做:默认它将使用 ``sys.argv[1:]``。)"
426427
427428#: ../../library/optparse.rst:291
428429msgid ":meth:`parse_args` returns two values:"
@@ -505,6 +506,9 @@ msgid ""
505506"argument, ``foo.txt``, and stores it in ``options.filename``. So, after "
506507"this call to :meth:`parse_args`, ``options.filename`` is ``\" foo.txt\" ``."
507508msgstr ""
509+ "当 :mod:`optparse` 看到选项字符串 ``-f`` 时,它将获取下一个参数 ``foo.txt``,并将其保存到 "
510+ "``options.filename`` 中。 因此,在这个对 :meth:`parse_args` "
511+ "的调用之后,``options.filename`` 将为 ``\" foo.txt\" ``。"
508512
509513#: ../../library/optparse.rst:344
510514msgid ""
@@ -688,6 +692,8 @@ msgid ""
688692"of OptionParser, which you can call at any time before calling "
689693":meth:`parse_args`::"
690694msgstr ""
695+ "一种更清晰的默认值指定方式是使用 OptionParser 的 :meth:`set_defaults` 方法,你可以在调用 "
696+ ":meth:`parse_args` 之前的任何时候调用它::"
691697
692698#: ../../library/optparse.rst:462
693699msgid ""
@@ -1054,6 +1060,9 @@ msgid ""
10541060" that keyword argument). To suppress a usage message, pass the special "
10551061"value :data:`optparse.SUPPRESS_USAGE`."
10561062msgstr ""
1063+ "当你的程序不正确地运行或附带 help 选项运行时将打印的用法说明。 当 :mod:`optparse` 打印用法字符串时,它会将 ``%prog`` "
1064+ "扩展为 ``os.path.basename(sys.argv[0])`` (或者如果你传入 ``prog`` 则为该关键字参数值)。 "
1065+ "要屏蔽用法说明,请传入特殊值 :data:`optparse.SUPPRESS_USAGE`。"
10571066
10581067#: ../../library/optparse.rst:821
10591068msgid "``option_list`` (default: ``[]``)"
@@ -1317,6 +1326,9 @@ msgid ""
13171326"stored as attributes of this object, according to the :attr:`~Option.dest` "
13181327"(destination) option attribute."
13191328msgstr ""
1329+ "如你所见,大多数动作都涉及在某处保存或更新一个值。 :mod:`optparse` 总是会为此创建一个特殊对象,在习惯上命名为 ``options`` "
1330+ "(它恰好是 :class:`optparse.Values` 的实例)。 选项参数 (以及几种其他的值) 将根据 "
1331+ ":attr:`~Option.dest` (目标) 选项属性被保存为该对象的属性。"
13201332
13211333#: ../../library/optparse.rst:961
13221334msgid "For example, when you call ::"