summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-05-11 17:01:32 (GMT)
committerFred Drake <fdrake@acm.org>2001-05-11 17:01:32 (GMT)
commitba7e2c8a27c8d059520548a474d31d8770c81fcd (patch)
tree55fddafc6a1c241599916a6c4fd6eab5c6177c1b
parent87068f1eaa01e1e15d6d34a6ac7dc51f99425890 (diff)
downloadcpython-ba7e2c8a27c8d059520548a474d31d8770c81fcd.zip
cpython-ba7e2c8a27c8d059520548a474d31d8770c81fcd.tar.gz
cpython-ba7e2c8a27c8d059520548a474d31d8770c81fcd.tar.bz2
Add some text to make the dircmp object section more readable, and move
some stuff around.
-rw-r--r--Doc/lib/libfilecmp.tex23
1 files changed, 16 insertions, 7 deletions
diff --git a/Doc/lib/libfilecmp.tex b/Doc/lib/libfilecmp.tex
index 94c1e0c..c53fc33 100644
--- a/Doc/lib/libfilecmp.tex
+++ b/Doc/lib/libfilecmp.tex
@@ -6,10 +6,10 @@
\modulesynopsis{Compare files efficiently.}
-The \module{filecmp} module defines functions to compare files and directories,
-with various optional time/correctness trade-offs.
+The \module{filecmp} module defines functions to compare files and
+directories, with various optional time/correctness trade-offs.
-The \module{filecmp} module defines the following function:
+The \module{filecmp} module defines the following functions:
\begin{funcdesc}{cmp}{f1, f2\optional{, shallow\optional{, use_statcache}}}
Compare the files named \var{f1} and \var{f2}, returning \code{1} if
@@ -58,6 +58,8 @@ Example:
\subsection{The \protect\class{dircmp} class \label{dircmp-objects}}
+\class{dircmp} instances are built using this constructor:
+
\begin{classdesc}{dircmp}{a, b\optional{, ignore\optional{, hide}}}
Construct a new directory comparison object, to compare the
directories \var{a} and \var{b}. \var{ignore} is a list of names to
@@ -65,6 +67,8 @@ ignore, and defaults to \code{['RCS', 'CVS', 'tags']}. \var{hide} is a
list of names to hide, and defaults to \code{[os.curdir, os.pardir]}.
\end{classdesc}
+The \class{dircmp} class provides the following methods:
+
\begin{methoddesc}[dircmp]{report}{}
Print (to \code{sys.stdout}) a comparison between \var{a} and \var{b}.
\end{methoddesc}
@@ -79,6 +83,15 @@ Print a comparison between \var{a} and \var{b} and common
subdirctories (recursively).
\end{methoddesc}
+
+The \class{dircmp} offers a number of interesting attributes that may
+be used to get various bits of information about the directory trees
+being compared.
+
+Note that via \method{__getattr__()} hooks, all attributes are
+computed lazilly, so there is no speed penalty if only those
+attributes which are lightweight to compute are used.
+
\begin{memberdesc}[dircmp]{left_list}
Files and subdirectories in \var{a}, filtered by \var{hide} and
\var{ignore}.
@@ -132,7 +145,3 @@ compared.
A dictionary mapping names in \member{common_dirs} to
\class{dircmp} objects.
\end{memberdesc}
-
-Note that via \method{__getattr__()} hooks, all attributes are
-computed lazilly, so there is no speed penalty if only those
-attributes which are lightweight to compute are used.