[issue8828] Atomic function to rename a file

Charles-François Natali report at bugs.python.org
Fri Dec 23 18:32:06 CET 2011


Charles-François Natali <neologix at free.fr> added the comment:

> I propose quite the opposite. rename() should not overwrite existing
> files by default.

1. That's not what I understood from:
> os.rename(overwrite=True) to produce consistent cross-platform 
> behavior.

2. The above argument on backward incompatible change applies in exactly the same way (just exchange Windows for POSIX).

3. As explained above, it can not be done reliably on POSIX (TOCTTOU race).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8828>
_______________________________________


More information about the Python-bugs-list mailing list