https://github.com/python/cpython/commit/9c2db5725ee736222af519cc9deb68a0dec1a4c2
commit: 9c2db5725ee736222af519cc9deb68a0dec1a4c2
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: barneygale <[email protected]>
date: 2024-01-23T02:37:35Z
summary:

[3.12] GH-82695: Clarify `pathlib.Path.mkdir()` documentation (GH-114032) 
(#114462)

Remove a double negative in the documentation of `mkdir()`'s *exist_ok*
parameter.

(cherry picked from commit 32c227470aa6f72950b76206ffc529c258b4b8fa)

Co-authored-by: Barney Gale <[email protected]>
Co-authored-by: Adam Turner <[email protected]>

files:
M Doc/library/pathlib.rst

diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index 701131b5b2ec46..345a974dcb10bd 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -1184,9 +1184,9 @@ call fails (for example because the path doesn't exist).
    If *exist_ok* is false (the default), :exc:`FileExistsError` is
    raised if the target directory already exists.
 
-   If *exist_ok* is true, :exc:`FileExistsError` exceptions will be
-   ignored (same behavior as the POSIX ``mkdir -p`` command), but only if the
-   last path component is not an existing non-directory file.
+   If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the 
given
+   path already exists in the file system and is not a directory (same
+   behavior as the POSIX ``mkdir -p`` command).
 
    .. versionchanged:: 3.5
       The *exist_ok* parameter was added.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to