Bugs item #999042, was opened at 2004-07-27 15:15 Message generated for change (Comment added) made by nnorwitz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=999042&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: Jim Fulton (dcjim) >Assigned to: Jeremy Hylton (jhylton) Summary: Compiler module doesn't handle global statement correctly Initial Comment: If we don't use the compiler module: >>> code = 'global x\nx=1' >>> d1={'__builtins__': {}}; d2={}; exec code in d1, d2 >>> d1, d2 ({'__builtins__': {}, 'x': 1}, {}) with the compiler module: >>> code = compiler.compile('global x\nx=1', 'd', 'exec') >>> d1={'__builtins__': {}}; d2={}; exec code in d1, d2 >>> d1, d2 ({'__builtins__': {}}, {'x': 1}) global is ignored ---------------------------------------------------------------------- >Comment By: Neal Norwitz (nnorwitz) Date: 2006-02-25 14:01 Message: Logged In: YES user_id=33168 FYI ---------------------------------------------------------------------- Comment By: Darek Suchojad (dsuch) Date: 2005-04-29 15:04 Message: Logged In: YES user_id=954779 Hi, I have submitted a simple fix some time ago python.org/sf/1090482, do you think it is correct? ---------------------------------------------------------------------- Comment By: Jim Fulton (dcjim) Date: 2004-07-28 07:01 Message: Logged In: YES user_id=73023 Also in 2.3 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=999042&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com