[issue33896] filecmp.cmp returns True on files that differ

Dean Morin report at bugs.python.org
Mon Jun 18 18:10:28 EDT 2018


Dean Morin <morin.dean at gmail.com> added the comment:

Fair enough, how about just making it clearer in the documentation? Currently you need to look at the source code to see what would be required for a signature clash to occur. Maybe something like:

Note that the [os.stat()](https://docs.python.org/3/library/os.html#os.stat) signatures only consider [st_mode](https://docs.python.org/3/library/os.html#os.stat_result.st_mode), [st_size](https://docs.python.org/3/library/os.html#os.stat_result.st_size), and [st_mtime](https://docs.python.org/3/library/os.html#os.stat_result.st_mtime). In some circumstances it's possible for differing files to be considered equal when _shallow_ is `True`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33896>
_______________________________________


More information about the Python-bugs-list mailing list