-
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathdifflib.po
1095 lines (962 loc) · 54 KB
/
difflib.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-2022, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <[email protected]>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.10\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-12-30 14:59+0000\n"
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
"Last-Translator: Rafael Fontenelle <[email protected]>, 2022\n"
"Language-Team: Japanese (https://www.transifex.com/python-doc/teams/5390/"
"ja/)\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#: ../../library/difflib.rst:2
msgid ":mod:`difflib` --- Helpers for computing deltas"
msgstr ":mod:`difflib` --- 差分の計算を助ける"
#: ../../library/difflib.rst:11
msgid "**Source code:** :source:`Lib/difflib.py`"
msgstr "**ソースコード:** :source:`Lib/difflib.py`"
#: ../../library/difflib.rst:20
msgid ""
"This module provides classes and functions for comparing sequences. It can "
"be used for example, for comparing files, and can produce information about "
"file differences in various formats, including HTML and context and unified "
"diffs. For comparing directories and files, see also, the :mod:`filecmp` "
"module."
msgstr ""
"このモジュールは、シーケンスを比較するためのクラスや関数を提供しています。例"
"えば、ファイルの差分を計算して、それを HTML や context diff, unified diff な"
"どいろいろなフォーマットで出力するために、このモジュールを利用できます。ディ"
"レクトリやファイル群を比較するためには、 :mod:`filecmp` モジュールも参照して"
"ください。"
#: ../../library/difflib.rst:29
msgid ""
"This is a flexible class for comparing pairs of sequences of any type, so "
"long as the sequence elements are :term:`hashable`. The basic algorithm "
"predates, and is a little fancier than, an algorithm published in the late "
"1980's by Ratcliff and Obershelp under the hyperbolic name \"gestalt pattern "
"matching.\" The idea is to find the longest contiguous matching subsequence "
"that contains no \"junk\" elements; these \"junk\" elements are ones that "
"are uninteresting in some sense, such as blank lines or whitespace. "
"(Handling junk is an extension to the Ratcliff and Obershelp algorithm.) The "
"same idea is then applied recursively to the pieces of the sequences to the "
"left and to the right of the matching subsequence. This does not yield "
"minimal edit sequences, but does tend to yield matches that \"look right\" "
"to people."
msgstr ""
"柔軟性のあるクラスで、二つのシーケンスの要素が :term:`ハッシュ可能 "
"<hashable>` な型であれば、どの型の要素を含むシーケンスも比較可能です。基本的"
"なアルゴリズムは、1980年代の後半に発表された Ratcliff と Obershelp による\"ゲ"
"シュタルトパターンマッチング\"と大げさに名づけられたアルゴリズム以前から知ら"
"れている、やや凝ったアルゴリズムです。その考え方は、\"junk\" 要素を含まない最"
"も長い互いに隣接したマッチ列を探すことです。ここで、 \"junk\" 要素とは、空行"
"や空白などの、意味を持たない要素のことです。 (junk を処理するのは、Ratcliff "
"と Obershelp のアルゴリズムに追加された拡張です。)この考え方は、マッチ列の左"
"右に隣接するシーケンスの断片に対して再帰的にあてはめられます。この方法では編"
"集を最小にするシーケンスは生まれませんが、人間の目からみて「正しい感じ」に"
"マッチする傾向があります。"
#: ../../library/difflib.rst:41
msgid ""
"**Timing:** The basic Ratcliff-Obershelp algorithm is cubic time in the "
"worst case and quadratic time in the expected case. :class:`SequenceMatcher` "
"is quadratic time for the worst case and has expected-case behavior "
"dependent in a complicated way on how many elements the sequences have in "
"common; best case time is linear."
msgstr ""
"**実行時間:** 基本的な Ratcliff-Obershelp アルゴリズムは、最悪の場合3乗、期待"
"値で2乗となります。 :class:`SequenceMatcher` オブジェクトでは、最悪のケースで"
"2乗、期待値は比較されるシーケンス中に共通に現れる要素数に非常にややこしく依存"
"しています。最良の場合は線形時間になります。"
#: ../../library/difflib.rst:47
msgid ""
"**Automatic junk heuristic:** :class:`SequenceMatcher` supports a heuristic "
"that automatically treats certain sequence items as junk. The heuristic "
"counts how many times each individual item appears in the sequence. If an "
"item's duplicates (after the first one) account for more than 1% of the "
"sequence and the sequence is at least 200 items long, this item is marked as "
"\"popular\" and is treated as junk for the purpose of sequence matching. "
"This heuristic can be turned off by setting the ``autojunk`` argument to "
"``False`` when creating the :class:`SequenceMatcher`."
msgstr ""
"**自動 junk ヒューリスティック:** :class:`SequenceMatcher` は、シーケンスの特"
"定の要素を自動的に junk として扱うヒューリスティックをサポートしています。こ"
"のヒューリスティックは、各個要素がシーケンス内に何回現れるかを数えます。ある"
"要素の重複数が (最初のものは除いて) 合計でシーケンスの 1% 以上になり、その"
"シーケンスが 200 要素以上なら、その要素は \"popular\" であるものとしてマーク"
"され、シーケンスのマッチングの目的からは junk として扱われます。このヒューリ"
"スティックは、 :class:`SequenceMatcher` の作成時に ``autojunk`` パラメタを "
"``False`` に設定することで無効化できます。"
#: ../../library/difflib.rst:55 ../../library/difflib.rst:388
msgid "The *autojunk* parameter."
msgstr "*autojunk* パラメータ。"
#: ../../library/difflib.rst:61
msgid ""
"This is a class for comparing sequences of lines of text, and producing "
"human-readable differences or deltas. Differ uses :class:`SequenceMatcher` "
"both to compare sequences of lines, and to compare sequences of characters "
"within similar (near-matching) lines."
msgstr ""
"テキスト行からなるシーケンスを比較するクラスです。人が読むことのできる差分を"
"作成します。 Differ クラスは :class:`SequenceMatcher` クラスを利用して、行か"
"らなるシーケンスを比較したり、(ほぼ)同一の行内の文字を比較したりします。"
#: ../../library/difflib.rst:66
msgid "Each line of a :class:`Differ` delta begins with a two-letter code:"
msgstr ":class:`Differ` クラスによる差分の各行は、2文字のコードで始まります:"
#: ../../library/difflib.rst:69
msgid "Code"
msgstr "コード"
#: ../../library/difflib.rst:69 ../../library/difflib.rst:498
msgid "Meaning"
msgstr "意味"
#: ../../library/difflib.rst:71
msgid "``'- '``"
msgstr "``'- '``"
#: ../../library/difflib.rst:71
msgid "line unique to sequence 1"
msgstr "行はシーケンス1にのみ存在する"
#: ../../library/difflib.rst:73
msgid "``'+ '``"
msgstr "``'+ '``"
#: ../../library/difflib.rst:73
msgid "line unique to sequence 2"
msgstr "行はシーケンス2にのみ存在する"
#: ../../library/difflib.rst:75
msgid "``' '``"
msgstr "``' '``"
#: ../../library/difflib.rst:75
msgid "line common to both sequences"
msgstr "行は両方のシーケンスで同一"
#: ../../library/difflib.rst:77
msgid "``'? '``"
msgstr "``'? '``"
#: ../../library/difflib.rst:77
msgid "line not present in either input sequence"
msgstr "行は入力シーケンスのどちらにも存在しない"
#: ../../library/difflib.rst:80
msgid ""
"Lines beginning with '``?``' attempt to guide the eye to intraline "
"differences, and were not present in either input sequence. These lines can "
"be confusing if the sequences contain tab characters."
msgstr ""
"'``?``' で始まる行は、行内のどこに差異が存在するかに注意を向けようとします。"
"その行は、入力されたシーケンスのどちらにも存在しません。シーケンスがタブ文字"
"を含むとき、これらの行は判別しづらいものになることがあります。"
#: ../../library/difflib.rst:87
msgid ""
"This class can be used to create an HTML table (or a complete HTML file "
"containing the table) showing a side by side, line by line comparison of "
"text with inter-line and intra-line change highlights. The table can be "
"generated in either full or contextual difference mode."
msgstr ""
"このクラスは、二つのテキストを左右に並べて比較表示し、行間あるいは行内の変更"
"点を強調表示するような HTML テーブル (またはテーブルの入った完全な HTML ファ"
"イル) を生成するために使います。テーブルは完全差分モード、コンテキスト差分"
"モードのいずれでも生成できます。"
#: ../../library/difflib.rst:92
msgid "The constructor for this class is:"
msgstr "このクラスのコンストラクタは以下のようになっています:"
#: ../../library/difflib.rst:97
msgid "Initializes instance of :class:`HtmlDiff`."
msgstr ":class:`HtmlDiff` のインスタンスを初期化します。"
#: ../../library/difflib.rst:99
msgid ""
"*tabsize* is an optional keyword argument to specify tab stop spacing and "
"defaults to ``8``."
msgstr ""
"*tabsize* はオプションのキーワード引数で、タブストップ幅を指定します。デフォ"
"ルトは ``8`` です。"
#: ../../library/difflib.rst:102
msgid ""
"*wrapcolumn* is an optional keyword to specify column number where lines are "
"broken and wrapped, defaults to ``None`` where lines are not wrapped."
msgstr ""
"*wrapcolumn* はオプションのキーワード引数で、テキストを折り返すカラム幅を指定"
"します。デフォルトは ``None`` で折り返しを行いません。"
#: ../../library/difflib.rst:105
msgid ""
"*linejunk* and *charjunk* are optional keyword arguments passed into :func:"
"`ndiff` (used by :class:`HtmlDiff` to generate the side by side HTML "
"differences). See :func:`ndiff` documentation for argument default values "
"and descriptions."
msgstr ""
"*linejunk* および *charjunk* はオプションのキーワード引数で、 :func:`ndiff` "
"(:class:`HtmlDiff` はこの関数を使って左右のテキストの差分を HTML で生成しま"
"す) に渡されます。それぞれの引数のデフォルト値および説明は :func:`ndiff` のド"
"キュメントを参照してください。"
#: ../../library/difflib.rst:109
msgid "The following methods are public:"
msgstr "以下のメソッドが public になっています:"
#: ../../library/difflib.rst:114
msgid ""
"Compares *fromlines* and *tolines* (lists of strings) and returns a string "
"which is a complete HTML file containing a table showing line by line "
"differences with inter-line and intra-line changes highlighted."
msgstr ""
"*fromlines* と *tolines* (いずれも文字列のリスト) を比較し、行間または行内の"
"変更点が強調表示された行差分の入った表を持つ完全な HTML ファイルを文字列で返"
"します。"
#: ../../library/difflib.rst:118
msgid ""
"*fromdesc* and *todesc* are optional keyword arguments to specify from/to "
"file column header strings (both default to an empty string)."
msgstr ""
"*fromdesc* および *todesc* はオプションのキーワード引数で、差分表示テーブルに"
"おけるそれぞれ差分元、差分先ファイルのカラムのヘッダになる文字列を指定します "
"(いずれもデフォルト値は空文字列です)。"
#: ../../library/difflib.rst:121
msgid ""
"*context* and *numlines* are both optional keyword arguments. Set *context* "
"to ``True`` when contextual differences are to be shown, else the default is "
"``False`` to show the full files. *numlines* defaults to ``5``. When "
"*context* is ``True`` *numlines* controls the number of context lines which "
"surround the difference highlights. When *context* is ``False`` *numlines* "
"controls the number of lines which are shown before a difference highlight "
"when using the \"next\" hyperlinks (setting to zero would cause the \"next\" "
"hyperlinks to place the next difference highlight at the top of the browser "
"without any leading context)."
msgstr ""
"*context* および *numlines* はともにオプションのキーワード引数です。"
"*context* を ``True`` にするとコンテキスト差分を表示し、デフォルトの "
"``False`` にすると完全なファイル差分を表示します。*numlines* のデフォルト値"
"は ``5`` で、*context* が ``True`` の場合、*numlines* は強調部分の前後にある"
"コンテキスト行の数を制御します。*context* が ``False`` の場合、*numlines* は "
"\"next\" と書かれたハイパーリンクをたどった時に到達する場所が次の変更部分より"
"何行前にあるかを制御します (値をゼロにした場合、\"next\" ハイパーリンクを辿る"
"と変更部分の強調表示がブラウザの最上部に表示されるようになります)。"
#: ../../library/difflib.rst:132
msgid ""
"*fromdesc* and *todesc* are interpreted as unescaped HTML and should be "
"properly escaped while receiving input from untrusted sources."
msgstr ""
"*fromdesc* と *todesc* はエスケープされていないHTMLとして解釈されます。信頼で"
"きないソースからの入力を受け取る際には適切にエスケープされるべきです。"
#: ../../library/difflib.rst:135
msgid ""
"*charset* keyword-only argument was added. The default charset of HTML "
"document changed from ``'ISO-8859-1'`` to ``'utf-8'``."
msgstr ""
"*charset* キーワード専用引数が追加されました。HTML 文書のデフォルトの文字集合"
"が ``'ISO-8859-1'`` から ``'utf-8'`` に変更されました。"
#: ../../library/difflib.rst:141
msgid ""
"Compares *fromlines* and *tolines* (lists of strings) and returns a string "
"which is a complete HTML table showing line by line differences with inter-"
"line and intra-line changes highlighted."
msgstr ""
"*fromlines* と *tolines* (いずれも文字列のリスト) を比較し、行間または行内の"
"変更点が強調表示された行差分の入った完全な HTML テーブルを文字列で返します。"
#: ../../library/difflib.rst:145
msgid ""
"The arguments for this method are the same as those for the :meth:"
"`make_file` method."
msgstr "このメソッドの引数は、 :meth:`make_file` メソッドの引数と同じです。"
#: ../../library/difflib.rst:148
msgid ""
":file:`Tools/scripts/diff.py` is a command-line front-end to this class and "
"contains a good example of its use."
msgstr ""
":file:`Tools/scripts/diff.py` はこのクラスへのコマンドラインフロントエンド"
"で、使い方を学ぶ上で格好の例題が入っています。"
#: ../../library/difflib.rst:154
msgid ""
"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` "
"generating the delta lines) in context diff format."
msgstr ""
"*a* と *b* (文字列のリスト) を比較し、差分 (差分形式の行を生成する :term:`"
"ジェネレータ <generator>`) を、 context diff のフォーマット(以下「コンテキス"
"ト形式」)で返します。"
#: ../../library/difflib.rst:157
msgid ""
"Context diffs are a compact way of showing just the lines that have changed "
"plus a few lines of context. The changes are shown in a before/after "
"style. The number of context lines is set by *n* which defaults to three."
msgstr ""
"コンテキスト形式は、変更があった行に前後数行を加えてある、コンパクトな表現方"
"法です。変更箇所は、変更前/変更後に分けて表します。コンテキスト (変更箇所前後"
"の行) の行数は *n* で指定し、デフォルト値は 3 です。"
#: ../../library/difflib.rst:161
msgid ""
"By default, the diff control lines (those with ``***`` or ``---``) are "
"created with a trailing newline. This is helpful so that inputs created "
"from :func:`io.IOBase.readlines` result in diffs that are suitable for use "
"with :func:`io.IOBase.writelines` since both the inputs and outputs have "
"trailing newlines."
msgstr ""
"デフォルトで、 diff 制御行 (``***`` や ``---`` を含む行) は改行付きで生成され"
"ます。 :func:`io.IOBase.readlines` で作られた入力が :func:`io.IOBase."
"writelines` で扱うのに適した diff になるので (なぜなら入力と出力の両方が改行"
"付きのため) 、これは有用です。"
#: ../../library/difflib.rst:167 ../../library/difflib.rst:298
msgid ""
"For inputs that do not have trailing newlines, set the *lineterm* argument "
"to ``\"\"`` so that the output will be uniformly newline free."
msgstr ""
"行末に改行文字を持たない入力に対しては、出力でも改行文字を付加しないように "
"*lineterm* 引数に ``\"\"`` を渡してください。"
#: ../../library/difflib.rst:170 ../../library/difflib.rst:301
msgid ""
"The context diff format normally has a header for filenames and modification "
"times. Any or all of these may be specified using strings for *fromfile*, "
"*tofile*, *fromfiledate*, and *tofiledate*. The modification times are "
"normally expressed in the ISO 8601 format. If not specified, the strings "
"default to blanks."
msgstr ""
"コンテキスト形式は、通常、ヘッダにファイル名と変更時刻を持っています。この情"
"報は、文字列 *fromfile*, *tofile*, *fromfiledate*, *tofiledate* で指定できま"
"す。変更時刻の書式は、通常、ISO 8601 フォーマットで表されます。指定しなかった"
"場合のデフォルト値は、空文字列です。"
#: ../../library/difflib.rst:193 ../../library/difflib.rst:322
msgid "See :ref:`difflib-interface` for a more detailed example."
msgstr "より詳細な例は、 :ref:`difflib-interface` を参照してください。"
#: ../../library/difflib.rst:198
msgid ""
"Return a list of the best \"good enough\" matches. *word* is a sequence for "
"which close matches are desired (typically a string), and *possibilities* is "
"a list of sequences against which to match *word* (typically a list of "
"strings)."
msgstr ""
"「十分」なマッチの上位のリストを返します。*word* はマッチさせたいシーケンス "
"(大概は文字列) です。*possibilities* は *word* にマッチさせるシーケンスのリス"
"ト (大概は文字列のリスト) です。"
#: ../../library/difflib.rst:202
msgid ""
"Optional argument *n* (default ``3``) is the maximum number of close matches "
"to return; *n* must be greater than ``0``."
msgstr ""
"オプションの引数 *n* (デフォルトでは ``3``)はメソッドの返すマッチの最大数で"
"す。*n* は ``0`` より大きくなければなりません。"
#: ../../library/difflib.rst:205
msgid ""
"Optional argument *cutoff* (default ``0.6``) is a float in the range [0, 1]. "
"Possibilities that don't score at least that similar to *word* are ignored."
msgstr ""
"オプションの引数 *cutoff* (デフォルトでは ``0.6``)は、区間 [0, 1] に入る小数"
"の値です。*word* との一致率がそれ未満の *possibilities* の要素は無視されま"
"す。"
#: ../../library/difflib.rst:208
msgid ""
"The best (no more than *n*) matches among the possibilities are returned in "
"a list, sorted by similarity score, most similar first."
msgstr ""
"*possibilities* の要素でマッチした上位(多くても *n* 個)は、類似度のスコアに応"
"じて(一番似たものを先頭に)ソートされたリストとして返されます。"
#: ../../library/difflib.rst:224
msgid ""
"Compare *a* and *b* (lists of strings); return a :class:`Differ`\\ -style "
"delta (a :term:`generator` generating the delta lines)."
msgstr ""
"*a* と *b* (文字列のリスト) を比較し、差分 (差分形式の行を生成する :term:`"
"ジェネレータ <generator>`) を、 :class:`Differ` のスタイルで返します。"
#: ../../library/difflib.rst:227
msgid ""
"Optional keyword parameters *linejunk* and *charjunk* are filtering "
"functions (or ``None``):"
msgstr ""
"オプションのキーワード引数 *linejunk* と *charjunk* には、フィルタ関数 (また"
"は ``None``) を渡します。"
#: ../../library/difflib.rst:230
msgid ""
"*linejunk*: A function that accepts a single string argument, and returns "
"true if the string is junk, or false if not. The default is ``None``. There "
"is also a module-level function :func:`IS_LINE_JUNK`, which filters out "
"lines without visible characters, except for at most one pound character "
"(``'#'``) -- however the underlying :class:`SequenceMatcher` class does a "
"dynamic analysis of which lines are so frequent as to constitute noise, and "
"this usually works better than using this function."
msgstr ""
"*linejunk*: 文字列型の引数 1 つを受け取る関数です。文字列が junk の場合は真"
"を、そうでない場合は偽を返します。デフォルトでは ``None`` です。モジュールレ"
"べルの関数 :func:`IS_LINE_JUNK` は、高々 1 つのシャープ記号(``'#'``)を除いて"
"可視の文字を含まない行をフィルタリングするものです。しかし、下層にある :"
"class:`SequenceMatcher` クラスが、どの行が雑音となるほど頻繁に登場するかを動"
"的に分析します。このクラスによる分析は、この関数を使用するよりも通常うまく動"
"作します。"
#: ../../library/difflib.rst:238
msgid ""
"*charjunk*: A function that accepts a character (a string of length 1), and "
"returns if the character is junk, or false if not. The default is module-"
"level function :func:`IS_CHARACTER_JUNK`, which filters out whitespace "
"characters (a blank or tab; it's a bad idea to include newline in this!)."
msgstr ""
"*charjunk*: 文字 (長さ1の文字列) を受け取る関数です。文字列が junk の場合は真"
"を、そうでない場合は偽を返します。デフォルトでは、モジュールレべルの関数 :"
"func:`IS_CHARACTER_JUNK` であり、これは空白文字類 (空白またはタブ、改行文字を"
"これに含めてはいけません) をフィルタして排除します。"
#: ../../library/difflib.rst:243
msgid ""
":file:`Tools/scripts/ndiff.py` is a command-line front-end to this function."
msgstr ""
":file:`Tools/scripts/ndiff.py` は、この関数のコマンドラインのフロントエンド"
"(インターフェイス)です。"
#: ../../library/difflib.rst:261
msgid "Return one of the two sequences that generated a delta."
msgstr "差分を生成した元の二つのシーケンスのうち一つを返します。"
#: ../../library/difflib.rst:263
msgid ""
"Given a *sequence* produced by :meth:`Differ.compare` or :func:`ndiff`, "
"extract lines originating from file 1 or 2 (parameter *which*), stripping "
"off line prefixes."
msgstr ""
":meth:`Differ.compare` または :func:`ndiff` によって生成された *sequence* を"
"与えられると、行頭のプレフィクスを取りのぞいてファイル 1 または 2 (引数 "
"*which* で指定される) に由来する行を復元します。"
#: ../../library/difflib.rst:267
msgid "Example:"
msgstr "例:"
#: ../../library/difflib.rst:284
msgid ""
"Compare *a* and *b* (lists of strings); return a delta (a :term:`generator` "
"generating the delta lines) in unified diff format."
msgstr ""
"*a* と *b* (文字列のリスト) を比較し、差分 (差分形式の行を生成する :term:`"
"ジェネレータ <generator>`) を、 unified diff フォーマット(以下「ユニファイド"
"形式」)で返します。"
#: ../../library/difflib.rst:287
msgid ""
"Unified diffs are a compact way of showing just the lines that have changed "
"plus a few lines of context. The changes are shown in an inline style "
"(instead of separate before/after blocks). The number of context lines is "
"set by *n* which defaults to three."
msgstr ""
"ユニファイド形式は変更があった行にコンテキストとなる前後数行を加えた、コンパ"
"クトな表現方法です。変更箇所は (変更前/変更後を分離したブロックではなく) イン"
"ラインスタイルで表されます。コンテキストの行数は、*n* で指定し、デフォルト値"
"は 3 です。"
#: ../../library/difflib.rst:292
msgid ""
"By default, the diff control lines (those with ``---``, ``+++``, or ``@@``) "
"are created with a trailing newline. This is helpful so that inputs created "
"from :func:`io.IOBase.readlines` result in diffs that are suitable for use "
"with :func:`io.IOBase.writelines` since both the inputs and outputs have "
"trailing newlines."
msgstr ""
"デフォルトで、 diff 制御行 (``---``, ``+++``, ``@@`` を含む行) は改行付きで生"
"成されます。 :func:`io.IOBase.readlines` で作られた入力が :func:`io.IOBase."
"writelines` で扱うのに適した diff になるので (なぜなら入力と出力の両方が改行"
"付きのため) 、これは有用です。"
#: ../../library/difflib.rst:326
msgid ""
"Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a sequence "
"of delta lines (also bytes) in the format returned by *dfunc*. *dfunc* must "
"be a callable, typically either :func:`unified_diff` or :func:`context_diff`."
msgstr ""
"*dfunc* を使用して *a* と *b* (bytes オブジェクトのリスト) を比較して、差分形"
"式の行 (これも bytes オブジェクトです) を*dfunc* の戻り値の形式で返します。"
"*dfunc* は、呼び出し可能である必要があります。一般に、これは :func:"
"`unified_diff` または :func:`context_diff` です。"
#: ../../library/difflib.rst:331
msgid ""
"Allows you to compare data with unknown or inconsistent encoding. All inputs "
"except *n* must be bytes objects, not str. Works by losslessly converting "
"all inputs (except *n*) to str, and calling ``dfunc(a, b, fromfile, tofile, "
"fromfiledate, tofiledate, n, lineterm)``. The output of *dfunc* is then "
"converted back to bytes, so the delta lines that you receive have the same "
"unknown/inconsistent encodings as *a* and *b*."
msgstr ""
"未知のエンコーディングまたは一貫性のないエンコーディングのデータ同士を比較で"
"きます。*n* 以外のすべての入力は、bytes オブジェクトである必要があります。"
"*n* 以外のすべての入力を損失なく str に変換して、``dfunc(a, b, fromfile, "
"tofile, fromfiledate, tofiledate, n, lineterm)`` を呼び出すことにより動作しま"
"す。*dfunc* の出力は、bytes 型に変換されます。これにより、受け取る差分形式の"
"行のエンコーディングは、*a* と *b* の未知または一貫性のないエンコーディングと"
"同一になります。"
#: ../../library/difflib.rst:342
msgid ""
"Return ``True`` for ignorable lines. The line *line* is ignorable if *line* "
"is blank or contains a single ``'#'``, otherwise it is not ignorable. Used "
"as a default for parameter *linejunk* in :func:`ndiff` in older versions."
msgstr ""
"無視できる行のとき ``True`` を返します。行 *line* は空白、または ``'#'`` ひ"
"とつのときに無視できます。それ以外のときには無視できません。古いバージョンで"
"は :func:`ndiff` の引数 *linejunk* にデフォルトで使用されました。"
#: ../../library/difflib.rst:349
msgid ""
"Return ``True`` for ignorable characters. The character *ch* is ignorable "
"if *ch* is a space or tab, otherwise it is not ignorable. Used as a default "
"for parameter *charjunk* in :func:`ndiff`."
msgstr ""
"無視できる文字のとき ``True`` を返します。文字 *ch* が空白、またはタブ文字の"
"ときには無視できます。それ以外の時には無視できません。 :func:`ndiff` の引数 "
"*charjunk* としてデフォルトで使用されます。"
#: ../../library/difflib.rst:357
msgid ""
"`Pattern Matching: The Gestalt Approach <https://www.drdobbs.com/database/"
"pattern-matching-the-gestalt-approach/184407970>`_"
msgstr ""
"`Pattern Matching: The Gestalt Approach <https://www.drdobbs.com/database/"
"pattern-matching-the-gestalt-approach/184407970>`_"
#: ../../library/difflib.rst:357
msgid ""
"Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. "
"This was published in `Dr. Dobb's Journal <https://www.drdobbs.com/>`_ in "
"July, 1988."
msgstr ""
"John W. Ratcliff と D. E. Metzener による類似のアルゴリズムに関する議論。"
"`Dr. Dobb's Journal <https://www.drdobbs.com/>`_ 1988年7月号掲載。"
#: ../../library/difflib.rst:364
msgid "SequenceMatcher Objects"
msgstr "SequenceMatcherオブジェクト"
#: ../../library/difflib.rst:366
msgid "The :class:`SequenceMatcher` class has this constructor:"
msgstr ""
":class:`SequenceMatcher` クラスには、以下のようなコンストラクタがあります:"
#: ../../library/difflib.rst:371
msgid ""
"Optional argument *isjunk* must be ``None`` (the default) or a one-argument "
"function that takes a sequence element and returns true if and only if the "
"element is \"junk\" and should be ignored. Passing ``None`` for *isjunk* is "
"equivalent to passing ``lambda x: False``; in other words, no elements are "
"ignored. For example, pass::"
msgstr ""
"オプションの引数 *isjunk* は、``None`` (デフォルトの値です) にするか、単一の"
"引数をとる関数でなければなりません。後者の場合、関数はシーケンスの要素を受け"
"取り、要素が junk であり、無視すべきである場合に限り真を返すようにしなければ"
"なりません。*isjunk* に ``None`` を渡すと、``lambda x: False`` を渡したのと同"
"じになります; すなわち、いかなる要素も無視しなくなります。例えば以下のような"
"引数を渡すと::"
#: ../../library/difflib.rst:379
msgid ""
"if you're comparing lines as sequences of characters, and don't want to "
"synch up on blanks or hard tabs."
msgstr "空白とタブ文字を無視して文字のシーケンスを比較します。"
#: ../../library/difflib.rst:382
msgid ""
"The optional arguments *a* and *b* are sequences to be compared; both "
"default to empty strings. The elements of both sequences must be :term:"
"`hashable`."
msgstr ""
"オプションの引数 *a* と *b* は、比較される文字列で、デフォルトでは空の文字列"
"です。両方のシーケンスの要素は、 :term:`ハッシュ可能 <hashable>` である必要が"
"あります。"
#: ../../library/difflib.rst:385
msgid ""
"The optional argument *autojunk* can be used to disable the automatic junk "
"heuristic."
msgstr ""
"オプションの引数 *autojunk* は、自動 junk ヒューリスティックを無効にするため"
"に使えます。"
#: ../../library/difflib.rst:391
msgid ""
"SequenceMatcher objects get three data attributes: *bjunk* is the set of "
"elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-"
"junk elements considered popular by the heuristic (if it is not disabled); "
"*b2j* is a dict mapping the remaining elements of *b* to a list of positions "
"where they occur. All three are reset whenever *b* is reset with :meth:"
"`set_seqs` or :meth:`set_seq2`."
msgstr ""
"SequenceMatcher オブジェクトは3つのデータ属性を持っています: *bjunk* は、 "
"*isjunk* が ``True`` であるような *b* の要素の集合です; *bpopular* は、 (無効"
"でなければ) ヒューリスティックによって popular であると考えられる非ジャンク要"
"素の集合です; *b2j* は、 *b* の残りの要素をそれらが生じる位置のリストに写像す"
"る dict です。この 3 つは :meth:`set_seqs` または :meth:`set_seq2` で *b* が"
"リセットされる場合は常にリセットされます。"
#: ../../library/difflib.rst:398
msgid "The *bjunk* and *bpopular* attributes."
msgstr "*bjunk* および *bpopular* 属性。"
#: ../../library/difflib.rst:401
msgid ":class:`SequenceMatcher` objects have the following methods:"
msgstr ":class:`SequenceMatcher` オブジェクトは以下のメソッドを持ちます:"
#: ../../library/difflib.rst:405
msgid "Set the two sequences to be compared."
msgstr "比較される2つの文字列を設定します。"
#: ../../library/difflib.rst:407
msgid ""
":class:`SequenceMatcher` computes and caches detailed information about the "
"second sequence, so if you want to compare one sequence against many "
"sequences, use :meth:`set_seq2` to set the commonly used sequence once and "
"call :meth:`set_seq1` repeatedly, once for each of the other sequences."
msgstr ""
":class:`SequenceMatcher` オブジェクトは、2つ目のシーケンスについての詳細な情"
"報を計算し、キャッシュします。 1つのシーケンスをいくつものシーケンスと比較す"
"る場合、まず :meth:`set_seq2` を使って文字列を設定しておき、別の文字列を1つず"
"つ比較するために、繰り返し :meth:`set_seq1` を呼び出します。"
#: ../../library/difflib.rst:415
msgid ""
"Set the first sequence to be compared. The second sequence to be compared "
"is not changed."
msgstr ""
"比較を行う1つ目のシーケンスを設定します。比較される2つ目のシーケンスは変更さ"
"れません。"
#: ../../library/difflib.rst:421
msgid ""
"Set the second sequence to be compared. The first sequence to be compared "
"is not changed."
msgstr ""
"比較を行う2つ目のシーケンスを設定します。比較される1つ目のシーケンスは変更さ"
"れません。"
#: ../../library/difflib.rst:427
msgid "Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``."
msgstr "``a[alo:ahi]`` と ``b[blo:bhi]`` の中から、最長のマッチ列を探します。"
#: ../../library/difflib.rst:429
msgid ""
"If *isjunk* was omitted or ``None``, :meth:`find_longest_match` returns "
"``(i, j, k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo "
"<= i <= i+k <= ahi`` and ``blo <= j <= j+k <= bhi``. For all ``(i', j', "
"k')`` meeting those conditions, the additional conditions ``k >= k'``, ``i "
"<= i'``, and if ``i == i'``, ``j <= j'`` are also met. In other words, of "
"all maximal matching blocks, return one that starts earliest in *a*, and of "
"all those maximal matching blocks that start earliest in *a*, return the one "
"that starts earliest in *b*."
msgstr ""
"*isjunk* が省略されたか ``None`` の時、 :meth:`find_longest_match` は ``a[i:"
"i+k]`` が ``b[j:j+k]`` と等しいような ``(i, j, k)`` を返します。その値は "
"``alo <= i <= i+k <= ahi`` かつ ``blo <= j <= j+k <= bhi`` となります。 "
"``(i', j', k')`` でも、同じようになります。さらに ``k >= k'``, ``i <= i'`` "
"が ``i == i'``, ``j <= j'`` でも同様です。言い換えると、いくつものマッチ列す"
"べてのうち、 *a* 内で最初に始まるものを返します。そしてその *a* 内で最初の"
"マッチ列すべてのうち *b* 内で最初に始まるものを返します。"
#: ../../library/difflib.rst:442
msgid ""
"If *isjunk* was provided, first the longest matching block is determined as "
"above, but with the additional restriction that no junk element appears in "
"the block. Then that block is extended as far as possible by matching "
"(only) junk elements on both sides. So the resulting block never matches on "
"junk except as identical junk happens to be adjacent to an interesting match."
msgstr ""
"引数 *isjunk* が与えられている場合、上記の通り、はじめに最長のマッチ列を判定"
"します。ブロック内に junk 要素が見当たらないような追加条件の際はこれに該当し"
"ません。次にそのマッチ列を、その両側の junk 要素にマッチするよう、できる限り"
"広げていきます。そのため結果となる列は、探している列のたまたま直前にあった同"
"一の junk 以外の junk にはマッチしません。"
#: ../../library/difflib.rst:449
msgid ""
"Here's the same example as before, but considering blanks to be junk. That "
"prevents ``' abcd'`` from matching the ``' abcd'`` at the tail end of the "
"second sequence directly. Instead only the ``'abcd'`` can match, and "
"matches the leftmost ``'abcd'`` in the second sequence:"
msgstr ""
"以下は前と同じサンプルですが、空白を junk とみなしています。これは ``' "
"abcd'`` が2つ目の列の末尾にある ``' abcd'`` にマッチしないようにしています。"
"代わりに ``'abcd'`` にはマッチします。そして 2つ目の文字列中、一番左の "
"``'abcd'`` にマッチします:"
#: ../../library/difflib.rst:458
msgid "If no blocks match, this returns ``(alo, blo, 0)``."
msgstr "どんな列にもマッチしない時は、``(alo, blo, 0)`` を返します。"
#: ../../library/difflib.rst:460
msgid "This method returns a :term:`named tuple` ``Match(a, b, size)``."
msgstr "このメソッドは :term:`named tuple` ``Match(a, b, size)`` を返します。"
#: ../../library/difflib.rst:462
msgid "Added default arguments."
msgstr "デフォルト引数が追加されました。"
#: ../../library/difflib.rst:468
msgid ""
"Return list of triples describing non-overlapping matching subsequences. "
"Each triple is of the form ``(i, j, n)``, and means that ``a[i:i+n] == b[j:"
"j+n]``. The triples are monotonically increasing in *i* and *j*."
msgstr ""
"マッチした互いに重複の無いシーケンスを表す、3つ組の値のリストを返します。\n"
"それぞれの値は ``(i, j, n)`` という形式で表され、``a[i:i+n] == b[j:j+n]`` と"
"いう関係を意味します。3つの値は *i* と *j* の間で単調に増加します。"
#: ../../library/difflib.rst:473
msgid ""
"The last triple is a dummy, and has the value ``(len(a), len(b), 0)``. It "
"is the only triple with ``n == 0``. If ``(i, j, n)`` and ``(i', j', n')`` "
"are adjacent triples in the list, and the second is not the last triple in "
"the list, then ``i+n < i'`` or ``j+n < j'``; in other words, adjacent "
"triples always describe non-adjacent equal blocks."
msgstr ""
"最後の3つ組はダミーで、``(len(a), len(b), 0)`` という値を持ちます。これは "
"``n == 0`` である唯一のタプルです。もし ``(i, j, n)`` と ``(i', j', n')`` が"
"リストで並んでいる3つ組で、2つ目が最後の3つ組でなければ、``i+n < i'`` または "
"``j+n < j'`` です。言い換えると並んでいる3つ組は常に隣接していない同じブロッ"
"クを表しています。"
#: ../../library/difflib.rst:490
msgid ""
"Return list of 5-tuples describing how to turn *a* into *b*. Each tuple is "
"of the form ``(tag, i1, i2, j1, j2)``. The first tuple has ``i1 == j1 == "
"0``, and remaining tuples have *i1* equal to the *i2* from the preceding "
"tuple, and, likewise, *j1* equal to the previous *j2*."
msgstr ""
"*a* を *b* にするための方法を記述する5つのタプルを返します。それぞれのタプル"
"は ``(tag, i1, i2, j1, j2)`` という形式であらわされます。最初のタプルは ``i1 "
"== j1 == 0`` であり、*i1* はその前にあるタプルの *i2* と同じ値です。同様に "
"*j1* は前の *j2* と同じ値になります。"
#: ../../library/difflib.rst:495
msgid "The *tag* values are strings, with these meanings:"
msgstr "*tag* の値は文字列であり、次のような意味です:"
#: ../../library/difflib.rst:498
msgid "Value"
msgstr "値"
#: ../../library/difflib.rst:500
msgid "``'replace'``"
msgstr "``'replace'``"
#: ../../library/difflib.rst:500
msgid "``a[i1:i2]`` should be replaced by ``b[j1:j2]``."
msgstr "``a[i1:i2]`` は ``b[j1:j2]`` に置き換えられる。"
#: ../../library/difflib.rst:503
msgid "``'delete'``"
msgstr "``'delete'``"
#: ../../library/difflib.rst:503
msgid "``a[i1:i2]`` should be deleted. Note that ``j1 == j2`` in this case."
msgstr "``a[i1:i2]`` は削除される。この時、``j1 == j2`` である。"
#: ../../library/difflib.rst:506
msgid "``'insert'``"
msgstr "``'insert'``"
#: ../../library/difflib.rst:506
msgid ""
"``b[j1:j2]`` should be inserted at ``a[i1:i1]``. Note that ``i1 == i2`` in "
"this case."
msgstr ""
"``b[j1:j2]`` が ``a[i1:i1]`` に挿入される。この時 ``i1 == i2`` である。"
#: ../../library/difflib.rst:510
msgid "``'equal'``"
msgstr "``'equal'``"
#: ../../library/difflib.rst:510
msgid "``a[i1:i2] == b[j1:j2]`` (the sub-sequences are equal)."
msgstr "``a[i1:i2] == b[j1:j2]`` (サブシーケンスは等しい)."
#: ../../library/difflib.rst:514
msgid "For example::"
msgstr "例えば::"
#: ../../library/difflib.rst:531
msgid "Return a :term:`generator` of groups with up to *n* lines of context."
msgstr ""
"最大 *n* 行までのコンテキストを含むグループを生成するような、 :term:`ジェネ"
"レータ <generator>` を返します。"
#: ../../library/difflib.rst:533
msgid ""
"Starting with the groups returned by :meth:`get_opcodes`, this method splits "
"out smaller change clusters and eliminates intervening ranges which have no "
"changes."
msgstr ""
"このメソッドは、 :meth:`get_opcodes` で返されるグループの中から、似たような差"
"異のかたまりに分け、間に挟まっている変更の無い部分を省きます。"
#: ../../library/difflib.rst:537
msgid "The groups are returned in the same format as :meth:`get_opcodes`."
msgstr "グループは :meth:`get_opcodes` と同じ書式で返されます。"
#: ../../library/difflib.rst:542
msgid ""
"Return a measure of the sequences' similarity as a float in the range [0, 1]."
msgstr "[0, 1] の範囲の浮動小数点数で、シーケンスの類似度を測る値を返します。"
#: ../../library/difflib.rst:545
msgid ""
"Where T is the total number of elements in both sequences, and M is the "
"number of matches, this is 2.0\\*M / T. Note that this is ``1.0`` if the "
"sequences are identical, and ``0.0`` if they have nothing in common."
msgstr ""
"T が2つのシーケンスの要素数の総計だと仮定し、M をマッチした数とすると、この値"
"は 2.0\\*M / T であらわされます。もしシーケンスがまったく同じ場合、値は "
"``1.0`` となり、まったく異なる場合には ``0.0`` となります。"
#: ../../library/difflib.rst:549
msgid ""
"This is expensive to compute if :meth:`get_matching_blocks` or :meth:"
"`get_opcodes` hasn't already been called, in which case you may want to try :"
"meth:`quick_ratio` or :meth:`real_quick_ratio` first to get an upper bound."
msgstr ""
"このメソッドは :meth:`get_matching_blocks` または :meth:`get_opcodes` がまだ"
"呼び出されていない場合には非常にコストが高いです。この場合、上限を素早く計算"
"するために、 :meth:`quick_ratio` もしくは :meth:`real_quick_ratio` を最初に試"
"してみる方がいいかもしれません。"
#: ../../library/difflib.rst:556
msgid ""
"Caution: The result of a :meth:`ratio` call may depend on the order of the "
"arguments. For instance::"
msgstr ""
"注意: :meth:`ratio` の呼び出しの結果は引数の順序に依存します。例えば次の通り"
"です::"
#: ../../library/difflib.rst:567
msgid "Return an upper bound on :meth:`ratio` relatively quickly."
msgstr ":meth:`ratio` の上界を、より高速に計算します。"
#: ../../library/difflib.rst:572
msgid "Return an upper bound on :meth:`ratio` very quickly."
msgstr ":meth:`ratio` の上界を、非常に高速に計算します。"
#: ../../library/difflib.rst:575
msgid ""
"The three methods that return the ratio of matching to total characters can "
"give different results due to differing levels of approximation, although :"
"meth:`quick_ratio` and :meth:`real_quick_ratio` are always at least as large "
"as :meth:`ratio`:"
msgstr ""
"この文字列全体のマッチ率を返す3つのメソッドは、精度の異なる近似値を返しま"
"す。 :meth:`quick_ratio` と :meth:`real_quick_ratio` は、常に :meth:`ratio` "
"以上の値を返します:"
#: ../../library/difflib.rst:592
msgid "SequenceMatcher Examples"
msgstr "SequenceMatcher の例"
#: ../../library/difflib.rst:594
msgid "This example compares two strings, considering blanks to be \"junk\":"
msgstr "この例は2つの文字列を比較します。空白を \"junk\" とします:"
#: ../../library/difflib.rst:600
msgid ""
":meth:`ratio` returns a float in [0, 1], measuring the similarity of the "
"sequences. As a rule of thumb, a :meth:`ratio` value over 0.6 means the "
"sequences are close matches:"
msgstr ""
":meth:`ratio` は、[0, 1] の範囲の値を返し、シーケンスの類似度を測ります。経験"
"によると、 :meth:`ratio` の値が0.6を超えると、シーケンスがよく似ていることを"
"示します:"
#: ../../library/difflib.rst:607
msgid ""
"If you're only interested in where the sequences match, :meth:"
"`get_matching_blocks` is handy:"
msgstr ""
"シーケンスのどこがマッチしているかにだけ興味のある時には :meth:"
"`get_matching_blocks` が手軽でしょう:"
#: ../../library/difflib.rst:616
msgid ""
"Note that the last tuple returned by :meth:`get_matching_blocks` is always a "
"dummy, ``(len(a), len(b), 0)``, and this is the only case in which the last "
"tuple element (number of elements matched) is ``0``."
msgstr ""
":meth:`get_matching_blocks` が返す最後のタプルが常にダミーであることに注目し"
"てください。このダミーは ``(len(a), len(b), 0)`` であり、これはタプルの最後の"
"要素(マッチする要素の数)が ``0`` となる唯一のケースです。"
#: ../../library/difflib.rst:620
msgid ""
"If you want to know how to change the first sequence into the second, use :"
"meth:`get_opcodes`:"
msgstr ""
"はじめのシーケンスがどのようにして2番目のものになるのかを知るには、 :meth:"
"`get_opcodes` を使います:"
#: ../../library/difflib.rst:631
msgid ""
"The :func:`get_close_matches` function in this module which shows how simple "
"code building on :class:`SequenceMatcher` can be used to do useful work."
msgstr ""
":class:`SequenceMatcher` を使った、シンプルで使えるコードを知るには、このモ"
"ジュールの関数 :func:`get_close_matches` を参照してください。"
#: ../../library/difflib.rst:635
msgid ""
"`Simple version control recipe <https://code.activestate.com/recipes/576729/"
">`_ for a small application built with :class:`SequenceMatcher`."
msgstr ""
"`Simple version control recipe <https://code.activestate.com/recipes/576729/"
">`_ :class:`SequenceMatcher` で作った小規模アプリケーション。"
#: ../../library/difflib.rst:643
msgid "Differ Objects"
msgstr "Differ オブジェクト"
#: ../../library/difflib.rst:645
msgid ""
"Note that :class:`Differ`\\ -generated deltas make no claim to be "
"**minimal** diffs. To the contrary, minimal diffs are often counter-"
"intuitive, because they synch up anywhere possible, sometimes accidental "
"matches 100 pages apart. Restricting synch points to contiguous matches "
"preserves some notion of locality, at the occasional cost of producing a "
"longer diff."
msgstr ""
":class:`Differ` オブジェクトによって生成された差分が **最小** であるなどとは"
"言いません。むしろ、最小の差分はしばしば直観に反しています。その理由は、どこ"
"でもできるとなれば一致を見いだしてしまうからで、ときには思いがけなく100ページ"
"も離れたマッチになってしまうのです。一致点を互いに隣接したマッチに制限するこ"
"とで、場合によって長めの差分を出力するというコストを掛けることにはなっても、"
"ある種の局所性を保つことができるのです。"
#: ../../library/difflib.rst:651
msgid "The :class:`Differ` class has this constructor:"
msgstr ":class:`Differ` は、以下のようなコンストラクタを持ちます:"
#: ../../library/difflib.rst:657
msgid ""
"Optional keyword parameters *linejunk* and *charjunk* are for filter "
"functions (or ``None``):"
msgstr ""
"オプションのキーワードパラメータ *linejunk* と *charjunk* は、フィルタ関数を"
"渡します (使わないときは ``None``):"
#: ../../library/difflib.rst:660
msgid ""
"*linejunk*: A function that accepts a single string argument, and returns "
"true if the string is junk. The default is ``None``, meaning that no line "
"is considered junk."
msgstr ""
"*linejunk*: ひとつの文字列引数を受け取る関数です。文字列が junk のときに真を"
"返します。デフォルトでは、``None`` であり、どんな行であっても junk とは見なさ"
"れません。"
#: ../../library/difflib.rst:664
msgid ""
"*charjunk*: A function that accepts a single character argument (a string of "
"length 1), and returns true if the character is junk. The default is "
"``None``, meaning that no character is considered junk."
msgstr ""
"*charjunk*: この関数は文字(長さ1の文字列)を引数として受け取り、文字が junk で"
"あるときに真を返します。デフォルトは ``None`` であり、どんな文字も junk とは"
"見なされません。"