@@ -2485,22 +2485,25 @@ msgid ""
2485
2485
":mod:`optparse` normally handles for you. In particular, callbacks should "
2486
2486
"implement the conventional rules for bare ``--`` and ``-`` arguments:"
2487
2487
msgstr ""
2488
+ "当你想要一个选项接受可变数数量的参数时情况会变得更麻烦一点。 对于这种场景,你必须编写一个回调,因为 :mod:`optparse` "
2489
+ "没有为它提供任何内置的相应功能。 而你必须处理 :mod:`optparse` 通常会为你处理的传统 Unix 命令行的某些细节问题。 "
2490
+ "特别地,回调应当实现单个 ``--`` 和 ``-`` 参数的惯例规则:"
2488
2491
2489
2492
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1794
2490
2493
msgid "either ``--`` or ``-`` can be option arguments"
2491
- msgstr ""
2494
+ msgstr "``--`` 或 ``-`` 都可以是选项参数 "
2492
2495
2493
2496
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1796
2494
2497
msgid ""
2495
2498
"bare ``--`` (if not the argument to some option): halt command-line "
2496
2499
"processing and discard the ``--``"
2497
- msgstr ""
2500
+ msgstr "单个 ``--`` (如果不是某个选项的参数): 停止命令行处理并丢弃该 ``--`` "
2498
2501
2499
2502
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1799
2500
2503
msgid ""
2501
2504
"bare ``-`` (if not the argument to some option): halt command-line "
2502
2505
"processing but keep the ``-`` (append it to ``parser.largs``)"
2503
- msgstr ""
2506
+ msgstr "单个 ``-`` (如果不是某个选项的参数): 停止命令行处理但保留 ``-`` (将其添加到 ``parser.largs``) "
2504
2507
2505
2508
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1802
2506
2509
msgid ""
@@ -2510,16 +2513,18 @@ msgid ""
2510
2513
"application (which is why :mod:`optparse` doesn't support this sort of thing"
2511
2514
" directly)."
2512
2515
msgstr ""
2516
+ "如果你想要一个选项接受可变数量的参数,那么有几个微妙、棘手的问题需要考虑到。 你选择的具体实现将基于你的应用程序对于各方面利弊的权衡(这就是为什么 "
2517
+ ":mod:`optparse` 没有直接支持这一功能)。"
2513
2518
2514
2519
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1808
2515
2520
msgid ""
2516
2521
"Nevertheless, here's a stab at a callback for an option with variable "
2517
2522
"arguments::"
2518
- msgstr ""
2523
+ msgstr "无论如何,下面是一个对于接受可变参数的选项的回调的尝试:: "
2519
2524
2520
2525
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1842
2521
2526
msgid "Extending :mod:`optparse`"
2522
- msgstr ""
2527
+ msgstr "扩展 :mod:`optparse` "
2523
2528
2524
2529
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1844
2525
2530
msgid ""
0 commit comments