[IronPython] Exec Question

Tibor Berkovits t.berkovits at worldnet.att.net
Wed Dec 14 19:38:48 CET 2005


The following python code snippet

glob = {}
loc = {}
exec "a=12" in glob, loc

behaves differently under IP 0.9.5 vs. IP 0.9.6 with respect to
which dictionary the definition of 'a' is inserted into. In IP095
it goes to loc, while in IP096 it goes to glob. 

Can someone please explain which one is the "correct" behavior ? 

Regards,
TB



More information about the Ironpython-users mailing list