summaryrefslogtreecommitdiff
path: root/Doc/library/filecmp.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/filecmp.rst')
-rw-r--r--Doc/library/filecmp.rst21
1 files changed, 3 insertions, 18 deletions
diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst
index 8fd23dd9de..8a88f8ce9a 100644
--- a/Doc/library/filecmp.rst
+++ b/Doc/library/filecmp.rst
@@ -21,11 +21,8 @@ The :mod:`filecmp` module defines the following functions:
Compare the files named *f1* and *f2*, returning ``True`` if they seem equal,
``False`` otherwise.
- Unless *shallow* is given and is false, files with identical :func:`os.stat`
- signatures are taken to be equal.
-
- Files that were compared using this function will not be compared again unless
- their :func:`os.stat` signature changes.
+ If *shallow* is true, files with identical :func:`os.stat` signatures are
+ taken to be equal. Otherwise, the contents of the files are compared.
Note that no external programs are called from this function, giving it
portability and efficiency.
@@ -51,23 +48,11 @@ The :mod:`filecmp` module defines the following functions:
one of the three returned lists.
-Example::
-
- >>> import filecmp
- >>> filecmp.cmp('undoc.rst', 'undoc.rst') # doctest: +SKIP
- True
- >>> filecmp.cmp('undoc.rst', 'index.rst') # doctest: +SKIP
- False
-
-
.. _dircmp-objects:
The :class:`dircmp` class
-------------------------
-:class:`dircmp` instances are built using this constructor:
-
-
.. class:: dircmp(a, b, ignore=None, hide=None)
Construct a new directory comparison object, to compare the directories *a* and
@@ -83,7 +68,7 @@ The :class:`dircmp` class
.. method:: report()
- Print (to ``sys.stdout``) a comparison between *a* and *b*.
+ Print (to :data:`sys.stdout`) a comparison between *a* and *b*.
.. method:: report_partial_closure()