[Python-Dev] Meta coding in Python (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Fri Sep 16 01:12:20 CEST 2011
- Previous message: [Python-Dev] Meta coding in Python
- Next message: [Python-Dev] Summary of Python tracker Issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- This kind of suggestion is more appropriately directed to python-ideas
- 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
- Previous message: [Python-Dev] Meta coding in Python
- Next message: [Python-Dev] Summary of Python tracker Issues
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]