[Python-ideas] AST Transformation Hooks for Domain Specific Languages

Michael Foord fuzzyman at gmail.com
Fri Apr 8 15:09:37 CEST 2011


On 8 April 2011 13:58, Nick Coghlan <ncoghlan at gmail.com> wrote:

> On Fri, Apr 8, 2011 at 9:32 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> >  get_cookie() - Magic cookie to add to PYC files containing instances
> > of the DSL (allows recompilation to be forced if the DSL is updated)
>
> An alternative might be to require that the cookie be provided when
> the DSL is registered. That would make cookie validity checking
> faster. That kind of implementation detail is in the noise though,
> compared to the possible implications of the overall idea.
>
>
You *really* ought to implement this as an extension module and an import
hook so that we can try it out. :-)

All the best,

Michael Foord


> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
>



-- 

http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20110408/8122a3e4/attachment.html>


More information about the Python-ideas mailing list