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

Function _path_split

Lib/importlib/_bootstrap_external.py:137–142  ·  view source on GitHub ↗

Replacement for os.path.split().

(path)

Source from the content-addressed store, hash-verified

135
136
137def _path_split(path):
138 """Replacement for os.path.split()."""
139 i = max(path.rfind(p) for p in path_separators)
140 if i < 0:
141 return '', path
142 return path[:i], path[i + 1:]
143
144
145def _path_stat(path):

Callers 7

cache_from_sourceFunction · 0.85
source_from_cacheFunction · 0.85
spec_from_file_locationFunction · 0.85
is_packageMethod · 0.85
set_dataMethod · 0.85
is_packageMethod · 0.85
create_moduleMethod · 0.85

Calls 1

rfindMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…