MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / run

Function run

02-array-seq/lispy/py3.9/lis.py:192–198  ·  view source on GitHub ↗
(source: str)

Source from the content-addressed store, hash-verified

190################ command-line interface
191
192def run(source: str) -> Any:
193 global_env = Environment({}, standard_env())
194 tokens = tokenize(source)
195 while tokens:
196 exp = read_from_tokens(tokens)
197 result = evaluate(exp, global_env)
198 return result
199
200def main(args: list[str]) -> None:
201 if len(args) == 1:

Callers 5

test_factorialFunction · 0.90
test_closureFunction · 0.90
test_closure_with_changeFunction · 0.90
test_closure_averagerFunction · 0.90
mainFunction · 0.70

Calls 5

EnvironmentClass · 0.70
standard_envFunction · 0.70
tokenizeFunction · 0.70
read_from_tokensFunction · 0.70
evaluateFunction · 0.70

Tested by 4

test_factorialFunction · 0.72
test_closureFunction · 0.72
test_closure_with_changeFunction · 0.72
test_closure_averagerFunction · 0.72