[docs] [issue27886] Docs: the difference between rename and replace is not obvious

Andrew Svetlov report at bugs.python.org
Sun Aug 28 16:03:34 EDT 2016


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 <report at bugs.python.org>
<https://bugs.python.org/issue27886>
_______________________________________


More information about the docs mailing list