This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Walter Szeliga, brett.cannon, pitrou, serhiy.storchaka
Date 2017-02-07.09:32:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1486459952.41.0.273205321236.issue29425@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2017-02-07 09:32:32serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, pitrou, Walter Szeliga
2017-02-07 09:32:32serhiy.storchakasetmessageid: <1486459952.41.0.273205321236.issue29425@psf.upfronthosting.co.za>
2017-02-07 09:32:32serhiy.storchakalinkissue29425 messages
2017-02-07 09:32:32serhiy.storchakacreate