[issue1738] filecmp.dircmp does exact match only

Michael Amrhein report at bugs.python.org
Fri Apr 11 18:10:49 CEST 2008


Michael Amrhein <mamrhein at users.sourceforge.net> added the comment:

Ok, I've set default arguments (back) to None. Revised patch attached.

Defaulting the match function to fnmatch doesn't change the behavior in
the "normal" case, i.e. when regular file / directory names are used,
like in the default value of ignore. It behaves different in two cases:
a) A string given in ignore contains wildcard character(s):
In this case this parameter would have no effect in the previous
implementation, because the string would not match any file / directory
name exactly. In the changed implementation all files / directories
matching the pattern would be ignored. If the wildcard(s) were included
by intent, this is what probably was intended; if they were included by
mistake, both version do not behave as intended.
b) File system is case-insensitive:
In this case the changed implementation will ignore files / directories
which the previous version did not ignore because of a case mismatch.
But, on such a file system this is what one would normally expect, I think.
So, in both cases, I feel the changed behavior is acceptable.
Or did I miss something?

Added file: http://bugs.python.org/file10008/add_match_func.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1738>
__________________________________


More information about the Python-bugs-list mailing list