MCPcopy Index your code
hub / github.com/python/cpython / main

Function main

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

Source from the content-addressed store, hash-verified

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

Calls 2

to_tupleFunction · 0.90
parseMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…