Compiler C or Python?

Jørgen Hermanrud Fjeld jhf at hex.no
Tue Sep 2 16:45:30 EDT 2003


On Tue, Sep 02, 2003 at 11:37:03AM +0000, Michael Hudson wrote:
> jhf at hex.no (Jørgen Hermanrud Fjeld) writes:
> > And in general, if should want to alter the Python compiler, should
> > I start with the Python or C version?
> 
> Whichever's easiest :-)  This is usually the Python one.
>
Then I shall start with that one. Are there any other arguments/reasons to
choose one or the other? That is technicalities one should consider.

> A toy that might come in handy is an interactive mode (based on
> code.InteractiveConsole) that compiles input with the customized
> compiler.
Thanks, this can make the task at hand a lot easier.

> > As far as I can see from your email the Python version is easier to
> > modify, but why two compilers? Isn't that a lot to maintain?
> 
> The Lib/compiler/ package is pretty slow.  Also, making that the only
> compiler might lead to irritating bootstrapping problems (which I now
> see Jeff talked about...).
Yes, but the code it generates will be fast enough for my purposes.
Do you happen to know how consistency between the compilers is maintained?

Sincerely
Jørgen





More information about the Python-list mailing list