New submission from Barney Gale <[email protected]>:
Compare the documentation of `symlink_to()` and `link_to()`:
.. method:: Path.symlink_to(target, target_is_directory=False)
Make this path a symbolic link to *target*.
.. method:: Path.link_to(target)
Create a hard link pointing to a path named *target*.
In fact, `link_to()` does something like:
Make *target* a hard link to this path.
Which is unexpected given the naming and inconsistency with `symlink_to()`, but
it's the way the current implementation works, and so the documentation should
reflect that.
Adding a replacement `hardlink_to()` function is covered here in bpo-39950.
----------
assignee: docs@python
components: Documentation
messages: 385474
nosy: barneygale, docs@python
priority: normal
severity: normal
status: open
title: `pathlib.Path.link_to()` documentation is misleading
type: behavior
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42999>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com