From d7c368c886ce0eab7971c2dfdb222485f41c7c03 Mon Sep 17 00:00:00 2001 From: 369koushil Date: Thu, 6 Nov 2025 19:19:32 +0530 Subject: [PATCH 1/3] bpo-141127: Clarify os.symlink() documentation for argument order --- Doc/library/os.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index d31d0ce9c85e9a..c020eff3d43d73 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3869,9 +3869,9 @@ features: .. versionadded:: 3.3 -.. function:: symlink(src, dst, target_is_directory=False, *, dir_fd=None) +.. function:: symlink(target, link_name, target_is_directory=False, *, dir_fd=None) - Create a symbolic link pointing to *src* named *dst*. + Create a symbolic link pointing to *target* named *link_name*. 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 From aff15699e18ac61ba1320ae5e49706df5047e41e Mon Sep 17 00:00:00 2001 From: 369koushil Date: Fri, 7 Nov 2025 06:16:52 +0530 Subject: [PATCH 2/3] gh-141127: Clarify os.symlink() doc without changing argument names --- Doc/library/os.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index c020eff3d43d73..e14b50c553aa90 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3868,10 +3868,13 @@ features: .. versionadded:: 3.3 +.. function:: symlink(src, dst, target_is_directory=False, *, dir_fd=None) -.. function:: symlink(target, link_name, target_is_directory=False, *, dir_fd=None) + Create a symbolic link pointing to *src* named *dst*. - Create a symbolic link pointing to *target* named *link_name*. + The *src* parameter refers to the target of the link (the file or directory being linked to), + and *dst* is the name of the link being created. + This matches the behavior of the Unix ``ln`` command (``ln TARGET LINK_NAME``). 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 From 5c59f4001fcdc9de67843802e038c7bbffe0c6e6 Mon Sep 17 00:00:00 2001 From: 369koushil Date: Fri, 7 Nov 2025 19:38:04 +0530 Subject: [PATCH 3/3] =?UTF-8?q?gh-141127:=20Apply=20reviewer=20feedback=20?= =?UTF-8?q?=E2=80=94=20restore=20blank=20line=20and=20remove=20Unix=20refe?= =?UTF-8?q?rence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Doc/library/os.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index e14b50c553aa90..dbc3c92c8798b5 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3868,13 +3868,13 @@ features: .. versionadded:: 3.3 + .. function:: symlink(src, dst, target_is_directory=False, *, dir_fd=None) Create a symbolic link pointing to *src* named *dst*. The *src* parameter refers to the target of the link (the file or directory being linked to), and *dst* is the name of the link being created. - This matches the behavior of the Unix ``ln`` command (``ln TARGET LINK_NAME``). 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