A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-September/113607.html below:

[Python-Dev] Meta coding in Python

[Python-Dev] Meta coding in Python [Python-Dev] Meta coding in PythonNick Coghlan ncoghlan at gmail.com
Fri Sep 16 01:12:20 CEST 2011
On Fri, Sep 16, 2011 at 8:44 AM, Albert Zeyer <albzey at googlemail.com> wrote:
> Hi list,
>
> I thought it would be nice in Python to allow some sort of meta coding
> (which goes far ahead of simple function descriptors).
>
> The most straight forward way would be to allow operations on the AST.

1. This kind of suggestion is more appropriately directed to python-ideas
2. We already support this, look at the ast module and in particular
the ast.PyCF_ONLY_AST flag to the compile() builtin function. For an
example of advanced usage, look at the py.test module and it's
meta-importer that rewrites assert statements

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
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