Antoine Pitrou <pit...@free.fr> added the comment: > 1. It's inconsistent with copyfile
I think it's ok. When using copyfile you can easily check that the destination file doesn't exist, while with copytree it's harder to do the same for *all* destination files. Therefore it makes sense for copytree to raise an error in this case. > Given shutil's namesake I assume it's supposed to help make python a viable > shell script replacement. It doesn't mean the semantics have to be exactly the same. Actually, many Python users are under Windows where semantics will be different. > It makes it difficult to use copytree with tempfile.mkdtemp(). If I want to > make a temporary directory and copy a folder into it, I need to copytree to a > nonexist subfolder then move all the files down a level or resort to other > unpythonic hacks. I actually don't understand your problem. If you are creating a temporary directory, it is empty so there isn't any risk of hitting an already existing file. In any case, I don't think your arguments are good enough to warrant breaking compatibility with older versions. ---------- nosy: +pitrou resolution: -> rejected status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8125> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com