[Python-Dev] Re: [Python-checkins] python/nondist/peps pep-0318.txt, 1.25, 1.26

Phillip J. Eby pje at telecommunity.com
Tue Aug 24 23:02:43 CEST 2004


At 04:58 PM 8/24/04 -0400, Neil Schemenauer wrote:
>On Tue, Aug 24, 2004 at 02:59:33PM -0500, Skip Montanaro wrote:
> > Couldn't you do something like this?
> >
> >     @ast_to_func
> >     @neils_cool_ast_transform
> >     @func_to_ast
> >     def f(a):
> >         pass
>
>That doesn't work as there is, AFAIK, no way to write func_to_ast().

There is one, but it's ugly and involves inspect.get_source.  :)



More information about the Python-Dev mailing list