[issue41354] filecmp.cmp documentation does not match actual code

Christof Hanke report at bugs.python.org
Mon Dec 28 02:45:44 EST 2020


Christof Hanke <christof.hanke at mpcdf.mpg.de> added the comment:

I understand that you are reluctant to change existing code.
But for me as a sysadmin, the current behavior doesn't make sense for two reasons:

* st.st_size is part of _sig.  why would you do a deep compare if  the two files have a different length ?

* comparing thousands of files, a proper shallow-only compare is required, since it takes a long time to compare large files (especially when they are migrated to a tape-backend), so a silent-fallback to a deep-compare is not good.

----------

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


More information about the Python-bugs-list mailing list