mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Close #15442: Expand the list of default directories ignored by filecmp.dircmp and expose it as a module attribute
This commit is contained in:
parent
60a0c71031
commit
eb2884a875
4 changed files with 32 additions and 12 deletions
|
@ -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::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue