2016-12-13 | Paul Boddie | raw annotate files changeset graph | Fixed "reversed operands" string addition, imposing constraints on the operands so that only byte strings can be combined with each other. Added Unicode binary operator support in order to combine Unicode objects with each other and with byte strings. Added an original encoding attribute to Unicode objects. Tested addition of the different kinds of strings. |
1 """Package for parsing and compiling Python source code 2 3 There are several functions defined at the top level that are imported 4 from modules contained in the package. 5 6 parse(buf, mode="exec") -> AST 7 Converts a string containing Python source code to an abstract 8 syntax tree (AST). The AST is defined in compiler.ast. 9 10 parseFile(path) -> AST 11 The same as parse(open(path)) 12 """ 13 14 from compiler.transformer import parse, parseFile