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

Function _modname

Lib/trace.py:117–122  ·  view source on GitHub ↗

Return a plausible module name for the path.

(path)

Source from the content-addressed store, hash-verified

115 return 0
116
117def _modname(path):
118 """Return a plausible module name for the path."""
119
120 base = os.path.basename(path)
121 filename, ext = os.path.splitext(base)
122 return filename
123
124def _fullmodname(path):
125 """Return a plausible module name for the path."""

Callers 3

write_resultsMethod · 0.85
globaltrace_ltMethod · 0.85

Calls 2

splitextMethod · 0.80
basenameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…