[issue1577] shutil.move() does not use os.rename() if dst is a directory
Guido van Rossum
report at bugs.python.org
Tue Dec 11 18:24:04 CET 2007
Guido van Rossum added the comment:
> Since we already have os.rename, wouldn't it be better for shutil.move()
> to be closer to command line 'mv'? I think Facundo's approach should work.
I'd rather not do this. It might cause disasters for code that expects
the old semantics. If you want a way to do the "mv" semantics, propose
a new API.
shutil.move() still offers several things over os.rename(): deleting
the target even if os.rename() doesn't (it doesn't on Windows);
cross-filesystem moves implemented as copy.
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1577>
__________________________________
More information about the Python-bugs-list
mailing list