@@ -380,27 +380,29 @@ msgstr "首先,你需要导入 OptionParser 类;然后在主程序的开头
380
380
381
381
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:259
382
382
msgid "Then you can start defining options. The basic syntax is::"
383
- msgstr ""
383
+ msgstr "然后你可以开始定义选项。 基本语法如下:: "
384
384
385
385
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:264
386
386
msgid ""
387
387
"Each option has one or more option strings, such as ``-f`` or ``--file``, "
388
388
"and several option attributes that tell :mod:`optparse` what to expect and "
389
389
"what to do when it encounters that option on the command line."
390
390
msgstr ""
391
+ "每个选项有一个或多个选项字符串,如 ``-f`` 或 ``--file``,以及一些选项属性用来告诉 :mod:`optparse` "
392
+ "当它在命令行中遇到该选项时将得到什么和需要做什么。"
391
393
392
394
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:268
393
395
msgid ""
394
396
"Typically, each option will have one short option string and one long option"
395
397
" string, e.g.::"
396
- msgstr ""
398
+ msgstr "通常,每个选项都会有一个短选项字符串和一个长选项字符串,例如 :: "
397
399
398
400
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:273
399
401
msgid ""
400
402
"You're free to define as many short option strings and as many long option "
401
403
"strings as you like (including zero), as long as there is at least one "
402
404
"option string overall."
403
- msgstr ""
405
+ msgstr "你可以随你的喜好自由定义任意数量的短选项字符串和任意数量的长选项字符串(包括零个),只要总计至少有一个选项字符串。 "
404
406
405
407
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:277
406
408
msgid ""
@@ -410,6 +412,8 @@ msgid ""
410
412
"reality, :mod:`optparse` encounters *option strings* and looks up options "
411
413
"from them."
412
414
msgstr ""
415
+ "传给 :meth:`OptionParser.add_option` 的选项字符串实际上是特定调用所定义的选项的标签。 "
416
+ "为了表述简单,我们将经常会说在命令行中 *遇到一个选项*;而实际上,:mod:`optparse` 是遇到了 *选项字符串* 并根据它们来查找选项。"
413
417
414
418
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:283
415
419
msgid ""
0 commit comments