"""Generate 10,000 unique examples for the Levenshtein short-circuit tests."""
import argparse
-from functools import cache
+from functools import lru_cache
import json
import os.path
from random import choices, randrange
return _MOVE_COST
-@cache
+@lru_cache(None)
def levenshtein(a, b):
if not a or not b:
return (len(a) + len(b)) * _MOVE_COST
opname_including_specialized[255] = 'DO_TRACING'
used[255] = True
- with (open(outfile, 'w') as fobj, open(internaloutfile, 'w') as iobj):
+ with open(outfile, 'w') as fobj, open(internaloutfile, 'w') as iobj:
fobj.write(header)
iobj.write(internal_header)