44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # python-doc bot, 2025
7+ # python-doc bot, 2026
88#
99#, fuzzy
1010msgid ""
1111msgstr ""
1212"Project-Id-Version : Python 3.15\n "
1313"Report-Msgid-Bugs-To : \n "
14- "POT-Creation-Date : 2026-07-25 14:57 +0000\n "
14+ "POT-Creation-Date : 2026-07-29 15:50 +0000\n "
1515"PO-Revision-Date : 2025-09-16 00:01+0000\n "
16- "Last-Translator : python-doc bot, 2025 \n "
16+ "Last-Translator : python-doc bot, 2026 \n "
1717"Language-Team : Indonesian (https://app.transifex.com/python-doc/teams/5390/ "
1818"id/)\n "
1919"MIME-Version : 1.0\n "
@@ -29,51 +29,100 @@ msgid "**Source code:** :source:`Lib/difflib.py`"
2929msgstr ""
3030
3131msgid ""
32- "This module provides classes and functions for comparing sequences. It can "
33- "be used for example, for comparing files, and can produce information about "
34- "file differences in various formats, including HTML and context and unified "
35- "diffs. For comparing directories and files, see also, the :mod:`filecmp` "
36- "module."
32+ "This module provides classes and functions for comparing sequences. Most of "
33+ "them compare sequences of text lines (for example lists of strings, or :term:"
34+ "`file objects <file object>`) and produce :dfn:`diffs` -- reports on the "
35+ "differences. Diffs can be produced in in various formats, including HTML and "
36+ "context and unified diffs -- formats produced by tools like :manpage:`diff "
37+ "<diff(1)>` and :manpage:`git diff <git-diff(1)>`."
3738msgstr ""
3839
3940msgid ""
40- "This is a flexible class for comparing pairs of sequences of any type, so "
41- "long as the sequence elements are :term:`hashable`. The basic algorithm "
42- "predates, and is a little fancier than, an algorithm published in the late "
43- "1980's by Ratcliff and Obershelp under the hyperbolic name \" gestalt pattern "
44- "matching.\" The idea is to find the longest contiguous matching subsequence "
45- "that contains no \" junk\" elements; these \" junk\" elements are ones that "
46- "are uninteresting in some sense, such as blank lines or whitespace. "
47- "(Handling junk is an extension to the Ratcliff and Obershelp algorithm.) The "
48- "same idea is then applied recursively to the pieces of the sequences to the "
49- "left and to the right of the matching subsequence. This does not yield "
50- "minimal edit sequences, but does tend to yield matches that \" look right\" "
51- "to people."
41+ "Comparisons are done using a matching algorithm implemented in :class:"
42+ "`SequenceMatcher` -- a flexible class for comparing pairs of sequences of "
43+ "any type, not just text, so long as the sequence elements are :term:"
44+ "`hashable`."
45+ msgstr ""
46+
47+ msgid "Junk heuristic"
5248msgstr ""
5349
5450msgid ""
55- "**Timing:** The basic Ratcliff-Obershelp algorithm is cubic time in the "
56- "worst case and quadratic time in the expected case. :class:`SequenceMatcher` "
57- "is quadratic time for the worst case and has expected-case behavior "
58- "dependent in a complicated way on how many elements the sequences have in "
59- "common; best case time is linear."
51+ ":mod:`!difflib` uses a :dfn:`junk` heuristic: some items are deemed to be :"
52+ "dfn:`junk`, and ignored when searching for similarities. Ideally, these are "
53+ "uninteresting or common items, such as blank lines or whitespace."
6054msgstr ""
6155
6256msgid ""
63- "**Junk**: :class:`SequenceMatcher` accepts an ``isjunk`` predicate and an "
64- "``autojunk`` flag. Items that are considered as junk will not be considered "
65- "to find similar content blocks. This can produce better results for humans "
66- "(typically breaking on whitespace) and faster (because it reduces the number "
67- "of possible combinations). But it can also cause pathological cases where "
68- "too many items considered junk cause an unexpectedly large (but correct) "
69- "diff result. You should consider tuning them or turning them off depending "
70- "on your data. Moreover, only the second sequence is inspected for junk. This "
71- "causes the diff output to not be symmetrical. When ``autojunk=True``, it "
72- "will consider as junk the items that account for more than 1% of the "
73- "sequence, if it is at least 200 items long."
57+ "This heuristic can speed the algorithm up (because it reduces the number of "
58+ "possible combinations) and it can produce results that are more "
59+ "understandable for humans (typically breaking on whitespace). But it can "
60+ "also cause pathological cases:"
7461msgstr ""
7562
76- msgid "Added the *autojunk* parameter."
63+ msgid ""
64+ "Inappropriately chosen junk items can cause an unexpectedly **large** (but "
65+ "still correct) result."
66+ msgstr ""
67+
68+ msgid ""
69+ "The default heuristic is **asymmetric**: only the second sequence is "
70+ "inspected when determining what is considered junk, so comparing A to B can "
71+ "give different results than comparing B to A and reversing the result."
72+ msgstr ""
73+
74+ msgid ""
75+ "By default, if the second input sequence is at least 200 items long, items "
76+ "that account for more than 1% it are considered *junk*."
77+ msgstr ""
78+
79+ msgid ""
80+ "Depending on your data, you should consider turning this heuristic off "
81+ "(setting :class:`~difflib.SequenceMatcher`'s *autojunk* argument to to "
82+ "``False``) or tuning it (using the *isjunk* argument, perhaps to one of the :"
83+ "ref:`predefined functions <difflib-isjunk-functions>`)."
84+ msgstr ""
85+
86+ msgid "The :mod:`!difflib` algorithm"
87+ msgstr ""
88+
89+ msgid ""
90+ "The algorithm used in :class:`SequenceMatcher` predates, and is a little "
91+ "fancier than, an algorithm published in the late 1980s by Ratcliff and "
92+ "Obershelp under the hyperbolic name \" gestalt pattern matching.\" The idea "
93+ "is to find the longest contiguous subsequence common to both inputs, then "
94+ "recursively handle the pieces of the sequences to the left and to the right "
95+ "of the matching subsequence."
96+ msgstr ""
97+
98+ msgid ""
99+ "`Pattern Matching: The Gestalt Approach <https://jacobfilipp.com/DrDobbs/"
100+ "articles/DDJ/1988/8807/8807c/8807c.htm>`_"
101+ msgstr ""
102+
103+ msgid ""
104+ "Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. "
105+ "This was published in Dr. Dobb's Journal in July, 1988."
106+ msgstr ""
107+
108+ msgid ""
109+ "As an extension to the Ratcliff and Obershelp algorithm, :mod:`!difflib` "
110+ "searches for the longest *junk-free* contiguous subsequence. See the :ref:"
111+ "`difflib-junk` section for details."
112+ msgstr ""
113+
114+ msgid "Timing"
115+ msgstr ""
116+
117+ msgid ""
118+ "The basic Ratcliff-Obershelp algorithm is cubic time in the worst case and "
119+ "quadratic time in the expected case. :mod:`difflib`'s algorithm is quadratic "
120+ "time for the worst case and has expected-case behavior dependent in a "
121+ "complicated way on how many elements the sequences have in common; best case "
122+ "time is linear."
123+ msgstr ""
124+
125+ msgid "Diff generation"
77126msgstr ""
78127
79128msgid ""
@@ -123,6 +172,58 @@ msgid ""
123172"tabs or line breaks."
124173msgstr ""
125174
175+ msgid ""
176+ "Note that :class:`Differ`\\ -generated deltas make no claim to be "
177+ "**minimal** diffs. To the contrary, minimal diffs are often counter-"
178+ "intuitive for humans, because they synch up anywhere possible, sometimes at "
179+ "accidental matches 100 pages apart. Restricting synch points to contiguous "
180+ "matches preserves some notion of locality, at the occasional cost of "
181+ "producing a longer diff."
182+ msgstr ""
183+
184+ msgid "The :class:`Differ` class has this constructor:"
185+ msgstr ""
186+
187+ msgid ""
188+ "Optional keyword parameters *linejunk* and *charjunk* are for filter "
189+ "functions (or ``None``):"
190+ msgstr ""
191+
192+ msgid ""
193+ "*linejunk*: A function that accepts a single string argument, and returns "
194+ "true if the string is junk. The default is ``None``, meaning that no line "
195+ "is considered junk."
196+ msgstr ""
197+
198+ msgid ""
199+ "*charjunk*: A function that accepts a single character argument (a string of "
200+ "length 1), and returns true if the character is junk. The default is "
201+ "``None``, meaning that no character is considered junk."
202+ msgstr ""
203+
204+ msgid ""
205+ "These junk-filtering functions speed up matching to find differences and do "
206+ "not cause any differing lines or characters to be ignored. Read the "
207+ "description of the :meth:`~SequenceMatcher.find_longest_match` method's "
208+ "*isjunk* parameter for an explanation."
209+ msgstr ""
210+
211+ msgid ""
212+ ":class:`Differ` objects are used (deltas generated) via a single method:"
213+ msgstr ""
214+
215+ msgid ""
216+ "Compare two sequences of lines, and generate the delta (a sequence of lines)."
217+ msgstr ""
218+
219+ msgid ""
220+ "Each sequence must contain individual single-line strings ending with "
221+ "newlines. Such sequences can be obtained from the :meth:`~io.IOBase."
222+ "readlines` method of file-like objects. The generated delta also consists "
223+ "of newline-terminated strings, ready to be printed as-is via the :meth:`~io."
224+ "IOBase.writelines` method of a file-like object."
225+ msgstr ""
226+
126227msgid ""
127228"This class can be used to create an HTML table (or a complete HTML file "
128229"containing the table) showing a side by side, line by line comparison of "
@@ -353,6 +454,9 @@ msgid ""
353454"unknown/inconsistent encodings as *a* and *b*."
354455msgstr ""
355456
457+ msgid "Junk definition functions"
458+ msgstr ""
459+
356460msgid ""
357461"Return ``True`` for ignorable lines. The line *line* is ignorable if *line* "
358462"is blank or contains a single ``'#'``, otherwise it is not ignorable. Used "
@@ -365,22 +469,9 @@ msgid ""
365469"for parameter *charjunk* in :func:`ndiff`."
366470msgstr ""
367471
368- msgid ""
369- "`Pattern Matching: The Gestalt Approach <https://jacobfilipp.com/DrDobbs/"
370- "articles/DDJ/1988/8807/8807c/8807c.htm>`_"
371- msgstr ""
372-
373- msgid ""
374- "Discussion of a similar algorithm by John W. Ratcliff and D. E. Metzener. "
375- "This was published in Dr. Dobb's Journal in July, 1988."
376- msgstr ""
377-
378472msgid "SequenceMatcher objects"
379473msgstr ""
380474
381- msgid "The :class:`SequenceMatcher` class has this constructor:"
382- msgstr ""
383-
384475msgid ""
385476"Optional argument *isjunk* must be ``None`` (the default) or a one-argument "
386477"function that takes a sequence element and returns true if and only if the "
@@ -408,6 +499,9 @@ msgid ""
408499"heuristic."
409500msgstr ""
410501
502+ msgid "Added the *autojunk* parameter."
503+ msgstr ""
504+
411505msgid ""
412506"SequenceMatcher objects get three data attributes: *bjunk* is the set of "
413507"elements of *b* for which *isjunk* is ``True``; *bpopular* is the set of non-"
@@ -599,6 +693,9 @@ msgid ""
599693"ratio`:"
600694msgstr ""
601695
696+ msgid "Examples"
697+ msgstr "Contoh-contoh"
698+
602699msgid "SequenceMatcher examples"
603700msgstr ""
604701
@@ -639,61 +736,6 @@ msgid ""
639736"`SequenceMatcher`."
640737msgstr ""
641738
642- msgid "Differ objects"
643- msgstr ""
644-
645- msgid ""
646- "Note that :class:`Differ`\\ -generated deltas make no claim to be "
647- "**minimal** diffs. To the contrary, minimal diffs are often counter-"
648- "intuitive, because they synch up anywhere possible, sometimes accidental "
649- "matches 100 pages apart. Restricting synch points to contiguous matches "
650- "preserves some notion of locality, at the occasional cost of producing a "
651- "longer diff."
652- msgstr ""
653-
654- msgid "The :class:`Differ` class has this constructor:"
655- msgstr ""
656-
657- msgid ""
658- "Optional keyword parameters *linejunk* and *charjunk* are for filter "
659- "functions (or ``None``):"
660- msgstr ""
661-
662- msgid ""
663- "*linejunk*: A function that accepts a single string argument, and returns "
664- "true if the string is junk. The default is ``None``, meaning that no line "
665- "is considered junk."
666- msgstr ""
667-
668- msgid ""
669- "*charjunk*: A function that accepts a single character argument (a string of "
670- "length 1), and returns true if the character is junk. The default is "
671- "``None``, meaning that no character is considered junk."
672- msgstr ""
673-
674- msgid ""
675- "These junk-filtering functions speed up matching to find differences and do "
676- "not cause any differing lines or characters to be ignored. Read the "
677- "description of the :meth:`~SequenceMatcher.find_longest_match` method's "
678- "*isjunk* parameter for an explanation."
679- msgstr ""
680-
681- msgid ""
682- ":class:`Differ` objects are used (deltas generated) via a single method:"
683- msgstr ""
684-
685- msgid ""
686- "Compare two sequences of lines, and generate the delta (a sequence of lines)."
687- msgstr ""
688-
689- msgid ""
690- "Each sequence must contain individual single-line strings ending with "
691- "newlines. Such sequences can be obtained from the :meth:`~io.IOBase."
692- "readlines` method of file-like objects. The delta generated also consists "
693- "of newline-terminated strings, ready to be printed as-is via the :meth:`~io."
694- "IOBase.writelines` method of a file-like object."
695- msgstr ""
696-
697739msgid "Differ example"
698740msgstr ""
699741
0 commit comments