{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / compilerop / CachingCompiler / ast_parse

function

IPython.core.compilerop:CachingCompiler.ast_parse

source: /dev/ipython/IPython/core/compilerop.py:85

Signature

def ast_parse(self, source: str, filename: str = <unknown>, symbol: str = exec) → ast.AST

Summary

Parse code to an AST with the current compiler flags active.

Extended Summary

Arguments are exactly the same as ast.parse (in the standard library), and are passed to the built-in compile function.

Aliases

  • IPython.core.compilerop.CachingCompiler.ast_parse