MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _calculate_ratio

Function _calculate_ratio

tools/python-3.11.9-amd64/Lib/difflib.py:39–42  ·  view source on GitHub ↗
(matches, length)

Source from the content-addressed store, hash-verified

37Match = _namedtuple('Match', 'a b size')
38
39def _calculate_ratio(matches, length):
40 if length:
41 return 2.0 * matches / length
42 return 1.0
43
44class SequenceMatcher:
45

Callers 3

ratioMethod · 0.85
quick_ratioMethod · 0.85
real_quick_ratioMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected