@@ -226,11 +226,11 @@ msgstr "add_help_ - 为解析器添加一个 ``-h/--help`` 选项(默认值:
226226msgid ""
227227"allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is"
228228" unambiguous. (default: ``True``)"
229- msgstr ""
229+ msgstr "allow_abbrev_ - 如果缩写是无歧义的,则允许缩写长选项 (默认值:``True``) "
230230
231231#: ../../library/argparse.rst:182
232232msgid "*allow_abbrev* parameter was added."
233- msgstr ""
233+ msgstr "添加 *allow_abbrev* 参数。 "
234234
235235#: ../../library/argparse.rst:185 ../../library/argparse.rst:683
236236msgid "The following sections describe how each of these are used."
@@ -248,50 +248,55 @@ msgid ""
248248" program was invoked on the command line. For example, consider a file "
249249"named ``myprogram.py`` with the following code::"
250250msgstr ""
251+ "默认情况下,:class:`ArgumentParser` 对象使用 ``sys.argv[0]`` "
252+ "来确定如何在帮助消息中显示程序名称。这一默认值几乎总是可取的,因为它将使帮助消息与从命令行调用此程序的方式相匹配。例如,对于有如下代码的名为 "
253+ "``myprogram.py`` 的文件:"
251254
252255#: ../../library/argparse.rst:202
253256msgid ""
254257"The help for this program will display ``myprogram.py`` as the program name "
255258"(regardless of where the program was invoked from):"
256- msgstr ""
259+ msgstr "该程序的帮助信息将显示 ``myprogram.py`` 作为程序名称(无论程序从何处被调用): "
257260
258261#: ../../library/argparse.rst:221
259262msgid ""
260263"To change this default behavior, another value can be supplied using the "
261264"``prog=`` argument to :class:`ArgumentParser`::"
262- msgstr ""
265+ msgstr "要更改这样的默认行为,可以使用 ``prog=`` 参数为 :class:`ArgumentParser` 提供另一个值: "
263266
264267#: ../../library/argparse.rst:231
265268msgid ""
266269"Note that the program name, whether determined from ``sys.argv[0]`` or from "
267270"the ``prog=`` argument, is available to help messages using the ``%(prog)s``"
268271" format specifier."
269272msgstr ""
273+ "需要注意的是,无论是从 ``sys.argv[0]`` 或是从 ``prog=`` 参数确定的程序名称,都可以在帮助消息里通过 ``%(prog)s``"
274+ " 格式串来引用。"
270275
271276#: ../../library/argparse.rst:248
272277msgid "usage"
273- msgstr ""
278+ msgstr "usage "
274279
275280#: ../../library/argparse.rst:250
276281msgid ""
277282"By default, :class:`ArgumentParser` calculates the usage message from the "
278283"arguments it contains::"
279- msgstr ""
284+ msgstr "默认情况下,:class:`ArgumentParser` 根据它包含的参数来构建用法消息: "
280285
281286#: ../../library/argparse.rst:266
282287msgid ""
283288"The default message can be overridden with the ``usage=`` keyword argument::"
284- msgstr ""
289+ msgstr "可以通过 ``usage=`` 关键字参数覆盖这一默认消息: "
285290
286291#: ../../library/argparse.rst:281
287292msgid ""
288293"The ``%(prog)s`` format specifier is available to fill in the program name "
289294"in your usage messages."
290- msgstr ""
295+ msgstr "在用法消息中可以使用 ``%(prog)s`` 格式说明符来填入程序名称。 "
291296
292297#: ../../library/argparse.rst:286
293298msgid "description"
294- msgstr ""
299+ msgstr "description "
295300
296301#: ../../library/argparse.rst:288
297302msgid ""
@@ -301,6 +306,8 @@ msgid ""
301306"description is displayed between the command-line usage string and the help "
302307"messages for the various arguments::"
303308msgstr ""
309+ "大多数对 :class:`ArgumentParser` 构造方法的调用都会使用 ``description=`` "
310+ "关键字参数。这个参数简要描述这个程度做什么以及怎么做。在帮助消息中,这个描述会显示在命令行用法字符串和各种参数的帮助消息之间:"
304311
305312#: ../../library/argparse.rst:303
306313msgid ""
0 commit comments