Skip to content

Commit db9e13b

Browse files
Documentation.
1 parent 621f476 commit db9e13b

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

Doc/library/os.path.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ the :mod:`glob` module.)
411411
If a path doesn't exist or a symlink loop is encountered, and *strict* is
412412
``True``, :exc:`OSError` is raised. If *strict* is ``False`` these errors
413413
are ignored, and so the result might be missing or otherwise inaccessible.
414+
If *strict* is :data:`ALL_BUT_LAST`, the last component of the path
415+
might be missing, but other errors are not ignored.
414416

415417
.. note::
416418
This function emulates the operating system's procedure for making a path
@@ -429,6 +431,16 @@ the :mod:`glob` module.)
429431
.. versionchanged:: 3.10
430432
The *strict* parameter was added.
431433

434+
.. versionchanged:: next
435+
Support for :data:`ALL_BUT_LAST` was added.
436+
437+
438+
.. data:: ALL_BUT_LAST
439+
440+
Special value used for *strict* in :func:`realpath`.
441+
442+
.. versionadded:: next
443+
432444

433445
.. function:: relpath(path, start=os.curdir)
434446

Doc/whatsnew/3.15.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ New modules
8989
Improved modules
9090
================
9191

92+
os.path
93+
-------
94+
95+
* Add support of the all-but-last mode in :func:`~os.path.realpath`.
96+
(Contributed by Serhiy Storchaka in :gh:`71189`.)
97+
9298
ssl
9399
---
94100

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support of the all-but-last mode in :func:`os.path.realpath`.

0 commit comments

Comments
 (0)