Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ef7929

Browse files
authored
FixPurePath.relative_to links in the pathlib documentation. (GH-93268)
These are currently broken as they refer to :meth:`Path.relative_to` rather than :meth:`PurePath.relative_to`, and `relative_to` is a method on `PurePath`.
1 parent296081a commit8ef7929

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Doc/library/pathlib.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,7 +1265,7 @@ Below is a table mapping various :mod:`os` functions to their corresponding
12651265
:func:`os.link`:meth:`Path.hardlink_to`
12661266
:func:`os.symlink`:meth:`Path.symlink_to`
12671267
:func:`os.readlink`:meth:`Path.readlink`
1268-
:func:`os.path.relpath`:meth:`Path.relative_to` [#]_
1268+
:func:`os.path.relpath`:meth:`PurePath.relative_to` [#]_
12691269
:func:`os.stat`:meth:`Path.stat`,
12701270
:meth:`Path.owner`,
12711271
:meth:`Path.group`
@@ -1280,4 +1280,4 @@ Below is a table mapping various :mod:`os` functions to their corresponding
12801280
..rubric::Footnotes
12811281

12821282
.. [#]:func:`os.path.abspath` normalizes the resulting path, which may change its meaning in the presence of symlinks, while:meth:`Path.absolute` does not.
1283-
.. [#]:meth:`Path.relative_to` requires ``self`` to be the subpath of the argument, but:func:`os.path.relpath` does not.
1283+
.. [#]:meth:`PurePath.relative_to` requires ``self`` to be the subpath of the argument, but:func:`os.path.relpath` does not.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp