[docs] [issue16278] os.rename documentation slightly inaccurate

Todd Rovito report at bugs.python.org
Wed Oct 31 05:03:05 CET 2012

Todd Rovito added the comment:

While writing test cases I discovered another conflict with the documentation.  The phrase "On Unix, if dst exists and is a file, it will be replaced silently if the user has permission and src is a file." is not correct.  According to the test cases I wrote in the attached patch see the method test_rename_src_file_dest_file_exists in the class FileTests the destination file is not replaced and the source file actually is removed.  I will seek advice from Python Core Mentorship to see if this is a bug or normal behavior. 

First time writing test cases so I hope I am on the right track.

Added file: http://bugs.python.org/file27804/OSRename_test_os.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list