From cb3cd4f25e64b5d45de2ea53f22c3fdb3e746e7e Mon Sep 17 00:00:00 2001 From: Alexey Semenyuk Date: Wed, 23 Apr 2025 01:24:15 +0500 Subject: [PATCH] gh-132416: document behavior of os.symlink when dst already exists --- Doc/library/os.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 54a5d3b98e8662..8e6232e3622dcf 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3510,6 +3510,8 @@ features: 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. + If the *dst* already exists, :exc:`FileExistsError` is raised. + This function can support :ref:`paths relative to directory descriptors `.