8000 [po] auto sync · python/python-docs-zh-cn@d45008f · GitHub
[go: up one dir, main page]

Skip to content

Commit d45008f

Browse files
[po] auto sync
1 parent 7cb5c2b commit d45008f

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.09%", "updated_at": "2025-03-20T02:21:12Z"}
1+
{"translation": "81.10%", "updated_at": "2025-03-20T14:55:36Z"}

library/argparse.po

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,6 +1690,8 @@ msgid ""
16901690
"be produced. Actions that do not consume command-line arguments (e.g. "
16911691
"``'store_const'``) set ``nargs=0``."
16921692
msgstr ""
1693+
"如果未提供 ``nargs`` 关键字参数,则消耗参数的数量将由 action_ 来确定。 通常这意味着消耗一个命令行参数并产生一个条目(而非列表)。 "
1694+
"不消耗命令行参数的动作 (例如 ``'store_const'``) 则要设置 ``nargs=0``。"
16931695

16941696
#: ../../library/argparse.rst:887
16951697
msgid "const"
@@ -1901,6 +1903,9 @@ msgid ""
19011903
":exc:`ValueError`, the exception is caught and a nicely formatted error "
19021904
"message is displayed. Other exception types are not handled."
19031905
msgstr ""
1906+
"传给 ``type`` 的参数可以是接受一个字符串或一个已注册类型名称 (参见 :meth:`~ArgumentParser.register`) "
1907+
"的可调用对象。 如果该函数引发了 :exc:`ArgumentTypeError`, :exc:`TypeError` 或 "
1908+
":exc:`ValueError`,异常将被捕获并显示经良好格式化的错误消息。 其他异常类型则不会被处理。"
19041909

19051910
#: ../../library/argparse.rst:995
19061911
msgid "Common built-in types and functions can be used as type converters:"
@@ -2080,6 +2085,9 @@ msgid ""
20802085
"command line. To make an option *required*, ``True`` can be specified for "
20812086
"the ``required=`` keyword argument to :meth:`~ArgumentParser.add_argument`::"
20822087
msgstr ""
2088+
"通常,:mod:`!argparse` 模块会假定像 ``-f`` 和 ``--bar`` 这样的旗标是表示 *可选* "
2089+
"参数,它们总是可以在命令行中被省略。 要让一个选项成为 *必需*,则可以将 ``True`` 作为 ``required=`` 关键字参数传给 "
2090+
":meth:`~ArgumentParser.add_argument`::"
20832091

20842092
#: ../../library/argparse.rst:1093
20852093
msgid ""
@@ -2125,6 +2133,8 @@ msgid ""
21252133
"at the command line), these ``help`` descriptions will be displayed with "
21262134
"each argument."
21272135
msgstr ""
2136+
"``help`` 值是一个包含参数的简短描述的字符串。 当用户请求帮助时(一般是通过在命令行中使用 ``-h`` 或 ``--help`` "
2137+
"的方式),这些 ``help`` 描述信息将随每个参数一同显示。"
21282138

21292139
#: ../../library/argparse.rst:1121
21302140
msgid ""
@@ -2175,6 +2185,7 @@ msgid ""
21752185
":mod:`!argparse` supports silencing the help entry for certain options, by "
21762186
"setting the ``help`` value to ``argparse.SUPPRESS``::"
21772187
msgstr ""
2188+
":mod:`!argparse` 支持静默特定选面的帮助条目,具体方式是将 ``help`` 值设为 ``argparse.SUPPRESS``::"
21782189

21792190
#: ../../library/argparse.rst:1144
21802191
msgid ""

0 commit comments

Comments
 (0)
0