-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathargparse.po
2165 lines (1888 loc) · 112 KB
/
argparse.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2020, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Arihiro TAKASE, 2017
# shirou - しろう <[email protected]>, 2017
# Nozomu Kaneko <[email protected]>, 2017
# Shun Sakurai, 2017
# Masato HASHIMOTO <[email protected]>, 2017
# Osamu NAKAMURA, 2017
# E. Kawashima, 2017
# 秘湯 <[email protected]>, 2018
# Naoki Nakamura <[email protected]>, 2020
# tomo, 2020
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-02-09 12:40+0000\n"
"PO-Revision-Date: 2017-02-16 17:48+0000\n"
"Last-Translator: tomo, 2020\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/ja/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/argparse.rst:2
msgid ""
":mod:`argparse` --- Parser for command-line options, arguments and sub-"
"commands"
msgstr ":mod:`argparse` --- コマンドラインオプション、引数、サブコマンドのパーサー"
#: ../../library/argparse.rst:12
msgid "**Source code:** :source:`Lib/argparse.py`"
msgstr "**ソースコード:** :source:`Lib/argparse.py`"
#: ../../library/argparse.rstNone
msgid "Tutorial"
msgstr "チュートリアル"
#: ../../library/argparse.rst:18
msgid ""
"This page contains the API reference information. For a more gentle "
"introduction to Python command-line parsing, have a look at the "
":ref:`argparse tutorial <argparse-tutorial>`."
msgstr ""
"このページは API のリファレンス情報が記載しています。:ref:`argparse チュートリアル <argparse-tutorial>` "
"では、コマンドラインの解析についてより優しく説明しています。"
#: ../../library/argparse.rst:22
msgid ""
"The :mod:`argparse` module makes it easy to write user-friendly command-line"
" interfaces. The program defines what arguments it requires, and "
":mod:`argparse` will figure out how to parse those out of :data:`sys.argv`."
" The :mod:`argparse` module also automatically generates help and usage "
"messages and issues errors when users give the program invalid arguments."
msgstr ""
":mod:`argparse` "
"モジュールはユーザーフレンドリなコマンドラインインターフェースの作成を簡単にします。プログラムがどんな引数を必要としているのかを定義すると、:mod:`argparse`"
" が :data:`sys.argv` からそのオプションを解析する方法を見つけ出します。:mod:`argparse` "
"モジュールは自動的にヘルプと使用方法メッセージを生成し、ユーザーが不正な引数をプログラムに指定したときにエラーを発生させます。"
#: ../../library/argparse.rst:30
msgid "Example"
msgstr "使用例"
#: ../../library/argparse.rst:32
msgid ""
"The following code is a Python program that takes a list of integers and "
"produces either the sum or the max::"
msgstr "次のコードは、整数のリストを受け取って合計か最大値を返す Python プログラムです::"
#: ../../library/argparse.rst:47
msgid ""
"Assuming the Python code above is saved into a file called ``prog.py``, it "
"can be run at the command line and provides useful help messages:"
msgstr ""
"上の Python コードが ``prog.py`` "
"という名前のファイルに保存されたと仮定します。コマンドラインから便利なヘルプメッセージを表示できます:"
#: ../../library/argparse.rst:64
msgid ""
"When run with the appropriate arguments, it prints either the sum or the max"
" of the command-line integers:"
msgstr "適切な引数を与えて実行した場合、このプログラムはコマンドライン引数の整数列の合計か最大値を表示します:"
#: ../../library/argparse.rst:75
msgid "If invalid arguments are passed in, it will issue an error:"
msgstr "不正な引数が与えられた場合、エラーを発生させます:"
#: ../../library/argparse.rst:83
msgid "The following sections walk you through this example."
msgstr "以降の節では、この例をひと通り説明して行きます。"
#: ../../library/argparse.rst:87
msgid "Creating a parser"
msgstr "パーサーを作る"
#: ../../library/argparse.rst:89
msgid ""
"The first step in using the :mod:`argparse` is creating an "
":class:`ArgumentParser` object::"
msgstr ""
":mod:`argparse` を使うときの最初のステップは、:class:`ArgumentParser` オブジェクトを生成することです::"
#: ../../library/argparse.rst:94
msgid ""
"The :class:`ArgumentParser` object will hold all the information necessary "
"to parse the command line into Python data types."
msgstr ""
":class:`ArgumentParser` オブジェクトはコマンドラインを解析して Python "
"データ型にするために必要なすべての情報を保持します。"
#: ../../library/argparse.rst:99
msgid "Adding arguments"
msgstr "引数を追加する"
#: ../../library/argparse.rst:101
msgid ""
"Filling an :class:`ArgumentParser` with information about program arguments "
"is done by making calls to the :meth:`~ArgumentParser.add_argument` method. "
"Generally, these calls tell the :class:`ArgumentParser` how to take the "
"strings on the command line and turn them into objects. This information is"
" stored and used when :meth:`~ArgumentParser.parse_args` is called. For "
"example::"
msgstr ""
":class:`ArgumentParser` "
"にプログラム引数の情報を与えるために、:meth:`~ArgumentParser.add_argument` "
"メソッドを呼び出します。一般的に、このメソッドの呼び出しは :class:`ArgumentParser` "
"に、コマンドラインの文字列を受け取ってそれをオブジェクトにする方法を教えます。この情報は保存され、:meth:`~ArgumentParser.parse_args`"
" が呼び出されたときに利用されます。例えば::"
#: ../../library/argparse.rst:113
msgid ""
"Later, calling :meth:`~ArgumentParser.parse_args` will return an object with"
" two attributes, ``integers`` and ``accumulate``. The ``integers`` "
"attribute will be a list of one or more ints, and the ``accumulate`` "
"attribute will be either the :func:`sum` function, if ``--sum`` was "
"specified at the command line, or the :func:`max` function if it was not."
msgstr ""
"あとで :meth:`~ArgumentParser.parse_args` を呼び出すと、``integers`` と ``accumulate`` "
"という2つの属性を持ったオブジェクトを返します。``integers`` 属性は1つ以上の整数のリストで、``accumulate`` "
"属性はコマンドラインから ``--sum`` が指定された場合は :func:`sum` 関数に、それ以外の場合は :func:`max` "
"関数になります。"
#: ../../library/argparse.rst:121
msgid "Parsing arguments"
msgstr "引数を解析する"
#: ../../library/argparse.rst:123
msgid ""
":class:`ArgumentParser` parses arguments through the "
":meth:`~ArgumentParser.parse_args` method. This will inspect the command "
"line, convert each argument to the appropriate type and then invoke the "
"appropriate action. In most cases, this means a simple :class:`Namespace` "
"object will be built up from attributes parsed out of the command line::"
msgstr ""
":class:`ArgumentParser` は引数を :meth:`~ArgumentParser.parse_args` "
"メソッドで解析します。このメソッドはコマンドラインを調べ、各引数を正しい型に変換して、適切なアクションを実行します。ほとんどの場合、これはコマンドラインの解析結果から、シンプルな"
" :class:`Namespace` オブジェクトを構築することを意味します::"
#: ../../library/argparse.rst:132
msgid ""
"In a script, :meth:`~ArgumentParser.parse_args` will typically be called "
"with no arguments, and the :class:`ArgumentParser` will automatically "
"determine the command-line arguments from :data:`sys.argv`."
msgstr ""
"スクリプト内では、:meth:`~ArgumentParser.parse_args` "
"は通常引数なしで呼び出され、:class:`ArgumentParser` は自動的に :data:`sys.argv` "
"からコマンドライン引数を取得します。"
#: ../../library/argparse.rst:138
msgid "ArgumentParser objects"
msgstr "ArgumentParser オブジェクト"
#: ../../library/argparse.rst:147
msgid ""
"Create a new :class:`ArgumentParser` object. All parameters should be passed"
" as keyword arguments. Each parameter has its own more detailed description "
"below, but in short they are:"
msgstr ""
"新しい :class:`ArgumentParser` "
"オブジェクトを生成します。すべての引数はキーワード引数として渡すべきです。各引数についてはあとで詳しく説明しますが、簡単に言うと:"
#: ../../library/argparse.rst:151
msgid "prog_ - The name of the program (default: ``sys.argv[0]``)"
msgstr "prog_ - プログラム名 (デフォルト: ``sys.argv[0]``)"
#: ../../library/argparse.rst:153
msgid ""
"usage_ - The string describing the program usage (default: generated from "
"arguments added to parser)"
msgstr "usage_ - プログラムの利用方法を記述する文字列 (デフォルト: パーサーに追加された引数から生成されます)"
#: ../../library/argparse.rst:156
msgid ""
"description_ - Text to display before the argument help (default: none)"
msgstr "description_ - 引数のヘルプの前に表示されるテキスト (デフォルト: none)"
#: ../../library/argparse.rst:158
msgid "epilog_ - Text to display after the argument help (default: none)"
msgstr "epilog_ - 引数のヘルプの後で表示されるテキスト (デフォルト: none)"
#: ../../library/argparse.rst:160
msgid ""
"parents_ - A list of :class:`ArgumentParser` objects whose arguments should "
"also be included"
msgstr "parents_ - :class:`ArgumentParser` オブジェクトのリストで、このオブジェクトの引数が追加されます"
#: ../../library/argparse.rst:163
msgid "formatter_class_ - A class for customizing the help output"
msgstr "formatter_class_ - ヘルプ出力をカスタマイズするためのクラス"
#: ../../library/argparse.rst:165
msgid ""
"prefix_chars_ - The set of characters that prefix optional arguments "
"(default: '-')"
msgstr "prefix_chars_ - オプションの引数の prefix になる文字集合 (デフォルト: '-')"
#: ../../library/argparse.rst:168
msgid ""
"fromfile_prefix_chars_ - The set of characters that prefix files from which "
"additional arguments should be read (default: ``None``)"
msgstr ""
"fromfile_prefix_chars_ - 追加の引数を読み込むファイルの prefix になる文字集合 (デフォルト: ``None``)"
#: ../../library/argparse.rst:171
msgid ""
"argument_default_ - The global default value for arguments (default: "
"``None``)"
msgstr "argument_default_ - 引数のグローバルなデフォルト値 (デフォルト: ``None``)"
#: ../../library/argparse.rst:174
msgid ""
"conflict_handler_ - The strategy for resolving conflicting optionals "
"(usually unnecessary)"
msgstr "conflict_handler_ - 衝突するオプションを解決する方法 (通常は不要)"
#: ../../library/argparse.rst:177
msgid ""
"add_help_ - Add a ``-h/--help`` option to the parser (default: ``True``)"
msgstr "add_help_ - ``-h/--help`` オプションをパーサーに追加する (デフォルト: ``True``)"
#: ../../library/argparse.rst:179
msgid ""
"allow_abbrev_ - Allows long options to be abbreviated if the abbreviation is"
" unambiguous. (default: ``True``)"
msgstr ""
"allow_abbrev_ - 長いオプションが先頭の 1 文字に短縮可能 (先頭の文字が一意) である場合に短縮指定を許可する。(デフォルト: "
"``True``)"
#: ../../library/argparse.rst:182
msgid "*allow_abbrev* parameter was added."
msgstr "*allow_abbrev* 引数が追加されました。"
#: ../../library/argparse.rst:185
msgid ""
"In previous versions, *allow_abbrev* also disabled grouping of short flags "
"such as ``-vv`` to mean ``-v -v``."
msgstr ""
"以前のバージョンでは、 *allow_abbrev* は、``-vv`` が ``-v -v`` "
"と等価になるような、短いフラグのグループ化を無効にしていました。"
#: ../../library/argparse.rst:189 ../../library/argparse.rst:687
msgid "The following sections describe how each of these are used."
msgstr "以下の節では各オプションの利用方法を説明します。"
#: ../../library/argparse.rst:193
msgid "prog"
msgstr "``prog``"
#: ../../library/argparse.rst:195
msgid ""
"By default, :class:`ArgumentParser` objects use ``sys.argv[0]`` to determine"
" how to display the name of the program in help messages. This default is "
"almost always desirable because it will make the help messages match how the"
" program was invoked on the command line. For example, consider a file "
"named ``myprogram.py`` with the following code::"
msgstr ""
"デフォルトでは、:class:`ArgumentParser` オブジェクトはヘルプメッセージ中に表示するプログラム名を ``sys.argv[0]`` から取得します。\n"
"このデフォルトの動作は、プログラムがコマンドライン上の起動方法に合わせてヘルプメッセージを作成するため、ほとんどの場合望ましい挙動になります。\n"
"例えば、``myprogram.py`` という名前のファイルに次のコードがあるとします::"
#: ../../library/argparse.rst:206
msgid ""
"The help for this program will display ``myprogram.py`` as the program name "
"(regardless of where the program was invoked from):"
msgstr ""
"このプログラムのヘルプは、プログラム名として (プログラムがどこから起動されたのかに関わらず) ``myprogram.py`` を表示します:"
#: ../../library/argparse.rst:225
msgid ""
"To change this default behavior, another value can be supplied using the "
"``prog=`` argument to :class:`ArgumentParser`::"
msgstr "このデフォルトの動作を変更するには、:class:`ArgumentParser` の ``prog=`` 引数に他の値を指定します::"
#: ../../library/argparse.rst:235
msgid ""
"Note that the program name, whether determined from ``sys.argv[0]`` or from "
"the ``prog=`` argument, is available to help messages using the ``%(prog)s``"
" format specifier."
msgstr ""
"プログラム名は、``sys.argv[0]`` から取られた場合でも ``prog=`` 引数で与えられた場合でも、ヘルプメッセージ中では "
"``%(prog)s`` フォーマット指定子で利用できます。"
#: ../../library/argparse.rst:252
msgid "usage"
msgstr "usage"
#: ../../library/argparse.rst:254
msgid ""
"By default, :class:`ArgumentParser` calculates the usage message from the "
"arguments it contains::"
msgstr "デフォルトでは、 :class:`ArgumentParser` は使用法メッセージを、保持している引数から生成します::"
#: ../../library/argparse.rst:270
msgid ""
"The default message can be overridden with the ``usage=`` keyword argument::"
msgstr "デフォルトのメッセージは ``usage=`` キーワード引数で変更できます::"
#: ../../library/argparse.rst:285
msgid ""
"The ``%(prog)s`` format specifier is available to fill in the program name "
"in your usage messages."
msgstr "``%(prog)s`` フォーマット指定子を、使用法メッセージ内でプログラム名として利用できます。"
#: ../../library/argparse.rst:290
msgid "description"
msgstr "description"
#: ../../library/argparse.rst:292
msgid ""
"Most calls to the :class:`ArgumentParser` constructor will use the "
"``description=`` keyword argument. This argument gives a brief description "
"of what the program does and how it works. In help messages, the "
"description is displayed between the command-line usage string and the help "
"messages for the various arguments::"
msgstr ""
"多くの場合、:class:`ArgumentParser` のコンストラクターを呼び出すときに ``description=`` "
"キーワード引数が使用されます。この引数はプログラムが何をしてどう動くのかについての短い説明になります。ヘルプメッセージで、この説明がコマンドラインの利用法と引数のヘルプメッセージの間に表示されます::"
#: ../../library/argparse.rst:307
msgid ""
"By default, the description will be line-wrapped so that it fits within the "
"given space. To change this behavior, see the formatter_class_ argument."
msgstr ""
"デフォルトでは、説明は与えられたスペースに合わせて折り返されます。この挙動を変更するには、formatter_class_ 引数を参照してください。"
#: ../../library/argparse.rst:312
msgid "epilog"
msgstr "epilog"
#: ../../library/argparse.rst:314
msgid ""
"Some programs like to display additional description of the program after "
"the description of the arguments. Such text can be specified using the "
"``epilog=`` argument to :class:`ArgumentParser`::"
msgstr ""
"いくつかのプログラムは、プログラムについての追加の説明を引数の説明の後に表示します。このテキストは :class:`ArgumentParser` の "
"``epilog=`` 引数に指定できます::"
#: ../../library/argparse.rst:331
msgid ""
"As with the description_ argument, the ``epilog=`` text is by default line-"
"wrapped, but this behavior can be adjusted with the formatter_class_ "
"argument to :class:`ArgumentParser`."
msgstr ""
"description_ 引数と同じく、``epilog=`` テキストもデフォルトで折り返され、:class:`ArgumentParser` の "
"formatter_class_ 引数で動作を調整できます。"
#: ../../library/argparse.rst:337
msgid "parents"
msgstr "parents"
#: ../../library/argparse.rst:339
msgid ""
"Sometimes, several parsers share a common set of arguments. Rather than "
"repeating the definitions of these arguments, a single parser with all the "
"shared arguments and passed to ``parents=`` argument to "
":class:`ArgumentParser` can be used. The ``parents=`` argument takes a list"
" of :class:`ArgumentParser` objects, collects all the positional and "
"optional actions from them, and adds these actions to the "
":class:`ArgumentParser` object being constructed::"
msgstr ""
"ときどき、いくつかのパーサーが共通の引数セットを共有することがあります。それらの引数を繰り返し定義する代わりに、すべての共通引数を持ったパーサーを "
":class:`ArgumentParser` の ``parents=`` 引数に渡すことができます。 ``parents=`` 引数は "
":class:`ArgumentParser` "
"オブジェクトのリストを受け取り、すべての位置アクションとオプションのアクションをそれらから集め、そのアクションを構築中の "
":class:`ArgumentParser` オブジェクトに追加します::"
#: ../../library/argparse.rst:359
msgid ""
"Note that most parent parsers will specify ``add_help=False``. Otherwise, "
"the :class:`ArgumentParser` will see two ``-h/--help`` options (one in the "
"parent and one in the child) and raise an error."
msgstr ""
"一番親になるパーサーに ``add_help=False`` "
"を指定していることに注目してください。こうしないと、:class:`ArgumentParser` は2つの ``-h/--help`` "
"オプションを与えられる (1つは親から、もうひとつは子から) ことになり、エラーを発生します。"
#: ../../library/argparse.rst:364
msgid ""
"You must fully initialize the parsers before passing them via ``parents=``. "
"If you change the parent parsers after the child parser, those changes will "
"not be reflected in the child."
msgstr ""
"``parents=`` "
"に渡す前にパーサーを完全に初期化する必要があります。子パーサーを作成してから親パーサーを変更した場合、その変更は子パーサーに反映されません。"
#: ../../library/argparse.rst:370
msgid "formatter_class"
msgstr "formatter_class"
#: ../../library/argparse.rst:372
msgid ""
":class:`ArgumentParser` objects allow the help formatting to be customized "
"by specifying an alternate formatting class. Currently, there are four such"
" classes:"
msgstr ""
":class:`ArgumentParser` "
"オブジェクトは代わりのフォーマットクラスを指定することでヘルプのフォーマットをカスタマイズできます。現在、4つのフォーマットクラスがあります:"
#: ../../library/argparse.rst:381
msgid ""
":class:`RawDescriptionHelpFormatter` and :class:`RawTextHelpFormatter` give "
"more control over how textual descriptions are displayed. By default, "
":class:`ArgumentParser` objects line-wrap the description_ and epilog_ texts"
" in command-line help messages::"
msgstr ""
":class:`RawDescriptionHelpFormatter` と :class:`RawTextHelpFormatter` "
"はどのようにテキストの説明を表示するかを指定できます。デフォルトでは :class:`ArgumentParser` "
"オブジェクトはコマンドラインヘルプの中の description_ と epilog_ を折り返して表示します::"
#: ../../library/argparse.rst:406
msgid ""
"Passing :class:`RawDescriptionHelpFormatter` as ``formatter_class=`` "
"indicates that description_ and epilog_ are already correctly formatted and "
"should not be line-wrapped::"
msgstr ""
"``formatter_class=`` に :class:`RawDescriptionHelpFormatter` を渡した場合、 "
"description_ と epilog_ は整形済みとされ改行されません::"
#: ../../library/argparse.rst:432
msgid ""
":class:`RawTextHelpFormatter` maintains whitespace for all sorts of help "
"text, including argument descriptions. However, multiple new lines are "
"replaced with one. If you wish to preserve multiple blank lines, add spaces "
"between the newlines."
msgstr ""
":class:`RawTextHelpFormatter` "
"は引数の説明を含めてすべての種類のヘルプテキストで空白を維持します。例外として、複数の空行はひとつにまとめられます。複数の空白行を保ちたい場合には、行に空白を含めるようにして下さい。"
#: ../../library/argparse.rst:437
msgid ""
":class:`ArgumentDefaultsHelpFormatter` automatically adds information about "
"default values to each of the argument help messages::"
msgstr ":class:`ArgumentDefaultsHelpFormatter` は各引数のデフォルト値を自動的にヘルプに追加します::"
#: ../../library/argparse.rst:455
msgid ""
":class:`MetavarTypeHelpFormatter` uses the name of the type_ argument for "
"each argument as the display name for its values (rather than using the "
"dest_ as the regular formatter does)::"
msgstr ""
":class:`MetavarTypeHelpFormatter` は、各引数の値の表示名に type_ 引数の値を使用します (通常は dest_ "
"の値が使用されます)::"
#: ../../library/argparse.rst:476
msgid "prefix_chars"
msgstr "prefix_chars"
#: ../../library/argparse.rst:478
msgid ""
"Most command-line options will use ``-`` as the prefix, e.g. ``-f/--foo``. "
"Parsers that need to support different or additional prefix characters, e.g."
" for options like ``+f`` or ``/foo``, may specify them using the "
"``prefix_chars=`` argument to the ArgumentParser constructor::"
msgstr ""
"ほとんどのコマンドラインオプションは、``-f/--foo`` のように接頭辞に ``-`` を使います。``+f`` や ``/foo`` "
"のような、他の、あるいは追加の接頭辞文字をサポートしなければならない場合、ArgumentParser のコンストラクターに "
"``prefix_chars=`` 引数を使って指定します::"
#: ../../library/argparse.rst:490
msgid ""
"The ``prefix_chars=`` argument defaults to ``'-'``. Supplying a set of "
"characters that does not include ``-`` will cause ``-f/--foo`` options to be"
" disallowed."
msgstr ""
"``prefix_chars=`` 引数のデフォルトは ``'-'`` です。``-`` を含まない文字セットを指定すると、``-f/--foo`` "
"オプションが使用できなくなります。"
#: ../../library/argparse.rst:496
msgid "fromfile_prefix_chars"
msgstr "fromfile_prefix_chars"
#: ../../library/argparse.rst:498
msgid ""
"Sometimes, for example when dealing with a particularly long argument lists,"
" it may make sense to keep the list of arguments in a file rather than "
"typing it out at the command line. If the ``fromfile_prefix_chars=`` "
"argument is given to the :class:`ArgumentParser` constructor, then arguments"
" that start with any of the specified characters will be treated as files, "
"and will be replaced by the arguments they contain. For example::"
msgstr ""
"ときどき、例えば非常に長い引数リストを扱う場合に、その引数リストを毎回コマンドラインにタイプする代わりにファイルに置いておきたい場合があります。:class:`ArgumentParser`"
" のコンストラクターに ``fromfile_prefix_chars=`` "
"引数が渡された場合、指定された文字のいずれかで始まる引数はファイルとして扱われ、そのファイルに含まれる引数リストに置換されます。例えば::"
#: ../../library/argparse.rst:512
msgid ""
"Arguments read from a file must by default be one per line (but see also "
":meth:`~ArgumentParser.convert_arg_line_to_args`) and are treated as if they"
" were in the same place as the original file referencing argument on the "
"command line. So in the example above, the expression ``['-f', 'foo', "
"'@args.txt']`` is considered equivalent to the expression ``['-f', 'foo', "
"'-f', 'bar']``."
msgstr ""
"ファイルから読み込まれる引数は、デフォルトでは1行に1つ "
"(ただし、:meth:`~ArgumentParser.convert_arg_line_to_args` も参照してください) "
"で、コマンドライン上でファイルを参照する引数があった場所にその引数があったものとして扱われます。このため、上の例では、``['-f', 'foo', "
"'@args.txt']`` は ``['-f', 'foo', '-f', 'bar']`` と等価になります。"
#: ../../library/argparse.rst:518
msgid ""
"The ``fromfile_prefix_chars=`` argument defaults to ``None``, meaning that "
"arguments will never be treated as file references."
msgstr ""
"``fromfile_prefix_chars=`` 引数のデフォルト値は ``None`` "
"で、引数がファイル参照として扱われることがないことを意味しています。"
#: ../../library/argparse.rst:523
msgid "argument_default"
msgstr "argument_default"
#: ../../library/argparse.rst:525
msgid ""
"Generally, argument defaults are specified either by passing a default to "
":meth:`~ArgumentParser.add_argument` or by calling the "
":meth:`~ArgumentParser.set_defaults` methods with a specific set of name-"
"value pairs. Sometimes however, it may be useful to specify a single "
"parser-wide default for arguments. This can be accomplished by passing the "
"``argument_default=`` keyword argument to :class:`ArgumentParser`. For "
"example, to globally suppress attribute creation on "
":meth:`~ArgumentParser.parse_args` calls, we supply "
"``argument_default=SUPPRESS``::"
msgstr ""
"一般的には、引数のデフォルト値は :meth:`~ArgumentParser.add_argument` "
"メソッドにデフォルト値を渡すか、:meth:`~ArgumentParser.set_defaults` "
"メソッドに名前と値のペアを渡すことで指定します。しかしまれに、1つのパーサー全体に適用されるデフォルト引数が便利なことがあります。これを行うには、 "
":class:`ArgumentParser` に ``argument_default=`` キーワード引数を渡します。例えば、全体で "
":meth:`~ArgumentParser.parse_args` "
"メソッド呼び出しの属性の生成を抑制するには、``argument_default=SUPPRESS`` を指定します::"
#: ../../library/argparse.rst:545
msgid "allow_abbrev"
msgstr "allow_abbrev"
#: ../../library/argparse.rst:547
msgid ""
"Normally, when you pass an argument list to the "
":meth:`~ArgumentParser.parse_args` method of an :class:`ArgumentParser`, it "
":ref:`recognizes abbreviations <prefix-matching>` of long options."
msgstr ""
"通常、:class:`ArgumentParser` の :meth:`~ArgumentParser.parse_args` "
"に引数のリストを渡すとき、長いオプションは :ref:`短縮しても認識されます <prefix-matching>`。"
#: ../../library/argparse.rst:551
msgid ""
"This feature can be disabled by setting ``allow_abbrev`` to ``False``::"
msgstr "この機能は、``allow_abbrev`` に ``False`` を指定することで無効にできます::"
#: ../../library/argparse.rst:564
msgid "conflict_handler"
msgstr "conflict_handler"
#: ../../library/argparse.rst:566
msgid ""
":class:`ArgumentParser` objects do not allow two actions with the same "
"option string. By default, :class:`ArgumentParser` objects raise an "
"exception if an attempt is made to create an argument with an option string "
"that is already in use::"
msgstr ""
":class:`ArgumentParser` オブジェクトは同じオプション文字列に対して複数のアクションを許可していません。\n"
"デフォルトでは、:class:`ArgumentParser` オブジェクトは、すでに利用されているオプション文字列を使って新しい引数をつくろうとしたときに例外を送出します::"
#: ../../library/argparse.rst:578
msgid ""
"Sometimes (e.g. when using parents_) it may be useful to simply override any"
" older arguments with the same option string. To get this behavior, the "
"value ``'resolve'`` can be supplied to the ``conflict_handler=`` argument of"
" :class:`ArgumentParser`::"
msgstr ""
"ときどき (例えば parents_ "
"を利用する場合など)、古い引数を同じオプション文字列で上書きするほうが便利な場合があります。この動作をするには、:class:`ArgumentParser`"
" の ``conflict_handler=`` 引数に ``'resolve'`` を渡します::"
#: ../../library/argparse.rst:594
msgid ""
"Note that :class:`ArgumentParser` objects only remove an action if all of "
"its option strings are overridden. So, in the example above, the old "
"``-f/--foo`` action is retained as the ``-f`` action, because only the "
"``--foo`` option string was overridden."
msgstr ""
":class:`ArgumentParser` "
"オブジェクトは、すべてのオプション文字列が上書きされた場合にだけアクションを削除することに注目してください。上の例では、 ``--foo`` "
"オプション文字列だけが上書きされているので、古い ``-f/--foo`` アクションは ``-f`` アクションとして残っています。"
#: ../../library/argparse.rst:601
msgid "add_help"
msgstr "add_help"
#: ../../library/argparse.rst:603
msgid ""
"By default, ArgumentParser objects add an option which simply displays the "
"parser's help message. For example, consider a file named ``myprogram.py`` "
"containing the following code::"
msgstr ""
"デフォルトでは、ArgumentParser "
"オブジェクトはシンプルにパーサーのヘルプメッセージを表示するオプションを自動的に追加します。例えば、以下のコードを含む ``myprogram.py``"
" ファイルについて考えてください::"
#: ../../library/argparse.rst:612
msgid ""
"If ``-h`` or ``--help`` is supplied at the command line, the ArgumentParser "
"help will be printed:"
msgstr "コマンドラインに ``-h`` か ``--help`` が指定された場合、ArgumentParser の help が表示されます:"
#: ../../library/argparse.rst:624
msgid ""
"Occasionally, it may be useful to disable the addition of this help option. "
"This can be achieved by passing ``False`` as the ``add_help=`` argument to "
":class:`ArgumentParser`::"
msgstr ""
"必要に応じて、この help オプションを無効にする場合があります。これは :class:`ArgumentParser` の "
"``add_help=`` 引数に ``False`` を渡すことで可能です::"
#: ../../library/argparse.rst:636
msgid ""
"The help option is typically ``-h/--help``. The exception to this is if the "
"``prefix_chars=`` is specified and does not include ``-``, in which case "
"``-h`` and ``--help`` are not valid options. In this case, the first "
"character in ``prefix_chars`` is used to prefix the help options::"
msgstr ""
"ヘルプオプションは通常 ``-h/--help`` です。例外は ``prefix_chars=`` が指定されてその中に ``-`` "
"が無かった場合で、その場合は ``-h`` と ``--help`` は有効なオプションではありません。この場合、``prefix_chars`` "
"の最初の文字がヘルプオプションの接頭辞として利用されます::"
#: ../../library/argparse.rst:651
msgid "The add_argument() method"
msgstr "add_argument() メソッド"
#: ../../library/argparse.rst:657
msgid ""
"Define how a single command-line argument should be parsed. Each parameter "
"has its own more detailed description below, but in short they are:"
msgstr "1つのコマンドライン引数がどう解析されるかを定義します。各引数についての詳細は後述しますが、簡単に言うと:"
#: ../../library/argparse.rst:660
msgid ""
"`name or flags`_ - Either a name or a list of option strings, e.g. ``foo`` "
"or ``-f, --foo``."
msgstr ""
"`name または flags`_ - 名前か、あるいはオプション文字列のリスト (例: ``foo`` や ``-f, --foo``)。"
#: ../../library/argparse.rst:663
msgid ""
"action_ - The basic type of action to be taken when this argument is "
"encountered at the command line."
msgstr "action_ - コマンドラインにこの引数があったときのアクション。"
#: ../../library/argparse.rst:666
msgid "nargs_ - The number of command-line arguments that should be consumed."
msgstr "nargs_ - 受け取るべきコマンドライン引数の数。"
#: ../../library/argparse.rst:668
msgid ""
"const_ - A constant value required by some action_ and nargs_ selections."
msgstr "const_ - 一部の action_ と nargs_ の組み合わせで利用される定数。"
#: ../../library/argparse.rst:670
msgid ""
"default_ - The value produced if the argument is absent from the command "
"line."
msgstr "default_ - コマンドラインに引数がなかった場合に生成される値。"
#: ../../library/argparse.rst:673
msgid ""
"type_ - The type to which the command-line argument should be converted."
msgstr "type_ - コマンドライン引数が変換されるべき型。"
#: ../../library/argparse.rst:675
msgid "choices_ - A container of the allowable values for the argument."
msgstr "choices_ - 引数として許される値のコンテナー。"
#: ../../library/argparse.rst:677
msgid ""
"required_ - Whether or not the command-line option may be omitted (optionals"
" only)."
msgstr "required_ - コマンドラインオプションが省略可能かどうか (オプション引数のみ)。"
#: ../../library/argparse.rst:680
msgid "help_ - A brief description of what the argument does."
msgstr "help_ - 引数が何なのかを示す簡潔な説明。"
#: ../../library/argparse.rst:682
msgid "metavar_ - A name for the argument in usage messages."
msgstr "metavar_ - 使用法メッセージの中で使われる引数の名前。"
#: ../../library/argparse.rst:684
msgid ""
"dest_ - The name of the attribute to be added to the object returned by "
":meth:`parse_args`."
msgstr "dest_ - :meth:`parse_args` が返すオブジェクトに追加される属性名。"
#: ../../library/argparse.rst:691
msgid "name or flags"
msgstr "name または flags"
#: ../../library/argparse.rst:693
msgid ""
"The :meth:`~ArgumentParser.add_argument` method must know whether an "
"optional argument, like ``-f`` or ``--foo``, or a positional argument, like "
"a list of filenames, is expected. The first arguments passed to "
":meth:`~ArgumentParser.add_argument` must therefore be either a series of "
"flags, or a simple argument name. For example, an optional argument could "
"be created like::"
msgstr ""
":meth:`~ArgumentParser.add_argument` メソッドは、指定されている引数が ``-f`` や ``--foo`` "
"のようなオプション引数なのか、ファイル名リストなどの位置引数なのかを知る必要があります。そのため、:meth:`~ArgumentParser.add_argument`"
" の第1引数は、フラグのリストか、シンプルな引数名のどちらかになります。例えば、オプション引数は次のようにして作成します::"
#: ../../library/argparse.rst:702
msgid "while a positional argument could be created like::"
msgstr "一方、位置引数は次のように作成します::"
#: ../../library/argparse.rst:706
msgid ""
"When :meth:`~ArgumentParser.parse_args` is called, optional arguments will "
"be identified by the ``-`` prefix, and the remaining arguments will be "
"assumed to be positional::"
msgstr ""
":meth:`~ArgumentParser.parse_args` が呼ばれたとき、オプション引数は接頭辞 ``-`` "
"により識別され、それ以外の引数は位置引数として扱われます::"
#: ../../library/argparse.rst:723
msgid "action"
msgstr "action"
#: ../../library/argparse.rst:725
msgid ""
":class:`ArgumentParser` objects associate command-line arguments with "
"actions. These actions can do just about anything with the command-line "
"arguments associated with them, though most actions simply add an attribute "
"to the object returned by :meth:`~ArgumentParser.parse_args`. The "
"``action`` keyword argument specifies how the command-line arguments should "
"be handled. The supplied actions are:"
msgstr ""
":class:`ArgumentParser` "
"オブジェクトはコマンドライン引数にアクションを割り当てます。このアクションは、割り当てられたコマンドライン引数に関してどんな処理でもできますが、ほとんどのアクションは単に"
" :meth:`~ArgumentParser.parse_args` が返すオブジェクトに属性を追加するだけです。``action`` "
"キーワード引数は、コマンドライン引数がどう処理されるかを指定します。提供されているアクションは:"
#: ../../library/argparse.rst:731
msgid ""
"``'store'`` - This just stores the argument's value. This is the default "
"action. For example::"
msgstr "``'store'`` - これは単に引数の値を格納します。これはデフォルトのアクションです。例えば::"
#: ../../library/argparse.rst:739
msgid ""
"``'store_const'`` - This stores the value specified by the const_ keyword "
"argument. The ``'store_const'`` action is most commonly used with optional "
"arguments that specify some sort of flag. For example::"
msgstr ""
"``'store_const'`` - このアクションは const_ キーワード引数で指定された値を格納します。``'store_const'`` "
"アクションは、何かの種類のフラグを指定するオプション引数によく使われます。例えば:"
#: ../../library/argparse.rst:748
msgid ""
"``'store_true'`` and ``'store_false'`` - These are special cases of "
"``'store_const'`` used for storing the values ``True`` and ``False`` "
"respectively. In addition, they create default values of ``False`` and "
"``True`` respectively. For example::"
msgstr ""
"``'store_true'``, ``'store_false'`` - これらは ``'store_const'`` の、それぞれ ``True``"
" と ``False`` を格納する特別版になります。加えて、これらはそれぞれデフォルト値を順に ``False`` と ``True`` "
"にします。例えば::"
#: ../../library/argparse.rst:760
msgid ""
"``'append'`` - This stores a list, and appends each argument value to the "
"list. This is useful to allow an option to be specified multiple times. "
"Example usage::"
msgstr ""
"``'append'`` - "
"このアクションはリストを格納して、各引数の値をそのリストに追加します。このアクションは複数回指定を許可したいオプションに便利です。利用例::"
#: ../../library/argparse.rst:769
msgid ""
"``'append_const'`` - This stores a list, and appends the value specified by "
"the const_ keyword argument to the list. (Note that the const_ keyword "
"argument defaults to ``None``.) The ``'append_const'`` action is typically "
"useful when multiple arguments need to store constants to the same list. For"
" example::"
msgstr ""
"``'append_const'`` - このアクションはリストを格納して、const_ キーワード引数に与えられた値をそのリストに追加します "
"(const_ キーワード引数のデフォルト値はあまり役に立たない ``None`` であることに注意)。``'append_const'`` "
"アクションは、定数を同じリストに複数回格納する場合に便利です。例えば::"
#: ../../library/argparse.rst:781
msgid ""
"``'count'`` - This counts the number of times a keyword argument occurs. For"
" example, this is useful for increasing verbosity levels::"
msgstr "``'count'`` - このアクションはキーワード引数の数を数えます。例えば、verboseレベルを上げるのに役立ちます::"
#: ../../library/argparse.rst:789
msgid "Note, the *default* will be ``None`` unless explicitly set to *0*."
msgstr "*default* は明示的に *0* と指定されない場合は ``None`` であることに注意してください。"
#: ../../library/argparse.rst:791
msgid ""
"``'help'`` - This prints a complete help message for all the options in the "
"current parser and then exits. By default a help action is automatically "
"added to the parser. See :class:`ArgumentParser` for details of how the "
"output is created."
msgstr ""
"``'help'`` - このアクションは現在のパーサー中のすべてのオプションのヘルプメッセージを表示し、終了します。出力の生成方法の詳細については "
":class:`ArgumentParser` を参照してください。"
#: ../../library/argparse.rst:796
msgid ""
"``'version'`` - This expects a ``version=`` keyword argument in the "
":meth:`~ArgumentParser.add_argument` call, and prints version information "
"and exits when invoked::"
msgstr ""
"``'version'`` - このアクションは :meth:`~ArgumentParser.add_argument` の呼び出しに "
"``version=`` キーワード引数を期待します。指定されたときはバージョン情報を表示して終了します::"
#: ../../library/argparse.rst:806
msgid ""
"``'extend'`` - This stores a list, and extends each argument value to the "
"list. Example usage::"
msgstr "``'extend'`` - このアクションはリストを格納して、各引数の値でそのリストを拡張します。利用例::"
#: ../../library/argparse.rst:817
msgid ""
"You may also specify an arbitrary action by passing an Action subclass or "
"other object that implements the same interface. The recommended way to do "
"this is to extend :class:`Action`, overriding the ``__call__`` method and "
"optionally the ``__init__`` method."
msgstr ""
"Action "
"のサブクラスまたは同じインターフェイスを実装したほかのオブジェクト渡すことで、任意のアクションを指定することもできます。これをするお奨めの方法は、 "
":class:`argparse.Action` を継承して、 ``__call__`` と、必要であれば ``__init__`` "
"をオーバライドすることです。"
#: ../../library/argparse.rst:822
msgid "An example of a custom action::"
msgstr "カスタムアクションの例です::"
#: ../../library/argparse.rst:842
msgid "For more details, see :class:`Action`."
msgstr "詳細は :class:`Action` を参照してください。"
#: ../../library/argparse.rst:845
msgid "nargs"
msgstr "nargs"
#: ../../library/argparse.rst:847
msgid ""
"ArgumentParser objects usually associate a single command-line argument with"
" a single action to be taken. The ``nargs`` keyword argument associates a "
"different number of command-line arguments with a single action. The "
"supported values are:"
msgstr ""
"ArgumentParser オブジェクトは通常1つのコマンドライン引数を1つのアクションに渡します。``nargs`` "
"キーワード引数は1つのアクションにそれ以外の数のコマンドライン引数を割り当てます。指定できる値は:"
#: ../../library/argparse.rst:852
msgid ""
"``N`` (an integer). ``N`` arguments from the command line will be gathered "
"together into a list. For example::"
msgstr "``N`` (整数) -- ``N`` 個の引数がコマンドラインから集められ、リストに格納されます。例えば::"
#: ../../library/argparse.rst:861
msgid ""
"Note that ``nargs=1`` produces a list of one item. This is different from "
"the default, in which the item is produced by itself."
msgstr "``nargs=1`` は1要素のリストを作ることに注意してください。これはデフォルトの、要素がそのまま属性になる動作とは異なります。"
#: ../../library/argparse.rst:866
msgid ""
"``'?'``. One argument will be consumed from the command line if possible, "
"and produced as a single item. If no command-line argument is present, the "
"value from default_ will be produced. Note that for optional arguments, "
"there is an additional case - the option string is present but not followed "
"by a command-line argument. In this case the value from const_ will be "
"produced. Some examples to illustrate this::"
msgstr ""
"``'?'`` -- 可能なら1つの引数がコマンドラインから取られ、1つのアイテムを作ります。コマンドライン引数が存在しない場合、default_ "
"の値が生成されます。オプション引数の場合、さらにオプション引数が指定され、その後にコマンドライン引数がないというケースもありえます。この場合は "
"const_ の値が生成されます。この動作の例です::"
#: ../../library/argparse.rst:883
msgid ""
"One of the more common uses of ``nargs='?'`` is to allow optional input and "
"output files::"
msgstr "``nargs='?'`` のよくある利用例の1つは、入出力ファイルの指定オプションです::"
#: ../../library/argparse.rst:900
msgid ""
"``'*'``. All command-line arguments present are gathered into a list. Note"
" that it generally doesn't make much sense to have more than one positional "
"argument with ``nargs='*'``, but multiple optional arguments with "
"``nargs='*'`` is possible. For example::"
msgstr ""
"``'*'`` -- すべてのコマンドライン引数がリストに集められます。複数の位置引数が ``nargs='*'`` "
"を持つことにあまり意味はありませんが、複数のオプション引数が ``nargs='*'`` を持つことはありえます。例えば::"
#: ../../library/argparse.rst:914
msgid ""
"``'+'``. Just like ``'*'``, all command-line args present are gathered into "
"a list. Additionally, an error message will be generated if there wasn't at"
" least one command-line argument present. For example::"
msgstr ""
"``'+'`` -- ``'*'`` "
"と同じように、すべてのコマンドライン引数をリストに集めます。加えて、最低でも1つのコマンドライン引数が存在しない場合にエラーメッセージを生成します。例えば::"
#: ../../library/argparse.rst:928
msgid ""
"``argparse.REMAINDER``. All the remaining command-line arguments are "
"gathered into a list. This is commonly useful for command line utilities "
"that dispatch to other command line utilities::"
msgstr ""
"``argparse.REMAINDER`` -- "
"コマンドライン引数の残りすべてをリストとして集めます。これは他のコマンドラインツールに対して処理を渡すようなツールによく使われます。例えば::"
#: ../../library/argparse.rst:939
msgid ""
"If the ``nargs`` keyword argument is not provided, the number of arguments "
"consumed is determined by the action_. Generally this means a single "
"command-line argument will be consumed and a single item (not a list) will "
"be produced."
msgstr ""
"``nargs`` キーワード引数が指定されない場合、受け取る引数の数は action_ "
"によって決定されます。通常これは、1つのコマンドライン引数は1つのアイテムになる (リストにはならない) ことを意味します。"
#: ../../library/argparse.rst:945
msgid "const"
msgstr "const"
#: ../../library/argparse.rst:947
msgid ""
"The ``const`` argument of :meth:`~ArgumentParser.add_argument` is used to "
"hold constant values that are not read from the command line but are "
"required for the various :class:`ArgumentParser` actions. The two most "
"common uses of it are:"
msgstr ""
":meth:`~ArgumentParser.add_argument` の ``const`` 引数は、コマンドライン引数から読み込まれないけれども "
":class:`ArgumentParser` のいくつかのアクションで必要とされる値のために使われます。この引数のよくある2つの使用法は:"
#: ../../library/argparse.rst:951
msgid ""
"When :meth:`~ArgumentParser.add_argument` is called with "
"``action='store_const'`` or ``action='append_const'``. These actions add "
"the ``const`` value to one of the attributes of the object returned by "
":meth:`~ArgumentParser.parse_args`. See the action_ description for "
"examples."
msgstr ""
":meth:`~ArgumentParser.add_argument` が ``action='store_const'`` か "
"``action='append_const'`` で呼び出されたとき、これらのアクションは ``const`` の値を "
":meth:`~ArgumentParser.parse_args` が返すオブジェクトの属性に追加します。サンプルは action_ "
"の説明を参照してください。"
#: ../../library/argparse.rst:956
msgid ""
"When :meth:`~ArgumentParser.add_argument` is called with option strings "
"(like ``-f`` or ``--foo``) and ``nargs='?'``. This creates an optional "
"argument that can be followed by zero or one command-line arguments. When "
"parsing the command line, if the option string is encountered with no "
"command-line argument following it, the value of ``const`` will be assumed "
"instead. See the nargs_ description for examples."
msgstr ""
":meth:`~ArgumentParser.add_argument` がオプション文字列 (``-f`` や ``--foo``) と "
"``nargs='?'`` "
"で呼び出された場合。この場合0個か1つのコマンドライン引数を取るオプション引数が作られます。オプション引数にコマンドライン引数が続かなかった場合、 "
"``const`` の値が代わりに利用されます。サンプルは nargs_ の説明を参照してください。"
#: ../../library/argparse.rst:963
msgid ""
"With the ``'store_const'`` and ``'append_const'`` actions, the ``const`` "
"keyword argument must be given. For other actions, it defaults to ``None``."
msgstr ""
"``'store_const'`` と ``'append_const'`` アクションでは、 ``const`` "