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

Method parent

Lib/pathlib/types.py:197–203  ·  view source on GitHub ↗

The logical parent of the path.

(self)

Source from the content-addressed store, hash-verified

195
196 @property
197 def parent(self):
198 """The logical parent of the path."""
199 path = str(self)
200 parent = self.parser.split(path)[0]
201 if path != parent:
202 return self.with_segments(parent)
203 return self
204
205 @property
206 def parents(self):

Callers

nothing calls this directly

Calls 3

with_segmentsMethod · 0.95
strFunction · 0.85
splitMethod · 0.45

Tested by

no test coverage detected