diff -r a2d01ed713cb Doc/library/filecmp.rst --- a/Doc/library/filecmp.rst Sun Aug 03 15:27:18 2014 -0400 +++ b/Doc/library/filecmp.rst Sun Aug 03 16:18:13 2014 -0700 @@ -21,8 +21,8 @@ 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, only the files' :func:`os.stat` signatures are + compared. If *shallow* is false, the contents of the files are compared. Note that no external programs are called from this function, giving it portability and efficiency. diff -r a2d01ed713cb Lib/filecmp.py --- a/Lib/filecmp.py Sun Aug 03 15:27:18 2014 -0400 +++ b/Lib/filecmp.py Sun Aug 03 16:18:13 2014 -0700 @@ -52,8 +52,8 @@ s2 = _sig(os.stat(f2)) if s1[0] != stat.S_IFREG or s2[0] != stat.S_IFREG: return False - if shallow and s1 == s2: - return True + if shallow: + return s1 == s2 if s1[1] != s2[1]: return False