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

Andrei Kulakov report at bugs.python.org
Mon Jul 12 13:35:27 EDT 2021


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

Christof and Alexander, as you both said your preference is to have some way of enforcing "only shallow" compare, I want to clarify -- it seems if you do that, you will get the answer of True if the files are most likely the same (sig is equal), but if the sig is not equal, I'm not sure what answer you expect or why. The sig may be different because of mtime, and then the files may be different or the same, it's anyone's guess.

I wonder if both of you expect the same behavior, and if so, for the same use case or not?

----------
nosy: +andrei.avk

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


More information about the Python-bugs-list mailing list