Despite the bug being closed as WONTFIX, at the very least this seems like a valid docs issue.  But (for whatever a non-core-dev opinion is worth), I'm +1 both on the proposed solution and deprecation.of `link_to()`


On Wed, Mar 11, 2020 at 10:45 AM Barney Gale <> wrote:

Pathlib's symlink_to() and link_to() methods have different argument orders, so:

    a.symlink_to(b)  # Creates a symlink from A to B
    a.link_to(b)  # Creates a hard link from B to A

I don't think link_to() was intended to be implemented this way, as the docs say "Create a hard link pointing to a path named target.". It's also inconsistent with everything else in pathlib, most obviously symlink_to().

Bug report here:

This /really/ irks me. Apparently it's too late to fix link_to(), so I'd like to suggest we add a new hardlink_to() method that matches the symlink_to() argument order. link_to() then becomes deprecated/undocumented.

Any thoughts?

Python-Dev mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct: