Message367260
Compilation includes the following stages:
1. Tokenizing.
2. Creating CST (concrete syntax tree).
3. Creating AST (abstract syntax tree).
4. Optimizing AST.
5. Building symtable.
6. Generating bytecode.
7. Optimizing bytecode.
ast.parse() only includes stages 1-3. Many warnings and errors can be raised at stages 5 and 6 (for example errors for "break" outside of a loop and "unlocal" at module level). If you want to get all warnings and errors, use compile(). |
|
Date |
User |
Action |
Args |
2020-04-25 06:50:06 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, Anthony Sottile, BTaskaya |
2020-04-25 06:50:06 | serhiy.storchaka | set | messageid: <1587797406.5.0.252010704186.issue40378@roundup.psfhosted.org> |
2020-04-25 06:50:06 | serhiy.storchaka | link | issue40378 messages |
2020-04-25 06:50:06 | serhiy.storchaka | create | |
|