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

Function basename

Lib/ntpath.py:254–256  ·  view source on GitHub ↗

Returns the final component of a pathname

(p, /)

Source from the content-addressed store, hash-verified

252# Return the tail (basename) part of a path.
253
254def basename(p, /):
255 """Returns the final component of a pathname"""
256 return split(p)[1]
257
258
259# Return the head (dirname) part of a path.

Callers 4

downloadFunction · 0.90
downloadFunction · 0.90
expanduserFunction · 0.70
getpath.pyFile · 0.50

Calls 1

splitFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…