Re: Some python comments/questions

Guido.van.Rossum@cwi.nl
Wed, 13 Oct 1993 21:34:13 +0100

Lance Ellinghouse:
> PLEASE DON'T!!!!! I have a bunch of code that relies on passing in
> explicit local and global dictionaries!!

and Jon Eisberg:
> I am developing a data analysis application using python as the interface
> and user programming language. Your proposed change in exec would seem to
> break it.

Sorry folks, that's not what I meant to say! Your functionality will
of course still be supported. Here's my proposed syntax again:

exec <expression> [in <expression> [, <expression>]]

The optional "in ..." part would be used to pass the global/local
dictionary as with the current exec() function (and using this
feature would mean the compiler did not have to stop optimizing
locals). My remark that the change would "break" existing code was
meant to apply at the syntactic level -- you will have to change all
your lines that currently read

exec(a, b, c)

into

exec a in b, c

(and I will even make a script that does this painlessly, just as for
other incompatible syntax changes in the past).

Sorry about the confusion,

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>