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

Method parents

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

A sequence of this path's logical parents.

(self)

Source from the content-addressed store, hash-verified

204
205 @property
206 def parents(self):
207 """A sequence of this path's logical parents."""
208 split = self.parser.split
209 path = str(self)
210 parent = split(path)[0]
211 parents = []
212 while path != parent:
213 parents.append(self.with_segments(parent))
214 path = parent
215 parent = split(path)[0]
216 return tuple(parents)
217
218 def full_match(self, pattern):
219 """

Callers

nothing calls this directly

Calls 4

with_segmentsMethod · 0.95
strFunction · 0.85
splitFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected