MCPcopy Index your code
hub / github.com/RustPython/RustPython / is_relative_to

Method is_relative_to

Lib/pathlib/__init__.py:498–503  ·  view source on GitHub ↗

Return True if the path is relative to another path or False.

(self, other)

Source from the content-addressed store, hash-verified

496 return self._from_parsed_parts('', '', parts)
497
498 def is_relative_to(self, other):
499 """Return True if the path is relative to another path or False.
500 """
501 if not hasattr(other, 'with_segments'):
502 other = self.with_segments(other)
503 return other == self or other in self.parents
504
505 def is_absolute(self):
506 """True if the path is absolute (has both a root and, if applicable,

Callers 2

Calls 2

with_segmentsMethod · 0.95
hasattrFunction · 0.85

Tested by 2