python compiler package questions

"Martin v. Löwis" martin at v.loewis.de
Wed Jan 8 15:21:32 CET 2003


Phil Schmidt wrote:
> Does this sound like a practical approach? If not, what would you
> suggest instead?

Please look at various IPC papers presenting approaches similar to the 
one you are suggesting. Those people have started from the byte code, 
though, and generate C code from that.

Whether this approach is practical depends on what you mean to achieve. 
People who wanted to demonstrate that this is possible have succeeded, 
people who wanted to obtain performance improvements by doing so have 
failed.

People who want to use Python in embedded environments have not 
attempted to use this approach. Instead, they have successfully ported 
Python to their target systems, and managed to run a "full" Python on 
those systems. "Full" means that they support all of the Python language 
- the real space savings come from dropping various parts of the 
standard library, and even dropping some builtin types.

> I found that the code parsed ok as shown above - i.e., no error with
> the argument list to afunc - though I think this should produce an
> error. 

Yes, it is likely that the compiler package does not perform the same 
static checks as the builtin compiler. If you can, please find the bugs 
and submit patches to sf.net/projects/python; else please submit bug 
reports.

> So, is this really a bug, or did the parser do the right thing?

If the builtin compiler reports and error and the compiler package does 
not, it's an error - the package is supposed to produce identical 
results to the builtin compiler.

> If it IS a bug, will this be fixed in 2.3? Should I "officially"
> report it?

Please do.

Martin





More information about the Python-list mailing list