Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 132fa37

Browse files
committed
Add docs for get_grouped_opcodes().
1 parent 807413d commit 132fa37

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

Doc/lib/libdifflib.tex

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ \section{\module{difflib} ---
8181
\function{time.ctime()}. If not specified, the strings default to blanks.
8282

8383
\file{Tools/scripts/diff.py} is a command-line front-end for this
84-
function.
84+
function.
85+
86+
\versionadded{2.3}
8587
\end{funcdesc}
8688

8789
\begin{funcdesc}{get_close_matches}{word, possibilities\optional{,
@@ -212,7 +214,9 @@ \section{\module{difflib} ---
212214
\function{time.ctime()}. If not specified, the strings default to blanks.
213215

214216
\file{Tools/scripts/diff.py} is a command-line front-end for this
215-
function.
217+
function.
218+
219+
\versionadded{2.3}
216220
\end{funcdesc}
217221

218222
\begin{funcdesc}{IS_LINE_JUNK}{line}
@@ -397,6 +401,17 @@ \subsection{SequenceMatcher Objects \label{sequence-matcher}}
397401
\end{verbatim}
398402
\end{methoddesc}
399403

404+
\begin{methoddesc}{get_grouped_opcodes}{\optional{n}}
405+
Return a generator of groups with up to \var{n} lines of context.
406+
407+
Starting with the groups returned by \method{get_opcodes()},
408+
this method splits out smaller change clusters and eliminates
409+
intervening ranges which have no changes.
410+
411+
The groups are returned in the same format as \method{get_opcodes()}.
412+
\versionadded{2.3}
413+
\end{methoddesc}
414+
400415
\begin{methoddesc}{ratio}{}
401416
Return a measure of the sequences' similarity as a float in the
402417
range [0, 1].

0 commit comments

Comments
 (0)