https://github.com/python/cpython/commit/1f04ac8e277a744193db08079582462a11c80331 commit: 1f04ac8e277a744193db08079582462a11c80331 branch: 3.11 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: barneygale <barney.g...@gmail.com> date: 2024-01-23T05:37:32Z summary:
[3.11] GH-105900: Fix `pathlib.Path.symlink_to(target_is_directory=...)` docs (GH-114035) (#114465) Clarify that *target_is_directory* only matters if the target doesn't exist. (cherry picked from commit b822b85ac11e73bbe4417bf03ee770ab116bb42d) Co-authored-by: Barney Gale <barney.g...@gmail.com> files: M Doc/library/pathlib.rst diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 528236cfa7eaa6..4c3edcb6361007 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1187,9 +1187,13 @@ call fails (for example because the path doesn't exist). .. method:: Path.symlink_to(target, target_is_directory=False) - Make this path a symbolic link to *target*. Under Windows, - *target_is_directory* must be true (default ``False``) if the link's target - is a directory. Under POSIX, *target_is_directory*'s value is ignored. + Make this path a symbolic link pointing to *target*. + + On Windows, a symlink represents either a file or a directory, and does not + morph to the target dynamically. If the target is present, the type of the + symlink will be created to match. Otherwise, the symlink will be created + as a directory if *target_is_directory* is ``True`` or a file symlink (the + default) otherwise. On non-Windows platforms, *target_is_directory* is ignored. :: _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com