Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/RustPython/RustPython
/ _calculate_ratio
Function
_calculate_ratio
Lib/difflib.py:39–42 ·
view source on GitHub ↗
(matches, length)
Source
from the content-addressed store, hash-verified
37
Match = _namedtuple(
'Match'
,
'a b size'
)
38
39
def
_calculate_ratio(matches, length):
40
if
length:
41
return
2.0 * matches / length
42
return
1.0
43
44
class
SequenceMatcher:
45
Callers
3
ratio
Method · 0.85
quick_ratio
Method · 0.85
real_quick_ratio
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected