Message 150186 - Python tracker (original) (raw)

2011/12/23 Charles-François Natali <report@bugs.python.org>

One of the Python advantages is providing predictable cross-platform behavior. If we can't introduce nice API without BC break, it is not a reason to introduce ulgy API.

We cannot make rename() overwrite existing files by default (on Windows). It's out of question, too much code might rely on this, and this may very well introduce security flaws. If you're concerned with the semantics difference between platforms, well, there's not much we can do about it now. Java behaves in the same way, for example.

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