
On 24 February 2015 at 22:54, Nick Coghlan <ncoghlan@gmail.com> wrote:
On the principle of keeping it simple, I prefer just requiring a target, giving an error if the source name and target name are the same (which still leaves loopholes for the determined fool on case insensitive filesystems :-)) and just documenting that inplace modification isn't supported. The PEP clearly states that it's *minimal* tooling, after all...
https://docs.python.org/3/library/os.path.html#os.path.samefile covers this check in a robust, cross-platform way.
Wow, I hadn't realised that samefile had become reliable on Windows (ino/dev always used to be unreliable years ago). It's the little things like this that sneak into new releases without much fanfare that make so much *actual* difference. Thanks to whoever implemented this, and to all the people putting in the little changes that make new versions so much better :-) Paul