@@ -1755,51 +1755,60 @@ msgid ""
1755
1755
":attr:`~Option.help` options, you will rarely create ``version`` options, "
1756
1756
"since :mod:`optparse` automatically adds them when needed."
1757
1757
msgstr ""
1758
+ "将提供给 OptionParser 的版本号打印到 stdout 并退出。 该版本号实际上是由 OptionParser 的 "
1759
+ "``print_version()`` 方法进行格式化并打印的。 这通常只在向 OptionParser 构造器提供了 ``version`` "
1760
+ "参数时才有意义。 与 :attr:`~Option.help` 选项类似,你很少会创建 ``version`` 选项,因为 "
1761
+ ":mod:`optparse` 会在需要时自动添加它们。"
1758
1762
1759
1763
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1284
1760
1764
msgid "Standard option types"
1761
- msgstr ""
1765
+ msgstr "标准选项类型 "
1762
1766
1763
1767
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1286
1764
1768
msgid ""
1765
1769
":mod:`optparse` has five built-in option types: ``\" string\" ``, ``\" int\" ``,"
1766
1770
" ``\" choice\" ``, ``\" float\" `` and ``\" complex\" ``. If you need to add new "
1767
1771
"option types, see section :ref:`optparse-extending-optparse`."
1768
1772
msgstr ""
1773
+ ":mod:`optparse` 有五种内置选项类型: ``\" string\" ``, ``\" int\" ``, ``\" choice\" ``, "
1774
+ "``\" float\" `` 和 ``\" complex\" ``。 如果你需要添加新的选项类型,请参阅 :ref:`optparse-extending-"
1775
+ "optparse` 一节。"
1769
1776
1770
1777
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1290
1771
1778
msgid ""
1772
1779
"Arguments to string options are not checked or converted in any way: the "
1773
1780
"text on the command line is stored in the destination (or passed to the "
1774
1781
"callback) as-is."
1775
- msgstr ""
1782
+ msgstr "传给 string 类型选项的参数不会以任何方式进行检查或转换:命令行中的文本将被原样保存至目标(或传给回调)。 "
1776
1783
1777
1784
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1293
1778
1785
msgid "Integer arguments (type ``\" int\" ``) are parsed as follows:"
1779
- msgstr ""
1786
+ msgstr "整数参数 (`` \" int \" `` 类型) 将以如下方式解析: "
1780
1787
1781
1788
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1295
1782
1789
msgid "if the number starts with ``0x``, it is parsed as a hexadecimal number"
1783
- msgstr ""
1790
+ msgstr "如果数字开头为 ``0x``,它将被解析为十六进制数 "
1784
1791
1785
1792
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1297
1786
1793
msgid "if the number starts with ``0``, it is parsed as an octal number"
1787
- msgstr ""
1794
+ msgstr "如果数字开头为 ``0``,它将被解析为八进制数 "
1788
1795
1789
1796
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1299
1790
1797
msgid "if the number starts with ``0b``, it is parsed as a binary number"
1791
- msgstr ""
1798
+ msgstr "如果数字开头为 ``0b``,它将被解析为二进制数 "
1792
1799
1793
1800
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1301
1794
1801
msgid "otherwise, the number is parsed as a decimal number"
1795
- msgstr ""
1802
+ msgstr "在其他情况下,数字将被解析为十进制数 "
1796
1803
1797
1804
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1304
1798
1805
msgid ""
1799
1806
"The conversion is done by calling :func:`int` with the appropriate base (2, "
1800
1807
"8, 10, or 16). If this fails, so will :mod:`optparse`, although with a more"
1801
1808
" useful error message."
1802
1809
msgstr ""
1810
+ "转换操作是通过调用 :func:`int` 并传入适当的 base (2, 8, 10 或 16) 来完成的。 如果转换失败, "
1811
+ ":mod:`optparse` 也将失败,但它会附带更有用的错误消息。"
1803
1812
1804
1813
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1308
1805
1814
msgid ""