[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module

2009-03-31 Thread Jeremy Hylton
Jeremy Hylton added the comment: Committed revision 70809 (trunk). Needs to be backported. -- nosy: +jhylton resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module

2008-11-27 Thread Gabriel Genellina
Changes by Gabriel Genellina <[EMAIL PROTECTED]>: -- nosy: +gagenellina ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list

[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module

2008-11-13 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: -- nosy: +amaury.forgeotdarc ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-

[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module

2008-11-13 Thread Silas S. Brown
Silas S. Brown <[EMAIL PROTECTED]> added the comment: Sorry, I accidentally posted the workaround code instead of the bug example. This is what I should have posted: setting1 = "val1" setting2 = "val2" def dummy(): global setting1 def f(x): exec(x) return setting1,setting2 print

[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared "global" in another function of the same module

2008-11-13 Thread Silas S. Brown
New submission from Silas S. Brown <[EMAIL PROTECTED]>: Here's the example code: setting1 = "val1" setting2 = "val2" def dummy(): global setting1 def f(x): d ={"setting1":setting1,"setting2":setting2} exec(x) in d return d['setting1'], d['setting2'] print f("setting1=setting2=