@@ -2398,50 +2398,51 @@ msgstr "下面是一个不接受任何参数,只是简单地记录所遇见的
2398
2398
2399
2399
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1696
2400
2400
msgid "Of course, you could do that with the ``\" store_true\" `` action."
2401
- msgstr ""
2401
+ msgstr "当然,你也可以使用 `` \" store_true \" `` 动作做到这一点。 "
2402
2402
2403
2403
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1702
2404
2404
msgid "Callback example 2: check option order"
2405
- msgstr ""
2405
+ msgstr "回调示例 2:检查选项顺序 "
2406
2406
2407
2407
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1704
2408
2408
msgid ""
2409
2409
"Here's a slightly more interesting example: record the fact that ``-a`` is "
2410
2410
"seen, but blow up if it comes after ``-b`` in the command-line. ::"
2411
- msgstr ""
2411
+ msgstr "下面是一个更有趣些的示例:当看到 ``-a`` 出现时将会记录,而如果它在命令行中出现于 ``-b`` 之后则将报告错误。 :: "
2412
2412
2413
2413
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1719
2414
2414
msgid "Callback example 3: check option order (generalized)"
2415
- msgstr ""
2415
+ msgstr "回调示例 3:检查选项顺序(通用) "
2416
2416
2417
2417
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1721
2418
2418
msgid ""
2419
2419
"If you want to re-use this callback for several similar options (set a flag,"
2420
2420
" but blow up if ``-b`` has already been seen), it needs a bit of work: the "
2421
2421
"error message and the flag that it sets must be generalized. ::"
2422
2422
msgstr ""
2423
+ "如果你希望为多个类似的选项重用此回调(设置旗标,而在看到 ``-b`` 出现时触发),则需要一些额外工作:它设置的错误消息和旗标必须进行通用化。 ::"
2423
2424
2424
2425
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1738
2425
2426
msgid "Callback example 4: check arbitrary condition"
2426
- msgstr ""
2427
+ msgstr "回调示例 4:检查任意条件 "
2427
2428
2428
2429
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1740
2429
2430
msgid ""
2430
2431
"Of course, you could put any condition in there---you're not limited to "
2431
2432
"checking the values of already-defined options. For example, if you have "
2432
2433
"options that should not be called when the moon is full, all you have to do "
2433
2434
"is this::"
2434
- msgstr ""
2435
+ msgstr "当然,你可以设置任何条件 --- 并不限于检查已定义选项的值。 举例来说,如果你有一个不应当在满月时被调用的选项,你就可以这样做:: "
2435
2436
2436
2437
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1753
2437
2438
msgid ""
2438
2439
"(The definition of ``is_moon_full()`` is left as an exercise for the "
2439
2440
"reader.)"
2440
- msgstr ""
2441
+ msgstr "(定义 ``is_moon_full()`` 的任务将作为留给读者的练习。) "
2441
2442
2442
2443
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1759
2443
2444
msgid "Callback example 5: fixed arguments"
2444
- msgstr ""
2445
+ msgstr "回调示例 5:固定的参数 "
2445
2446
2446
2447
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1761
2447
2448
msgid ""