This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Patch for bug 999042.
Type: Stage:
Components: Interpreter Core Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: nascheme Nosy List: dsuch, loewis, nascheme
Priority: normal Keywords: patch

Created on 2004-12-23 18:07 by dsuch, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pycodegen.patch dsuch, 2004-12-23 18:08 Patch to make compiler module handle global statement correctly.
Messages (2)
msg47404 - (view) Author: Dariusz Suchojad (dsuch) Date: 2004-12-23 18:07
Hello, I believe this one-line patch fixes [999042]
"Compiler module doesn't handle global statement
correctly" bug.  Without setting the 'optimized' flag
compiler.pycodegen.CodeGenerator._nameOp always emits
STORE_NAME and not STORE_GLOBAL opcode. After applying
test_compiler passes fine.
msg47405 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-12-11 04:48
This patch is wrong. STORE_GLOBAL ought to be used even if optimization is turned off; faking it to be True may have undesirable side effects.

The builtin compiler solves this problem by putting the GLOBAL_EXPLICIT scope to a name. The compiler package should do the same.

Rejecting this patch.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41364
2004-12-23 18:07:56dsuchcreate