@@ -454,10 +454,13 @@ msgid ""
454
454
"(destination), and :attr:`~Option.help`. Of these, :attr:`~Option.action` is"
455
455
" the most fundamental."
456
456
msgstr ""
457
+ "本教学章节只介绍了四个最重要的选项属性: :attr:`~Option.action`, :attr:`~Option.type`, "
458
+ ":attr:`~Option.dest` (destination) 和 :attr:`~Option.help`。 "
459
+ "其中,:attr:`~Option.action` 是最基本的一个。"
457
460
458
461
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:309
459
462
msgid "Understanding option actions"
460
- msgstr ""
463
+ msgstr "理解选项动作 "
461
464
462
465
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:311
463
466
msgid ""
@@ -468,23 +471,28 @@ msgid ""
468
471
"store a value in some variable---for example, take a string from the command"
469
472
" line and store it in an attribute of ``options``."
470
473
msgstr ""
474
+ "动作是告诉 :mod:`optparse` 当它在命令行中遇到某个选项时要做什么。 有一个固定的动作集被硬编码到 :mod:`optparse` "
475
+ "内部;添加新的动作是将在 :ref:`optparse-extending-optparse` 章节中介绍的进阶内容。 大多数动作都是告诉 "
476
+ ":mod:`optparse` 将特定的值存储到某个变量中 --- 例如,从命令行接收一个字符串并将其存储到 ``options`` 的某个选项中。"
471
477
472
478
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:318
473
479
msgid ""
474
480
"If you don't specify an option action, :mod:`optparse` defaults to "
475
481
"``store``."
476
- msgstr ""
482
+ msgstr "如果你没有指定一个选项动作,:mod:`optparse` 将默认选择 ``store``。 "
477
483
478
484
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:324
479
485
msgid "The store action"
480
- msgstr ""
486
+ msgstr "store 动作 "
481
487
482
488
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:326
483
489
msgid ""
484
490
"The most common option action is ``store``, which tells :mod:`optparse` to "
485
491
"take the next argument (or the remainder of the current argument), ensure "
486
492
"that it is of the correct type, and store it to your chosen destination."
487
493
msgstr ""
494
+ "最常用的选项动作是 ``store``,它告诉 :mod:`optparse` "
495
+ "接收下一个参数(或当前参数的剩余部分),确认其为正确的类型,并将其保存至你选择的目标。"
488
496
489
497
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:330
490
498
msgid "For example::"
0 commit comments