mirror of https://github.com/python/cpython
SF bug 1046690: difflib.HtmlDiff doc errors.
Easy doc corrections from Dan Gass. Also repaired the LaTeX for optional keyword arguments throughout, which was (incorrectly) nested instead of flat.
This commit is contained in:
parent
4b9059b437
commit
371e4d895b
|
@ -61,11 +61,8 @@
|
||||||
|
|
||||||
The constructor for this class is:
|
The constructor for this class is:
|
||||||
|
|
||||||
\begin{funcdesc}{__init__}{
|
\begin{funcdesc}{__init__}{\optional{tabsize}\optional{,
|
||||||
\optional{, tabsize
|
wrapcolumn}\optional{, linejunk}\optional{, charjunk}}
|
||||||
\optional{, wrapcolumn
|
|
||||||
\optional{, linejunk
|
|
||||||
\optional{, charjunk}}}}}
|
|
||||||
|
|
||||||
Initializes instance of \class{HtmlDiff}.
|
Initializes instance of \class{HtmlDiff}.
|
||||||
|
|
||||||
|
@ -86,10 +83,8 @@
|
||||||
The following methods are public:
|
The following methods are public:
|
||||||
|
|
||||||
\begin{funcdesc}{make_file}{fromlines, tolines
|
\begin{funcdesc}{make_file}{fromlines, tolines
|
||||||
\optional{, fromdesc
|
\optional{, fromdesc}\optional{, todesc}\optional{, context}\optional{,
|
||||||
\optional{, todesc
|
numlines}}
|
||||||
\optional{, context
|
|
||||||
\optional{, numlines}}}}}
|
|
||||||
Compares \var{fromlines} and \var{tolines} (lists of strings) and returns
|
Compares \var{fromlines} and \var{tolines} (lists of strings) and returns
|
||||||
a string which is a complete HTML file containing a table showing line by
|
a string which is a complete HTML file containing a table showing line by
|
||||||
line differences with inter-line and intra-line changes highlighted.
|
line differences with inter-line and intra-line changes highlighted.
|
||||||
|
@ -110,16 +105,14 @@
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{make_table}{fromlines, tolines
|
\begin{funcdesc}{make_table}{fromlines, tolines
|
||||||
\optional{, fromdesc
|
\optional{, fromdesc}\optional{, todesc}\optional{, context}\optional{,
|
||||||
\optional{, todesc
|
numlines}}
|
||||||
\optional{, context}}}}
|
|
||||||
Compares \var{fromlines} and \var{tolines} (lists of strings) and returns
|
Compares \var{fromlines} and \var{tolines} (lists of strings) and returns
|
||||||
a string which is a complete HTML table showing line by line differences
|
a string which is a complete HTML table showing line by line differences
|
||||||
with inter-line and intra-line changes highlighted.
|
with inter-line and intra-line changes highlighted.
|
||||||
|
|
||||||
The arguments of this method are a subset of those for the
|
The arguments for this method are the same as those for the
|
||||||
\code{make_file} method. Refer to the \code{make_file} method
|
\method{make_file()} method.
|
||||||
documentation.
|
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\file{Tools/scripts/diff.py} is a command-line front-end to this class
|
\file{Tools/scripts/diff.py} is a command-line front-end to this class
|
||||||
|
@ -128,9 +121,9 @@
|
||||||
\versionadded{2.4}
|
\versionadded{2.4}
|
||||||
\end{classdesc*}
|
\end{classdesc*}
|
||||||
|
|
||||||
\begin{funcdesc}{context_diff}{a, b\optional{, fromfile\optional{, tofile
|
\begin{funcdesc}{context_diff}{a, b\optional{, fromfile}\optional{,
|
||||||
\optional{, fromfiledate\optional{, tofiledate\optional{, n
|
tofile}\optional{, fromfiledate}\optional{, tofiledate}\optional{,
|
||||||
\optional{, lineterm}}}}}}}
|
n}\optional{, lineterm}}
|
||||||
Compare \var{a} and \var{b} (lists of strings); return a
|
Compare \var{a} and \var{b} (lists of strings); return a
|
||||||
delta (a generator generating the delta lines) in context diff
|
delta (a generator generating the delta lines) in context diff
|
||||||
format.
|
format.
|
||||||
|
@ -162,7 +155,7 @@
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{get_close_matches}{word, possibilities\optional{,
|
\begin{funcdesc}{get_close_matches}{word, possibilities\optional{,
|
||||||
n\optional{, cutoff}}}
|
n}\optional{, cutoff}}
|
||||||
Return a list of the best ``good enough'' matches. \var{word} is a
|
Return a list of the best ``good enough'' matches. \var{word} is a
|
||||||
sequence for which close matches are desired (typically a string),
|
sequence for which close matches are desired (typically a string),
|
||||||
and \var{possibilities} is a list of sequences against which to
|
and \var{possibilities} is a list of sequences against which to
|
||||||
|
@ -191,8 +184,7 @@
|
||||||
\end{verbatim}
|
\end{verbatim}
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{ndiff}{a, b\optional{, linejunk\optional{,
|
\begin{funcdesc}{ndiff}{a, b\optional{, linejunk}\optional{, charjunk}}
|
||||||
charjunk}}}
|
|
||||||
Compare \var{a} and \var{b} (lists of strings); return a
|
Compare \var{a} and \var{b} (lists of strings); return a
|
||||||
\class{Differ}-style delta (a generator generating the delta lines).
|
\class{Differ}-style delta (a generator generating the delta lines).
|
||||||
|
|
||||||
|
@ -260,9 +252,9 @@ emu
|
||||||
|
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{unified_diff}{a, b\optional{, fromfile\optional{, tofile
|
\begin{funcdesc}{unified_diff}{a, b\optional{, fromfile}\optional{,
|
||||||
\optional{, fromfiledate\optional{, tofiledate\optional{, n
|
tofile}\optional{, fromfiledate}\optional{, tofiledate}\optional{,
|
||||||
\optional{, lineterm}}}}}}}
|
n}\optional{, lineterm}}
|
||||||
Compare \var{a} and \var{b} (lists of strings); return a
|
Compare \var{a} and \var{b} (lists of strings); return a
|
||||||
delta (a generator generating the delta lines) in unified diff
|
delta (a generator generating the delta lines) in unified diff
|
||||||
format.
|
format.
|
||||||
|
|
Loading…
Reference in New Issue