I'm in the process of writing C code for the purposes of traversing AST
nodes in the AST optimization branch.
This seems to be an ideal case for code generation based on the ASDL
representation of the AST as we're currently doing for Python-ast.[ch].
I'm already considering this approach for s
2008/5/2 Georg Brandl <[EMAIL PROTECTED]>:
> Paul Moore schrieb:
> > Excuse my confusion over process, but if this is to go into 2.6, does
> > that mean it needs to be ready before the first beta? Or is there a
> > more relaxed schedule for the stdlib (and if so, what is the deadline
> > for the st
Paul Moore schrieb:
2008/5/1 Georg Brandl <[EMAIL PROTECTED]>:
Armin Ronacher schrieb:
> I would like to propose a new module for the stdlib for Python 2.6
> and higher: "ast".
If there are no further objections, I'll add this to PEP 361 so that the
proposal doesn't get lost.
Excuse my con
2008/5/1 Georg Brandl <[EMAIL PROTECTED]>:
> Armin Ronacher schrieb:
> > I would like to propose a new module for the stdlib for Python 2.6
> > and higher: "ast".
>
> If there are no further objections, I'll add this to PEP 361 so that the
> proposal doesn't get lost.
Excuse my confusion over p
Armin Ronacher schrieb:
Hi all,
I would like to propose a new module for the stdlib for Python 2.6
and higher: "ast". The motivation for this module is the pending
deprecation for compiler.ast which is widely used (debugging,
template engines, code coverage etc.). _ast is a very solid module
Just a thought, but it would be great if this could be implemented over
the top of a C layer that operates on real AST nodes (rather than the
PyObject representation of those nodes). I'm working on stuff to perform
code optimization at the AST level (see the tlee-ast-optimize branch),
and the f
> An example module for the NodeVisitor is in the repository which
> converts a Python AST back into Python source code:
>
> http://dev.pocoo.org/hg/sandbox/file/tip/ast/codegen.py
And another example for the same functionality is in Demo/parser/unparse.py.
Regards,
Martin
Hi all,
I would like to propose a new module for the stdlib for Python 2.6
and higher: "ast". The motivation for this module is the pending
deprecation for compiler.ast which is widely used (debugging,
template engines, code coverage etc.). _ast is a very solid module
and is without a doubt eas