File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -1631,20 +1631,18 @@ Copying, renaming and deleting
16311631 use :func: `Path.rmdir ` instead.
16321632
16331633 If *missing_ok * is false (the default), this method propagates any
1634- :exc: `OSError ` from the operating system, including :exc: ` FileNotFoundError ` .
1634+ :exc: `OSError ` from the operating system.
16351635
1636- If *missing_ok * is true, this shows similar behavior to the POSIX ``rm -f ``
1637- command and any :exc: `FileNotFoundError ` or :exc: `NotADirectoryError `
1638- exceptions will be ignored. This means that the file does not exist after
1639- execution, but cannot guarantee that the file did exist before. Any other
1640- :exc: `OSError ` which is encountered will continue to be propogated.
1636+ If *missing_ok * is true, :exc: `FileNotFoundError ` and
1637+ :exc: `NotADirectoryError ` exceptions will be ignored. This behavior is
1638+ similar to the POSIX ``rm -f `` command.
16411639
16421640 .. versionchanged :: 3.8
16431641 The *missing_ok * parameter was added.
16441642
1645- .. versionchanged :: 3.??
1646- The * missing_ok * parameter will also ignore :exc: `NotADirectoryError `
1647-
1643+ .. versionchanged :: 3.14
1644+ Suppresses :exc: `NotADirectoryError ` exceptions when * missing_ok * is
1645+ true.
16481646
16491647.. method :: Path.rmdir()
16501648
You can’t perform that action at this time.
0 commit comments