Skip to content

Commit 87b8ccc

Browse files
committed
pythonGH-99334: Explain that PurePath.is_relative_to() is purely lexical. (python#114031)
(cherry picked from commit 3a61d24)
1 parent dcda3aa commit 87b8ccc

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/library/pathlib.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,13 @@ Pure paths provide the following methods and properties:
510510

511511
If multiple arguments are supplied, they are joined together.
512512

513+
This method is string-based; it neither accesses the filesystem nor treats
514+
"``..``" segments specially. The following code is equivalent:
515+
516+
>>> u = PurePath('/usr')
517+
>>> u == p or u in p.parents
518+
False
519+
513520
.. versionadded:: 3.9
514521

515522

0 commit comments

Comments
 (0)