Yelp / ezio

Experimental Python template compiler targeting C++
Other
8 stars 3 forks source link

support python 2.5 #5

Open slingamn opened 13 years ago

slingamn commented 13 years ago

The ast module is unavailable, but _ast has all the internal AST classes. We should create an ast_compat module that has all the necessary names.

ast.compile is compile(flags=_ast.PyCF_ONLY_AST).

Apart from that it's just removing superfluous 2.6-isms, and adding future imports.

slingamn commented 13 years ago

er:

def parse(code):
    compile(code, "<string>", 'exec', _ast.PyCF_ONLY_AST)