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

Function _substitution_cost

Lib/traceback.py:1653–1658  ·  view source on GitHub ↗
(ch_a, ch_b)

Source from the content-addressed store, hash-verified

1651
1652
1653def _substitution_cost(ch_a, ch_b):
1654 if ch_a == ch_b:
1655 return 0
1656 if ch_a.lower() == ch_b.lower():
1657 return _CASE_COST
1658 return _MOVE_COST
1659
1660
1661def _is_lazy_import(obj, attr_name):

Callers 1

_levenshtein_distanceFunction · 0.85

Calls 1

lowerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…