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

Skip to content

Commit 7cb5c2b

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

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.08%", "updated_at": "2025-03-17T01:19:43Z"}
1+
{"translation": "81.09%", "updated_at": "2025-03-20T02:21:12Z"}

library/argparse.po

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,9 @@ msgid ""
13601360
"``None`` (the default) or ``'?'``, each character of the argument string "
13611361
"will be appended to the list. Example usage::"
13621362
msgstr ""
1363+
"``'extend'`` - 这将存储一个列表并添加来自于多值参数列表的每个条目。 ``'extend'`` 动作通常配合 nargs_ 关键字参数值 "
1364+
"``'+'`` 或 ``'*'`` 使用。 请注意当 nargs_ 为 ``None`` (默认值) 或 ``'?'`` "
1365+
"时,将把参数字符串中的每个字符添加到列表。 示例用法::"
13631366

13641367
#: ../../library/argparse.rst:715
13651368
msgid ""
@@ -1433,6 +1436,7 @@ msgid ""
14331436
"Only actions that consume command-line arguments (e.g. ``'store'``, "
14341437
"``'append'`` or ``'extend'``) can be used with positional arguments."
14351438
msgstr ""
1439+
"只有消耗命令行参数的动作 (例如 ``'store'``, ``'append'`` 或 ``'extend'``) 可以配合位置参数使用。"
14361440

14371441
#: ../../library/argparse.rst:752
14381442
msgid ""
@@ -1441,6 +1445,9 @@ msgid ""
14411445
":class:`!BooleanOptionalAction` is available in :mod:`!argparse` and adds "
14421446
"support for boolean actions such as ``--foo`` and ``--no-foo``::"
14431447
msgstr ""
1448+
"你还可以通过传递一个 :class:`Action` 子类或实现了相同接口的其他对象来指定任意动作。 "
1449+
":class:`!BooleanOptionalAction` 在 :mod:`!argparse` 中可用并会添加对布尔类型动作如 ``--foo``"
1450+
" 和 ``--no-foo`` 的支持::"
14441451

14451452
#: ../../library/argparse.rst:757
14461453
msgid ""
@@ -1464,6 +1471,9 @@ msgid ""
14641471
"using the :meth:`~ArgumentParser.register` method and reference them by "
14651472
"their registered name."
14661473
msgstr ""
1474+
"创建自定义动作的推荐方式是扩展 :class:`Action`,重写 :meth:`!__call__` 方法以及可选的 "
1475+
":meth:`!__init__` 和 :meth:`!format_usage` 方法。 你还可以使用 "
1476+
":meth:`~ArgumentParser.register` 方法注册自定义动作并通过其注册名称来引用它们。"
14671477

14681478
#: ../../library/argparse.rst:770
14691479
msgid "An example of a custom action::"
@@ -1523,6 +1533,9 @@ msgid ""
15231533
"action. See also :ref:`specifying-ambiguous-arguments`. The supported values"
15241534
" are:"
15251535
msgstr ""
1536+
":class:`ArgumentParser` 对象通常会将一个单独的命令行参数关联到一个单独的要执行的动作。 ``nargs`` "
1537+
"关键字参数会将不同数量的命令行参数关联到一个单独的动作。 另请参阅 :ref:`specifying-ambiguous-arguments`。 "
1538+
"受支持的值有:"
15261539

15271540
#: ../../library/argparse.rst:803
15281541
msgid ""

0 commit comments

Comments
 (0)
0