diff options
author | Tobias Rautenkranz <github@tobias.rautenkranz.ch> | 2024-03-04 17:27:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 17:27:43 (GMT) |
commit | 60743a9a7ee3c3c16a61ff6715e8d170237b5458 (patch) | |
tree | dc0a9d6951338c5951f3740c2bf796f002c7997f /Doc | |
parent | ea1b1c579f600cc85d145c60862b2e6b98701b24 (diff) | |
download | cpython-60743a9a7ee3c3c16a61ff6715e8d170237b5458.zip cpython-60743a9a7ee3c3c16a61ff6715e8d170237b5458.tar.gz cpython-60743a9a7ee3c3c16a61ff6715e8d170237b5458.tar.bz2 |
gh-57141: Add dircmp shallow option (GH-109499)
Co-authored-by: Steve Ward <planet36@gmail.com>
Co-authored-by: Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/filecmp.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst index dfe4b7c..42d20b9 100644 --- a/Doc/library/filecmp.rst +++ b/Doc/library/filecmp.rst @@ -70,7 +70,7 @@ The :mod:`filecmp` module defines the following functions: The :class:`dircmp` class ------------------------- -.. class:: dircmp(a, b, ignore=None, hide=None) +.. class:: dircmp(a, b, ignore=None, hide=None, shallow=True) Construct a new directory comparison object, to compare the directories *a* and *b*. *ignore* is a list of names to ignore, and defaults to @@ -78,7 +78,12 @@ The :class:`dircmp` class defaults to ``[os.curdir, os.pardir]``. The :class:`dircmp` class compares files by doing *shallow* comparisons - as described for :func:`filecmp.cmp`. + as described for :func:`filecmp.cmp` by default using the *shallow* + parameter. + + .. versionchanged:: 3.13 + + Added the *shallow* parameter. The :class:`dircmp` class provides the following methods: |