diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 923cd4a2c4c1f1..3c918079e91b4a 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -1553,6 +1553,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 this path already exists, :exc:`FileExistsError` is raised. + :: >>> p = Path('mylink')