Skip to content

Commit 01188f6

Browse files
committed
Add notes to highlight differences
1 parent 0b9454d commit 01188f6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Doc/library/pathlib.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,9 @@ Below is a table mapping various :mod:`os` functions to their corresponding
12011201
:func:`os.path.relpath` and :meth:`PurePath.relative_to`.
12021202

12031203
==================================== ==============================
1204-
os and os.path pathlib
1204+
:mod:`os` and :mod:`os.path` :mod:`pathlib`
12051205
==================================== ==============================
1206-
:func:`os.path.abspath` :meth:`Path.resolve`
1206+
:func:`os.path.abspath` :meth:`Path.resolve` [#]_
12071207
:func:`os.chmod` :meth:`Path.chmod`
12081208
:func:`os.mkdir` :meth:`Path.mkdir`
12091209
:func:`os.makedirs` :meth:`Path.mkdir`
@@ -1222,6 +1222,7 @@ os and os.path pathlib
12221222
:func:`os.link` :meth:`Path.link_to`
12231223
:func:`os.symlink` :meth:`Path.symlink_to`
12241224
:func:`os.readlink` :meth:`Path.readlink`
1225+
:func:`os.path.relpath` :meth:`Path.relative_to` [#]_
12251226
:func:`os.stat` :meth:`Path.stat`,
12261227
:meth:`Path.owner`,
12271228
:meth:`Path.group`
@@ -1232,3 +1233,8 @@ os and os.path pathlib
12321233
:func:`os.path.samefile` :meth:`Path.samefile`
12331234
:func:`os.path.splitext` :data:`PurePath.suffix`
12341235
==================================== ==============================
1236+
1237+
.. rubric:: Footnotes
1238+
1239+
.. [#] :func:`os.path.abspath` does not resolve symbolic links while :meth:`Path.resolve` does.
1240+
.. [#] :meth:`Path.relative_to` requires ``self`` to be the subpath of the argument, but :func:`os.path.relpath` does not.

0 commit comments

Comments
 (0)