[Python-bugs-list] [Bug #133532] Add warning about undefined "global"

noreply@sourceforge.net noreply@sourceforge.net
Wed, 21 Feb 2001 18:02:03 -0800


Bug #133532, was updated on 2001-Feb-21 18:02
Here is a current snapshot of the bug.

Project: Python
Category: Parser/Compiler
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Submitted by: tim_one
Assigned to : jhylton
Summary: Add warning about undefined "global"

Details: The Ref Man has always said that "global" must not be used in some
contexts, but that this was currently unenforced.  We should warn about
this stuff in 2.1, so we can make it an error in a future release.

Example:

def f():
    g = 1
    global g

def f():
    print g
    global g


For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=133532&group_id=5470