MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / py_cmp

Function py_cmp

scripts/test_stringzilla.py:1177–1178  ·  view source on GitHub ↗
(a: str, b: str)

Source from the content-addressed store, hash-verified

1175
1176 # Before testing sorting, validate pairwise comparator consistency
1177 def py_cmp(a: str, b: str) -> int:
1178 return -1 if a < b else (1 if a > b else 0)
1179
1180 def sz_cmp(a: str, b: str) -> int:
1181 sa, sb = Str(a), Str(b)

Callers 1

test_fuzzy_sortingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…