[Python-3000] Brainstorming: literal construction hooks

Guido van Rossum guido at python.org
Sat Apr 22 16:04:36 CEST 2006


On 4/22/06, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Michael Urman wrote:
> > There's a lot of holes to this story, including at least how these
> > functions are registered, and which additional arguments (if any) are
> > necessary. Shall we try to fill these holes in?
>
> Answering without checking the source (which is undoubtedly a bad idea), but
> this sounds like something else that could be addressed if it was possible to
> either register an alternate AST compiler for a scope, or else get hold of an
> AST and recompile it. (The former works for modules and functions, the latter
> works only for functions)
>
> Even if it was only a matter of some additional keyword arguments to compile
> and/or exec, it could at least be of benefit for plugin code or an interactive
> interpreter loop.

Hm... Using the AST seems overkill for this (unless you want to do it
without modifying the Python interpreter in any way).

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list