summaryrefslogtreecommitdiffstats
path: root/Doc/library/filecmp.rst
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2013-01-12 14:13:32 (GMT)
committerEli Bendersky <eliben@gmail.com>2013-01-12 14:13:32 (GMT)
commiteb2884a87575f49d797d504872b2efd1f132a771 (patch)
treedc23e9de311ff042e88af1b6d5c03750e9e665df /Doc/library/filecmp.rst
parent60a0c710311b29539f8c8a6404a51b21f44b1e43 (diff)
downloadcpython-eb2884a87575f49d797d504872b2efd1f132a771.zip
cpython-eb2884a87575f49d797d504872b2efd1f132a771.tar.gz
cpython-eb2884a87575f49d797d504872b2efd1f132a771.tar.bz2
Close #15442: Expand the list of default directories ignored by filecmp.dircmp and expose it as a module attribute
Diffstat (limited to 'Doc/library/filecmp.rst')
-rw-r--r--Doc/library/filecmp.rst14
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst
index 8a88f8c..8577c17 100644
--- a/Doc/library/filecmp.rst
+++ b/Doc/library/filecmp.rst
@@ -55,10 +55,10 @@ The :class:`dircmp` class
.. class:: dircmp(a, b, ignore=None, hide=None)
- Construct a new directory comparison object, to compare the directories *a* and
- *b*. *ignore* is a list of names to ignore, and defaults to ``['RCS', 'CVS',
- 'tags']``. *hide* is a list of names to hide, and defaults to ``[os.curdir,
- os.pardir]``.
+ Construct a new directory comparison object, to compare the directories *a*
+ and *b*. *ignore* is a list of names to ignore, and defaults to
+ :attr:`filecmp.DEFAULT_IGNORES`. *hide* is a list of names to hide, and
+ defaults to ``[os.curdir, os.pardir]``.
The :class:`dircmp` class compares files by doing *shallow* comparisons
as described for :func:`filecmp.cmp`.
@@ -164,6 +164,12 @@ The :class:`dircmp` class
A dictionary mapping names in :attr:`common_dirs` to :class:`dircmp`
objects.
+.. attribute:: DEFAULT_IGNORES
+
+ .. versionadded:: 3.3
+
+ List of directories ignored by :class:`dircmp` by default.
+
Here is a simplified example of using the ``subdirs`` attribute to search
recursively through two directories to show common different files::