Primary
PurePath.is_relative_to() ⚬|Documentation|1st|20260208171558-00-⌔
PurePath.is_relative_to(other)Return whether or not this path is relative to the other path.
>>> p = PurePath('/etc/passwd') >>> p.is_relative_to('/etc') True >>> p.is_relative_to('/usr') FalseThis 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 FalseAdded in version 3.9.
Deprecated since version 3.12, removed in version 3.14: Passing additional arguments is deprecated; if supplied, they are joined with other.
Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •