Spanish Inquisition?!
C.Laurence Gonsalves
clgonsal at keeshah.penguinpowered.com
Sat Sep 4 17:58:14 EDT 1999
On Sat, 04 Sep 1999 18:16:35 GMT, John (Max) Skaller
<skaller at maxtal.com.au> wrote:
> On Fri, 03 Sep 1999 16:54:37 GMT, clgonsal at keeshah.penguinpowered.com
> (C.Laurence Gonsalves) wrote:
>
> >On Fri, 03 Sep 1999 08:48:12 -0400, David Oppenheimer
> >> P.S. Creating compiled code from Python that didn't require the
> >> interpreter to be distributed with it would be high magic indeed.
> >
> >Yeah, especially compiling those eval and exec functions...
>
> Thats no real problem. Any 'compiled' version of python, and Viperc is
> no exception, must have an inbuilt interpreter, and the usual set of
> builtin functions. This is required even without 'exec' and 'eval', in
> case the compiler cannot deduce enough to optimise the code. For
> example:
>
> for i in alist: print i
>
> is hard to optimise, since 'i' could be anything.
Well, you *could* compile it. The compiled code probably wouldn't be
very pretty or efficient, but you *could* do it without actually
embedding a Python interpreter. There's no way you can implement eval
and exec without embedding a Python interpreter though.
--
C. Laurence Gonsalves "Any sufficiently advanced
clgonsal at kami.com technology is indistinguishable
http://www.cryogen.com/clgonsal/ from magic." -- Arthur C. Clarke
More information about the Python-list
mailing list