summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-04 20:03:33 (GMT)
committerGitHub <noreply@github.com>2021-08-04 20:03:33 (GMT)
commitc2593b4d06712cefcdeae93b32f88faa4772bc3a (patch)
tree70eb5cd0ee255e81693f2752d2f3b8cff28f1a92 /Doc
parent98f6a72ff621c2033e8f2c38df410e9bfa2b772a (diff)
downloadcpython-c2593b4d06712cefcdeae93b32f88faa4772bc3a.zip
cpython-c2593b4d06712cefcdeae93b32f88faa4772bc3a.tar.gz
cpython-c2593b4d06712cefcdeae93b32f88faa4772bc3a.tar.bz2
bpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl> Co-authored-by: Alexander Vandenbulcke <alexander.vandenbulcke95@gmail.com> (cherry picked from commit a8dc4893d2b28827e82447326ea47759c161a722) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/filecmp.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst
index c60603b..83e9e14 100644
--- a/Doc/library/filecmp.rst
+++ b/Doc/library/filecmp.rst
@@ -22,8 +22,11 @@ The :mod:`filecmp` module defines the following functions:
Compare the files named *f1* and *f2*, returning ``True`` if they seem equal,
``False`` otherwise.
- If *shallow* is true, files with identical :func:`os.stat` signatures are
- taken to be equal. Otherwise, the contents of the files are compared.
+ If *shallow* is true and the :func:`os.stat` signatures (file type, size, and
+ modification time) of both files are identical, the files are taken to be
+ equal.
+
+ Otherwise, the files are treated as different if their sizes or contents differ.
Note that no external programs are called from this function, giving it
portability and efficiency.