mirror of
https://github.com/python/cpython.git
synced 2026-01-08 08:22:41 +00:00
[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 32c227470a)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
parent
a199ab3f33
commit
9c2db5725e
1 changed files with 3 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue