ยปCore Development>Code coverage>Lib/compiler/__init__.py

Python code coverage for Lib/compiler/__init__.py

#countcontent
1n/a"""Package for parsing and compiling Python source code
2n/a
3n/aThere are several functions defined at the top level that are imported
4n/afrom modules contained in the package.
5n/a
6n/aparse(buf, mode="exec") -> AST
7n/a Converts a string containing Python source code to an abstract
8n/a syntax tree (AST). The AST is defined in compiler.ast.
9n/a
10n/aparseFile(path) -> AST
11n/a The same as parse(open(path))
12n/a
13n/awalk(ast, visitor, verbose=None)
14n/a Does a pre-order walk over the ast using the visitor instance.
15n/a See compiler.visitor for details.
16n/a
17n/acompile(source, filename, mode, flags=None, dont_inherit=None)
18n/a Returns a code object. A replacement for the builtin compile() function.
19n/a
20n/acompileFile(filename)
21n/a Generates a .pyc file by compiling filename.
222"""
23n/a
242import warnings
25n/a
262warnings.warn("The compiler package is deprecated and removed in Python 3.x.",
272 DeprecationWarning, stacklevel=2)
28n/a
292from compiler.transformer import parse, parseFile
302from compiler.visitor import walk
312from compiler.pycodegen import compile, compileFile