[issue29425] File-altering aspects of pathlib should return new pathlib objects
Walter Szeliga
report at bugs.python.org
Tue Feb 7 14:04:49 EST 2017
Walter Szeliga added the comment:
If Path.rename() were made to be slightly more than a wrapper around os.rename(), then any future changes to the return value of os.rename() could be taken into consideration in the return value of Path.rename(). I don't see how anything would become impossible then.
Creating the destination Path object explicitly is my solution right now. Since it had become such a pattern in my code, I figured it could be delegated up to the level of the Path object and make for cleaner looking code.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29425>
_______________________________________
More information about the Python-bugs-list
mailing list