[Python-3000] how about switching to a preprocessor? (Re: A better way to initialize PyTypeObject)

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Dec 3 02:14:16 CET 2006


Fredrik Lundh wrote:

> (some days, I wonder if we shouldn't just include Pyrex and tell every- 
> one to use that for *all* their extension work.  Greg?  how much work 
> would it be to equip Pyrex with a "retargetable" backend?)

If you're talking about making it generate code for languages
that are very different from C, or for implementations other
than CPython, it would require major restructuring. There
isn't currently any such thing as a front and back end,
except in a very conceptual way. Code generation is done
by methods spread all over the parse tree. It would all
have to be rearranged to use a visitor pattern or something.

--
Greg


More information about the Python-3000 mailing list