[issue2663] shutil.copytree glob-style filtering [patch]
Alexander Belopolsky
report at bugs.python.org
Mon Apr 21 15:42:00 CEST 2008
Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:
On the interface, I would suggest renaming 'exclude' to 'ignore' for
consistency with filecmp.dircmp. Also consider detecting file separator
in the patterns and interpreting them as an absolute (if
pattern.startswith(pathsep)) or relative with respect to src.
On the implementation, consider making 'exclude_files' a set for a
faster lookup. It should also be possible to refactor the code to
avoid checking the type of 'exclude' on every file and every recursion.
----------
nosy: +belopolsky
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2663>
__________________________________
More information about the Python-bugs-list
mailing list