Andrew Svetlov added the comment:

Just keeping the reference to `os.rename()`: 
https://docs.python.org/3/library/os.html#os.rename

Aha, `os.rename` says: "On Unix, if dst exists and is a file, it will be 
replaced silently if the user has permission." and "On Windows, if dst already 
exists, OSError will be raised even if it is a file."

Sorry, I've missed this.

Maybe it worth to add `.. warning:` section for both `os.rename` and 
`pathlib.Path.rename`?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue27886>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to