Serhiy Storchaka added the comment:

Path.rename() is simple wrapper around os.rename() and returns the result of 
os.rename(). If os.rename() became returning something useful, this change will 
made impossible to return it from Path.rename().

Why not create destination Path object explicitly?

    bar_var = pathlib.PosixPath('bar')
    foo_var = pathlib.PosixPath('foo')
    bar_var.rename(foo_var)

Note, that in 3.6 you can also write

    os.rename(bar_var, foo_var)

----------
nosy: +pitrou, serhiy.storchaka
versions: +Python 3.7 -Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29425>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to