Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.11] GH-101130: Document multiple arguments for PurePath.[is_]relative_to() #114034

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
@@ -508,6 +508,8 @@ Pure paths provide the following methods and properties:
>>> p.is_relative_to('/usr')
False

If multiple arguments are supplied, they are joined together.

.. versionadded:: 3.9


@@ -589,6 +591,8 @@ Pure paths provide the following methods and properties:
.format(str(self), str(formatted)))
ValueError: '/etc/passwd' is not in the subpath of '/usr' OR one path is relative and the other absolute.

If multiple arguments are supplied, they are joined together.

NOTE: This function is part of :class:`PurePath` and works with strings. It does not check or access the underlying file structure.