MCPcopy Index your code
hub / github.com/RustPython/RustPython / main

Function main

Lib/test/test_ast/snippets.py:376–388  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

374
375
376def main():
377 if __name__ != '__main__':
378 return
379 if sys.argv[1:] == ['-g']:
380 for statements, kind in ((exec_tests, "exec"), (single_tests, "single"),
381 (eval_tests, "eval")):
382 print(kind+"_results = [")
383 for statement in statements:
384 tree = ast.parse(statement, "?", kind)
385 print("%r," % (to_tuple(tree),))
386 print("]")
387 print("main()")
388 raise SystemExit
389
390#### EVERYTHING BELOW IS GENERATED BY python Lib/test/test_ast/snippets.py -g #####
391exec_results = [

Calls 3

to_tupleFunction · 0.90
printFunction · 0.50
parseMethod · 0.45