Message100944
> 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. |
|
Date |
User |
Action |
Args |
2010-03-12 16:36:05 | pitrou | set | recipients:
+ pitrou, joseph.h.garvin |
2010-03-12 16:36:05 | pitrou | set | messageid: <1268411765.7.0.433244460427.issue8125@psf.upfronthosting.co.za> |
2010-03-12 16:36:03 | pitrou | link | issue8125 messages |
2010-03-12 16:36:03 | pitrou | create | |
|