From 2dad9796a49d13345e926809adedb287fb12b2a0 Mon Sep 17 00:00:00 2001 From: Alexey Semenyuk Date: Sat, 19 Apr 2025 00:55:33 +0500 Subject: [PATCH 1/2] gh-132416: document behavior of Path.symlink_to() when link or/and target already exist --- Doc/library/pathlib.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 708a16e6bc8c94..e8fbbd804c086e 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1535,6 +1535,8 @@ Creating files and directories 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 link or/and the target already exist, :exc:`FileExistsError` is raised. + :: >>> p = Path('mylink') From 3087516f1836e32d605bf1bdbf6e0c02191a18cf Mon Sep 17 00:00:00 2001 From: alexey semenyuk Date: Sat, 17 May 2025 02:05:41 +0500 Subject: [PATCH 2/2] Update Doc/library/pathlib.rst Co-authored-by: Barney Gale --- Doc/library/pathlib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index e8fbbd804c086e..d040d22a4e2d88 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1535,7 +1535,7 @@ Creating files and directories 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 link or/and the target already exist, :exc:`FileExistsError` is raised. + If this path already exists, :exc:`FileExistsError` is raised. :: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy