Thanks to visit codestin.com Credit goes to github.com
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 9af9ac1 commit 3a61d24Copy full SHA for 3a61d24
1 file changed
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