Hi,

On Tue, Dec 13, 2011 at 15:41, Timothy Baldridge <[email protected]> wrote:
> 1) multiline closures (lambdas with more than one statement)
> 2) IfExpr with multiline bodies.

It just shows that you're trying to stuff too much things into
Python's limited expressions.  You need instead to produce complete
statements, with extra temporary variables.  For example: turn code
like "if x then a; b; else c" (random syntax example) into:

   if cond:
       a
       result = b
   else:
       result = c

and then use 'result'.

Yes, indeed, Python is not the best language for generating source or
AST directly for, but it can be done.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to