From c2593b4d06712cefcdeae93b32f88faa4772bc3a Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 4 Aug 2021 13:03:33 -0700 Subject: bpo-42958: Improve description of shallow= in filecmp.cmp docs (GH-27166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Langa Co-authored-by: Alexander Vandenbulcke (cherry picked from commit a8dc4893d2b28827e82447326ea47759c161a722) Co-authored-by: andrei kulakov --- Lib/filecmp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Lib/filecmp.py') diff --git a/Lib/filecmp.py b/Lib/filecmp.py index 7c47eb022c..70a4b23c98 100644 --- a/Lib/filecmp.py +++ b/Lib/filecmp.py @@ -36,8 +36,9 @@ def cmp(f1, f2, shallow=True): f2 -- Second file name - shallow -- Just check stat signature (do not read the files). - defaults to True. + shallow -- treat files as identical if their stat signatures (type, size, + mtime) are identical. Otherwise, files are considered different + if their sizes or contents differ. [default: True] Return value: -- cgit v1.2.1