diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index 46a4d10b11d602..701131b5b2ec46 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -509,6 +509,13 @@ Pure paths provide the following methods and properties: >>> p.is_relative_to('/usr') False + This method is string-based; it neither accesses the filesystem nor treats + "``..``" segments specially. The following code is equivalent: + + >>> u = PurePath('/usr') + >>> u == p or u in p.parents + False + .. versionadded:: 3.9 .. deprecated-removed:: 3.12 3.14