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

Method canonic

Lib/bdb.py:215–230  ·  view source on GitHub ↗

Return canonical form of filename. For real filenames, the canonical form is a case-normalized (on case insensitive filesystems) absolute path. 'Filenames' with angle brackets, such as " ", generated in interactive mode, are returned unchanged.

(self, filename)

Source from the content-addressed store, hash-verified

213 self._load_breaks()
214
215 def canonic(self, filename):
216 """Return canonical form of filename.
217
218 For real filenames, the canonical form is a case-normalized (on
219 case insensitive filesystems) absolute path. 'Filenames' with
220 angle brackets, such as "<stdin>", generated in interactive
221 mode, are returned unchanged.
222 """
223 if filename == "<" + filename[1:-1] + ">":
224 return filename
225 canonic = self.fncache.get(filename)
226 if not canonic:
227 canonic = os.path.abspath(filename)
228 canonic = os.path.normcase(canonic)
229 self.fncache[filename] = canonic
230 return canonic
231
232 def start_trace(self):
233 if self.monitoring_tracer:

Callers 15

break_hereMethod · 0.95
break_anywhereMethod · 0.95
set_breakMethod · 0.95
clear_breakMethod · 0.95
clear_all_file_breaksMethod · 0.95
get_breakMethod · 0.95
get_breaksMethod · 0.95
get_file_breaksMethod · 0.95
format_stack_entryMethod · 0.95
user_lineMethod · 0.80
do_breakMethod · 0.80

Calls 3

normcaseMethod · 0.80
getMethod · 0.45
abspathMethod · 0.45

Tested by 3

lno_abs2relMethod · 0.64
lno_rel2absMethod · 0.64