@@ -86,7 +86,7 @@ msgstr ""
86
86
"一切の引数解析を行わなくなります。Argument Clinic が生成するコードがブラック"
87
87
"ボックスになり、CPython がそのブラックボックスの先頭を呼び出し、最後にその関"
88
88
"数のコードが呼ばれます。引数の ``PyObject *args`` (と ``PyObject *kwargs``) "
89
- "は暗黙的に、必要な型のC言語の変数に変換されます 。"
89
+ "は暗黙的に、必要な型の C の変数に変換されます 。"
90
90
91
91
#: ../../howto/clinic.rst:43
92
92
msgid ""
@@ -368,6 +368,10 @@ msgid ""
368
368
"should have just the text, based at the left margin, with no line wider than "
369
369
"80 characters. (Argument Clinic will preserve indents inside the docstring.)"
370
370
msgstr ""
371
+ "docstring を切り取って ``[clinic]`` の行の間に貼り付け、適切にクォートされた "
372
+ "C の文字列になるようにガラクタを全て削除します。そうすると、80文字以上の行が"
373
+ "ない、左マージンに揃えられた、テキストだけになるはずです。 (Argument Clinic "
374
+ "は docstring 内のインデントを保持します。)"
371
375
372
376
#: ../../howto/clinic.rst:201
373
377
msgid ""
@@ -376,6 +380,10 @@ msgid ""
376
380
"``help()`` on your builtin in the future, the first line will be built "
377
381
"automatically based on the function's signature.)"
378
382
msgstr ""
383
+ "古い docstring の最初の行に関数シグネチャのようなものがある場合は、その行を破"
384
+ "棄します。 (docstring は最早必要ありません — 将来あなたのビルトインで "
385
+ "``help()`` を使うときは、 最初の行は、 関数のシグネチャに基づいて自動的にビル"
386
+ "ドされます。)"
379
387
380
388
#: ../../howto/clinic.rst:207 ../../howto/clinic.rst:228
381
389
#: ../../howto/clinic.rst:252 ../../howto/clinic.rst:310
@@ -391,12 +399,17 @@ msgid ""
391
399
"paragraph consisting of a single 80-column line at the beginning of the "
392
400
"docstring."
393
401
msgstr ""
402
+ "あなたの docstring に「要約」(summary)行がない場合、 Argument Clinic は文句を"
403
+ "言います。 なので、それがあることを確認しましょう。 「要約」行は、 docstring "
404
+ "の先頭にあり、 80 桁以内の単一の行で構成される段落である必要があります。"
394
405
395
406
#: ../../howto/clinic.rst:218
396
407
msgid ""
397
408
"(Our example docstring consists solely of a summary line, so the sample code "
398
409
"doesn't have to change for this step.)"
399
410
msgstr ""
411
+ "(例の docstring は要約行のみで構成されているため、このステップではサンプル・"
412
+ "コードを変更する必要はありません。)"
400
413
401
414
#: ../../howto/clinic.rst:221
402
415
msgid ""
@@ -406,6 +419,10 @@ msgid ""
406
419
"module, include any sub-modules, and if the function is a method on a class "
407
420
"it should include the class name too."
408
421
msgstr ""
422
+ "docstring に関数の名前を入力し、その後に空白行を入力します。 これは関数の "
423
+ "Python 名であり、 関数への完全なドット・パス(full dotted path)である必要があ"
424
+ "ります。つまり、それはモジュール名で始まり、サブモジュールが含まれている必要"
425
+ "があり、関数がクラスのメソッドである場合は、クラス名も含める必要があります。"
409
426
410
427
#: ../../howto/clinic.rst:236
411
428
msgid ""
@@ -416,46 +433,65 @@ msgid ""
416
433
"statics go at the top. (In our sample code we'll just show the two blocks "
417
434
"next to each other.)"
418
435
msgstr ""
436
+ "モジュールまたはクラスがこの C ファイルの Argument Clinic で初めて使用される"
437
+ "場合は、モジュール および/または クラスを宣言する必要があります。 Argument "
438
+ "Clinic 界隈では、これらを C ファイルの先頭近くの別のブロックで宣言することが"
439
+ "好ましいとされます。これは、インクルード・ファイル や statics が先頭に配置さ"
440
+ "れるのと同一の手法です。 (なお、 このコード例では、説明の都合上 2 つのブロッ"
441
+ "クを続けて表示しています。)"
419
442
420
443
#: ../../howto/clinic.rst:244
421
444
msgid ""
422
445
"The name of the class and module should be the same as the one seen by "
423
446
"Python. Check the name defined in the :c:type:`PyModuleDef` or :c:type:"
424
447
"`PyTypeObject` as appropriate."
425
448
msgstr ""
449
+ "クラス名とモジュール名は、 Python で表示されるものと同一にする必要がありま"
450
+ "す。 :c:type:`PyModuleDef` または :c:type:`PyTypeObject` で定義されている名前"
451
+ "を適宜確認してください。"
426
452
427
453
#: ../../howto/clinic.rst:248
428
454
msgid ""
429
455
"When you declare a class, you must also specify two aspects of its type in "
430
456
"C: the type declaration you'd use for a pointer to an instance of this "
431
457
"class, and a pointer to the :c:type:`PyTypeObject` for this class."
432
458
msgstr ""
459
+ "クラスを宣言するときは、 C では、その型の 2 つの側面も指定する必要がありま"
460
+ "す。 それは、このクラスのインスタンスへのポインタに使用する型宣言と、このクラ"
461
+ "スの :c:type:`PyTypeObject` へのポインタに使用する型宣言です。"
433
462
434
463
#: ../../howto/clinic.rst:268
435
464
msgid ""
436
465
"Declare each of the parameters to the function. Each parameter should get "
437
466
"its own line. All the parameter lines should be indented from the function "
438
467
"name and the docstring."
439
468
msgstr ""
469
+ "関数のための各引数(parameters)を宣言します。 各引数は、それぞれ独立した行であ"
470
+ "る必要があります。すべての引数行は、関数名と docstring からインデントさせる必"
471
+ "要があります。"
440
472
441
473
#: ../../howto/clinic.rst:272
442
474
msgid "The general form of these parameter lines is as follows:"
443
- msgstr ""
475
+ msgstr "これらの引数行の一般的な形式は以下のとおりです: "
444
476
445
477
#: ../../howto/clinic.rst:278
446
478
msgid "If the parameter has a default value, add that after the converter:"
447
479
msgstr ""
480
+ "引数にデフォルト値がある場合は、コンバーター(converter)の後に追加します:"
448
481
449
482
#: ../../howto/clinic.rst:285
450
483
msgid ""
451
484
"Argument Clinic's support for \" default values\" is quite sophisticated; "
452
485
"please see :ref:`the section below on default values <default_values>` for "
453
486
"more information."
454
487
msgstr ""
488
+ "「デフォルト値」に対する Argument Clinic のサポートは非常に洗練されています。"
489
+ "詳細については、 :ref:`下記 引数のデフォルト値 セクション <default_values>` "
490
+ "を参照してください。"
455
491
456
492
#: ../../howto/clinic.rst:289
457
493
msgid "Add a blank line below the parameters."
458
- msgstr ""
494
+ msgstr "全ての引数の下に空白行を追加します。 "
459
495
460
496
#: ../../howto/clinic.rst:291
461
497
msgid ""
@@ -465,6 +501,10 @@ msgid ""
465
501
"convenience syntax intended to make porting old code into Argument Clinic "
466
502
"easier."
467
503
msgstr ""
504
+ "「コンバーター」(converter)は、 C で使用される変数の型と、実行時に Python の"
505
+ "値を C の値に変換する方法の、両方を確立します。 ここでは、 「レガシー・コン"
506
+ "バーター」(legacy converter) と呼ばれるものを使用します。これは、古いコード"
507
+ "を Argument Clinic に簡単に移植できるようにするための便利な構文です。"
468
508
469
509
#: ../../howto/clinic.rst:298
470
510
msgid ""
@@ -475,57 +515,84 @@ msgid ""
475
515
"parsing function what the type of the variable is and how to convert it. "
476
516
"For more on format units please see :ref:`arg-parsing`.)"
477
517
msgstr ""
518
+ "各引数について、その引数の「フォーマット単位」を ``PyArg_Parse()`` のフォー"
519
+ "マット引数からコピーし、 引用符に囲まれた文字列にして、 *that* にコンバーター"
520
+ "として指定します。 (「フォーマット単位」(format unit)とは、引数解析関数に変数"
521
+ "の型とその変換方法を伝える ``format`` パラメータの 1 ~ 3 文字の部分文字列の"
522
+ "正式な名前です。フォーマット単位の詳細については、 :ref:`arg-parsing` を参照"
523
+ "してください。)"
478
524
479
525
#: ../../howto/clinic.rst:307
480
526
msgid ""
481
527
"For multicharacter format units like ``z#``, use the entire two-or-three "
482
528
"character string."
483
529
msgstr ""
530
+ "``z#`` のような複数文字のフォーマット単位の場合、2または3文字の文字列全体を使"
531
+ "用します。"
484
532
485
533
#: ../../howto/clinic.rst:325
486
534
msgid ""
487
535
"If your function has ``|`` in the format string, meaning some parameters "
488
536
"have default values, you can ignore it. Argument Clinic infers which "
489
537
"parameters are optional based on whether or not they have default values."
490
538
msgstr ""
539
+ "関数のフォーマット文字列に ``|`` が含まれている場合、つまり一部の引数にデフォ"
540
+ "ルト値がある場合は、無視してかまいません。 Argument Clinic は、デフォルト値が"
541
+ "あるかどうかに基づいて、どの引数がオプションなのかを推測します。"
491
542
492
543
#: ../../howto/clinic.rst:330
493
544
msgid ""
494
545
"If your function has ``$`` in the format string, meaning it takes keyword-"
495
546
"only arguments, specify ``*`` on a line by itself before the first keyword-"
496
547
"only argument, indented the same as the parameter lines."
497
548
msgstr ""
549
+ "関数のフォーマット文字列に ``$`` が含まれている場合、つまりキーワードのみの引"
550
+ "数を取る場合は、最初のキーワードのみの引数の、前の行に ``*`` を単独で指定し、"
551
+ "引数行と同一のインデントを行います。"
498
552
499
553
#: ../../howto/clinic.rst:335
500
554
msgid "(``_pickle.Pickler.dump`` has neither, so our sample is unchanged.)"
501
555
msgstr ""
556
+ "(なお、 ``_pickle.Pickler.dump`` にはどちらも含まれていないため、サンプルは変"
557
+ "更されていません。)"
502
558
503
559
#: ../../howto/clinic.rst:338
504
560
msgid ""
505
561
"If the existing C function calls :c:func:`PyArg_ParseTuple` (as opposed to :"
506
562
"c:func:`PyArg_ParseTupleAndKeywords`), then all its arguments are positional-"
507
563
"only."
508
564
msgstr ""
565
+ "既存の C 関数が、(:c:func:`PyArg_ParseTupleAndKeywords` ではなく、) :c:func:"
566
+ "`PyArg_ParseTuple` を呼び出す場合、そのすべての引数は位置のみです(positional-"
567
+ "only)。"
509
568
510
569
#: ../../howto/clinic.rst:342
511
570
msgid ""
512
571
"To mark all parameters as positional-only in Argument Clinic, add a ``/`` on "
513
572
"a line by itself after the last parameter, indented the same as the "
514
573
"parameter lines."
515
574
msgstr ""
575
+ "Argument Clinic ですべての引数を位置のみ(positional-only)としてマークするに"
576
+ "は、引数行と同一のインデントにして、最後の引数の次の行に ``/`` を追加します。"
516
577
517
578
#: ../../howto/clinic.rst:346
518
579
msgid ""
519
580
"Currently this is all-or-nothing; either all parameters are positional-only, "
520
581
"or none of them are. (In the future Argument Clinic may relax this "
521
582
"restriction.)"
522
583
msgstr ""
584
+ "現在のところ、これは、すべての引数が位置のみ(positional-only)であるか、全てが"
585
+ "そうでないかのどちらかです(all-or-nothing)。 (Argument Clinic は将来はこの制"
586
+ "限を緩和する可能性もあります。)"
523
587
524
588
#: ../../howto/clinic.rst:366
525
589
msgid ""
526
590
"It's helpful to write a per-parameter docstring for each parameter. But per-"
527
591
"parameter docstrings are optional; you can skip this step if you prefer."
528
592
msgstr ""
593
+ "各引数に引数ごとの docstring (per-parameter docstring)を記述すると助けになり"
594
+ "ます。 ただし、引数ごとの docstring はオプションですので、必要に応じて、この"
595
+ "手順はスキップできます。"
529
596
530
597
#: ../../howto/clinic.rst:370
531
598
msgid ""
@@ -536,33 +603,50 @@ msgid ""
536
603
"amount. You can write as much text as you like, across multiple lines if "
537
604
"you wish."
538
605
msgstr ""
606
+ "引数ごとの docstring を追加する方法: 引数ごとの docstring の最初の行は、引数"
607
+ "行定義よりもさらにインデントする必要があります。 この最初の行の左マージンは、"
608
+ "引数ごとの docstring 全体の左マージンを確定します。 あなたが書くすべてのテキ"
609
+ "ストは、この左マージン量だけアウトデントされます。 必要に応じて、複数行にまた"
610
+ "がって、好きなだけテキストを書くことができます。"
539
611
540
612
#: ../../howto/clinic.rst:394
541
613
msgid ""
542
614
"Save and close the file, then run ``Tools/clinic/clinic.py`` on it. With "
543
615
"luck everything worked---your block now has output, and a ``.c.h`` file has "
544
616
"been generated! Reopen the file in your text editor to see::"
545
617
msgstr ""
618
+ "ファイルを保存して閉じ、 そのファイルに対して ``Tools/clinic/clinic.py`` を実"
619
+ "行します。 運が良ければすべてうまくいきます --- つまり、 Argument Clinic ブ"
620
+ "ロックに出力があり、かつ、 ``.c.h`` ファイルが生成されまます! テキスト・エ"
621
+ "ディタでそのファイルを再度開いて確認します::"
546
622
547
623
#: ../../howto/clinic.rst:413
548
624
msgid ""
549
625
"Obviously, if Argument Clinic didn't produce any output, it's because it "
550
626
"found an error in your input. Keep fixing your errors and retrying until "
551
627
"Argument Clinic processes your file without complaint."
552
628
msgstr ""
629
+ "Argument Clinic が明らかに出力を生成しなかった場合、それは入力にエラーが見つ"
630
+ "かったためです。 Argument Clinic が問題なくファイルを処理するまで、エラーの修"
631
+ "正と再試行を続けて下さい。。"
553
632
554
633
#: ../../howto/clinic.rst:417
555
634
msgid ""
556
635
"For readability, most of the glue code has been generated to a ``.c.h`` "
557
636
"file. You'll need to include that in your original ``.c`` file, typically "
558
637
"right after the clinic module block::"
559
638
msgstr ""
639
+ "読みやすさのために、ほとんどのグルー・コードは ``.c.h`` ファイルに生成されて"
640
+ "います。 これを元の ``.c`` ファイルにインクルードする必要があり、通常は "
641
+ "clinic モジュール・ブロックの直後に置きます::"
560
642
561
643
#: ../../howto/clinic.rst:423
562
644
msgid ""
563
645
"Double-check that the argument-parsing code Argument Clinic generated looks "
564
646
"basically the same as the existing code."
565
647
msgstr ""
648
+ "Argument Clinic が生成した引数解析コードが既存のコードと基本的に同じであるこ"
649
+ "とをダブル・チェックします。"
566
650
567
651
#: ../../howto/clinic.rst:426
568
652
msgid ""
@@ -571,20 +655,32 @@ msgid ""
571
655
"`PyArg_ParseTupleAndKeywords`; ensure that the code generated by Argument "
572
656
"Clinic calls the *exact* same function."
573
657
msgstr ""
658
+ "1番目に、両方の場所で同じ引数解析関数が使用されていることを確認します。 既存"
659
+ "のコードは :c:func:`PyArg_ParseTuple` または :c:func:"
660
+ "`PyArg_ParseTupleAndKeywords` のいずれかを呼び出す必要があります。 Argument "
661
+ "Clinic によって生成されたコードが *まったく同じ* 関数を呼び出すことを確認して"
662
+ "ください。"
574
663
575
664
#: ../../howto/clinic.rst:432
576
665
msgid ""
577
666
"Second, the format string passed in to :c:func:`PyArg_ParseTuple` or :c:func:"
578
667
"`PyArg_ParseTupleAndKeywords` should be *exactly* the same as the hand-"
579
668
"written one in the existing function, up to the colon or semi-colon."
580
669
msgstr ""
670
+ "2番目、 :c:func:`PyArg_ParseTuple` または :c:func:"
671
+ "`PyArg_ParseTupleAndKeywords` に渡されるフォーマット文字列は、コロンまたはセ"
672
+ "ミコロン含めて、既存の関数で手書きされたものと *まったく同じ* でなければなり"
673
+ "ません。"
581
674
582
675
#: ../../howto/clinic.rst:437
583
676
msgid ""
584
677
"(Argument Clinic always generates its format strings with a ``:`` followed "
585
678
"by the name of the function. If the existing code's format string ends with "
586
679
"``;``, to provide usage help, this change is harmless—don't worry about it.)"
587
680
msgstr ""
681
+ "(Argument Clinic は常に ``:`` の後に関数名が続くフォーマット文字列を生成しま"
682
+ "す。既存のコードのフォーマット文字列が ``;`` で終わっていた場合のこの変更は使"
683
+ "用法のヘルプを提供するためで、この変更は無害です。 心配してないでください。)"
588
684
589
685
#: ../../howto/clinic.rst:442
590
686
msgid ""
@@ -593,13 +689,19 @@ msgid ""
593
689
"function), ensure that the second argument is *exactly* the same between the "
594
690
"two invocations."
595
691
msgstr ""
692
+ "3 番目に、フォーマット単位が 2 つの引数(arguments)を必要とする引数"
693
+ "(parameters)(length 変数や、エンコード文字列や、変換関数へのポインタなど)につ"
694
+ "いては、2 番目の引数(argument)が 2 つの呼び出し間で *正確に同じである* ことを"
695
+ "確認してください。"
596
696
597
697
#: ../../howto/clinic.rst:447
598
698
msgid ""
599
699
"Fourth, inside the output portion of the block you'll find a preprocessor "
600
700
"macro defining the appropriate static :c:type:`PyMethodDef` structure for "
601
701
"this builtin::"
602
702
msgstr ""
703
+ "4 番目に、ブロックの出力部分内に、このビルトインの適切な静的 :c:type:"
704
+ "`PyMethodDef` 構造を定義するプリプロセッサ・マクロがあります::"
603
705
604
706
#: ../../howto/clinic.rst:454
605
707
msgid ""
@@ -696,21 +798,21 @@ msgstr ""
696
798
697
799
#: ../../howto/clinic.rst:566
698
800
msgid "Numeric constants (integer and float)"
699
- msgstr "数値定数 (整数と浮動小数 )"
801
+ msgstr "数値定数 (整数(integer)と浮動小数点数(float) )"
700
802
701
803
#: ../../howto/clinic.rst:567
702
804
msgid "String constants"
703
805
msgstr "文字列定数"
704
806
705
807
#: ../../howto/clinic.rst:568
706
808
msgid "``True``, ``False``, and ``None``"
707
- msgstr "``True``、 ``False``、 ``None``"
809
+ msgstr "``True`` と ``False`` と ``None``"
708
810
709
811
#: ../../howto/clinic.rst:569
710
812
msgid ""
711
813
"Simple symbolic constants like ``sys.maxsize``, which must start with the "
712
814
"name of the module"
713
- msgstr ""
815
+ msgstr "必ずモジュール名で始まる、 ``sys.maxsize`` のような単純な記号定数 "
714
816
715
817
#: ../../howto/clinic.rst:572
716
818
msgid ""
@@ -723,6 +825,8 @@ msgid ""
723
825
"(In the future, this may need to get even more elaborate, to allow full "
724
826
"expressions like ``CONSTANT - 1``.)"
725
827
msgstr ""
828
+ "(将来的には、`CONSTANT - 1`` のような式を表現可能にするために、さらに精巧にす"
829
+ "る必要があるかもしれません。)"
726
830
727
831
#: ../../howto/clinic.rst:580
728
832
msgid "Renaming the C functions and variables generated by Argument Clinic"
@@ -1071,6 +1175,9 @@ msgid ""
1071
1175
"Clinic converters. On the left is the legacy converter, on the right is the "
1072
1176
"text you'd replace it with."
1073
1177
msgstr ""
1178
+ "以下の表は、 legacy converter から実際の Argument Clinic converter へのマッピ"
1179
+ "ングを示す表です。左側は legacy converter で、右側がそれを置き換えたテキスト"
1180
+ "です。"
1074
1181
1075
1182
#: ../../howto/clinic.rst:827
1076
1183
msgid "``'B'``"
@@ -1409,6 +1516,8 @@ msgid ""
1409
1516
"As an example, here's our sample ``pickle.Pickler.dump`` using the proper "
1410
1517
"converter::"
1411
1518
msgstr ""
1519
+ "例題の ``pickle.Pickler.dump`` 適切な converter を使用したものを以下示しま"
1520
+ "す::"
1412
1521
1413
1522
#: ../../howto/clinic.rst:883
1414
1523
msgid ""
0 commit comments