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

Skip to content

Commit 21cd714

Browse files
[po] auto sync
1 parent 2ab77c9 commit 21cd714

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.07%", "updated_at": "2025-03-09T08:55:45Z"}
1+
{"translation": "81.08%", "updated_at": "2025-03-12T14:56:01Z"}

library/argparse.po

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ msgid ""
5252
"option parameter values that start with ``-`` even when they correspond to "
5353
"another defined option)."
5454
msgstr ""
55+
"虽然 :mod:`argparse` "
56+
"是推荐的用于实现基本命令行应用程序的标准库模块,但对于命令行应用程序的行为有更明确的要求的开发者可能会发现它并未提供所需层次的控制能力。 请参阅 "
57+
":ref:`choosing-an-argument-parser` 了解当 ``argparse`` "
58+
"不支持特定应用程序需要的行为(例如完全禁用散开选项和位置参数,或接受以 ``-`` 开头的选项形参值即使它们对应了其它已定义的选项)时可以考虑的替代。"
5559

5660
#: ../../library/argparse.rst-1
5761
msgid "Tutorial"
@@ -737,6 +741,9 @@ msgid ""
737741
" for options like ``+f`` or ``/foo``, may specify them using the "
738742
"``prefix_chars=`` argument to the :class:`ArgumentParser` constructor::"
739743
msgstr ""
744+
"大多数命令行选项会使用 ``-`` 作为前缀,例如 ``-f/--foo``。 如果解析器需要支持不同的或者额外的前缀字符,例如像 ``+f`` 或 "
745+
"``/foo`` 之类的选项,可以在 :class:`ArgumentParser` 构造器中使用 ``prefix_chars=`` "
746+
"参数来指定它们::"
740747

741748
#: ../../library/argparse.rst:389
742749
msgid ""
@@ -1963,6 +1970,9 @@ msgid ""
19631970
"the parser has run and then use the :keyword:`with`-statement to manage the "
19641971
"files."
19651972
msgstr ""
1973+
"甚至 :class:`~argparse.FileType` 在用于 ``type`` 关键字时也是有限制的。 如果一个参数使用了 "
1974+
":class:`~argparse.FileType` 并且有一个后续参数出错,则将报告错误但文件并不会被自动关闭。 "
1975+
"在此情况下,更好的做法是等待直到解析器运行完毕再使用 :keyword:`with` 语句来管理文件。"
19661976

19671977
#: ../../library/argparse.rst:1043
19681978
msgid ""
@@ -2012,6 +2022,8 @@ msgid ""
20122022
"conversions have been performed, so the type of the objects in the *choices*"
20132023
" sequence should match the type_ specified."
20142024
msgstr ""
2025+
"注意包括在 *choices* 序列中的内容会在执行任意 type_ 转换之后被检查,因此 *choices* 序列中对象的类型应当与指定的 type_"
2026+
" 相匹配。"
20152027

20162028
#: ../../library/argparse.rst:1071
20172029
msgid ""

0 commit comments

Comments
 (0)
0