[issue42958] filecmp.cmp(shallow=True) isn't actually shallow when only mtime differs

Andrei Kulakov report at bugs.python.org
Thu Jul 15 11:37:24 EDT 2021


Andrei Kulakov <andrei.avk at gmail.com> added the comment:

I've put up the doc update PR here:
https://github.com/python/cpython/pull/27166

I've also reviewed a few dozen SO questions about filecmp.cmp and shallow arg, many of them find the docs confusing or lacking, so I thought updating docs is definitely very useful.

I haven't seen any of them asking for "force shallow" behavior, but there's many of them and I haven't read all; searching for "force shallow" doesn't find any.

I think it might be useful to also add a new 'force shallow' arg, but I hope more people ask for it or compile a list of SO questions asking for it, otherwise it might not be worth additional complexity.

----------

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


More information about the Python-bugs-list mailing list