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

2021-03-12 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg273845 ___ Python tracker ___ ___ Python-bugs-list mailing list

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

2020-10-28 Thread Ezio Melotti
Change by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2016-08-28 Thread Eryk Sun
Eryk Sun added the comment: Having rename() in pathlib is fine as long as it links to the os docs. This probably needs a new issue, but I do see room for improvement in the latter. For Unix, the os.rename and os.replace docs should clarify that an empty destination directory can be replaced

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

2016-08-28 Thread R. David Murray
R. David Murray added the comment: No, we don't like to overuse warnings. -- ___ Python tracker ___ ___

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

2016-08-28 Thread Andrew Svetlov
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,

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

2016-08-28 Thread R. David Murray
R. David Murray added the comment: The existing docs are pretty clear on the difference: rename is only guaranteed to replace an existing file on unix (which I think means posix in this context), whereas replace always replaces the file, regardless of platform. I'm actually surprised that

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

2016-08-28 Thread R. David Murray
Changes by R. David Murray : -- versions: -Python 3.4 ___ Python tracker ___ ___

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

2016-08-28 Thread Andrew Svetlov
New submission from Andrew Svetlov: Hi. On reading the doc for pathlib I've stuck with `.rename()` and `.replace()` (https://docs.python.org/3/library/pathlib.html#pathlib.Path.rename). What's the difference? Going to pathlib's source code I've figured out that methods are use different