We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PurePath.is_relative_to()
1 parent 23585e4 commit 115a13cCopy full SHA for 115a13c
Doc/library/pathlib.rst
@@ -515,6 +515,13 @@ Pure paths provide the following methods and properties:
515
>>> p.is_relative_to('/usr')
516
False
517
518
+ This method is string-based; it neither accesses the filesystem nor treats
519
+ "``..``" segments specially. The following code is equivalent:
520
+
521
+ >>> u = PurePath('/usr')
522
+ >>> u == p or u in p.parents
523
+ False
524
525
.. versionadded:: 3.9
526
527
.. deprecated-removed:: 3.12 3.14
0 commit comments