Add support for absolute/relative imports and if/else expressions:

- regenerate ast.py
 - add future flags for absolute-import and with-statement so they
   (hopefully) properly get set in code-object flags
 - try out if/else expressions in actual code for the hell of it.

Seems to generate the same kind of bytecode as the normal compiler.
This commit is contained in:
Thomas Wouters 2006-03-03 18:16:20 +00:00
parent 7e2ac2533e
commit fa0cf4f3ae
5 changed files with 82 additions and 19 deletions

View file

@ -17,3 +17,5 @@ CO_NESTED = 0x0010
CO_GENERATOR = 0x0020
CO_GENERATOR_ALLOWED = 0x1000
CO_FUTURE_DIVISION = 0x2000
CO_FUTURE_ABSIMPORT = 0x4000
CO_FUTURE_WITH_STATEMENT = 0x8000