MCPcopy Index your code
hub / github.com/python/cpython / parent

Method parent

Lib/pathlib/types.py:216–222  ·  view source on GitHub ↗

The logical parent of the path.

(self)

Source from the content-addressed store, hash-verified

214
215 @property
216 def parent(self):
217 """The logical parent of the path."""
218 path = vfspath(self)
219 parent = self.parser.split(path)[0]
220 if path != parent:
221 return self.with_segments(parent)
222 return self
223
224 @property
225 def parents(self):

Callers

nothing calls this directly

Calls 3

with_segmentsMethod · 0.95
vfspathFunction · 0.90
splitMethod · 0.45

Tested by

no test coverage detected