A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2008-October/083019.html below:

[Python-Dev] Transformation with ``parser`` ast

[Python-Dev] Transformation with ``parser`` ast [Python-Dev] Transformation with ``parser`` astBrett Cannon brett at python.org
Mon Oct 13 21:33:40 CEST 2008
This mailing list is for discussing the design of Python, not its use.
The best place to ask your question is comp.lang.python.

-Brett

On Mon, Oct 13, 2008 at 12:15 PM, Malthe Borch <mborch at gmail.com> wrote:
> The ``compiler.ast`` module makes parsing Python source-code and AST
> manipulation relatively painless and it's straight-forward to implement a
> transformer class.
>
> However, I find that the ``compiler.pycodegen`` module imposes a hard limit
> on the length of functions since it calculates jump points in a recursion.
>
> I'm using this module to compile an XML dynamic template into Python code
> (akin to "Mako") and functions may grow to a rather large size.
>
> Now it seems that the ``parser`` module, which parses source code into
> ``parser.st`` trees does not have the same limitations, however, I could not
> find a transformer class compatible with its tree structure.
>
> What's the recommended way of working with the AST tree from the ``parser``
> module?
>
> \malthe
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/brett%40python.org
>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4