[New-bugs-announce] [issue2962] Goodbye, 'global' statement!

Chester report at bugs.python.org
Sun May 25 08:54:36 CEST 2008

New submission from Chester <wxpythoner at gmail.com>:

The 'global' statement is used to mark a variable as global. It is
used in functions to allow statements in the function body to rebind
global variables. Using the 'global' statement is generally
considered poor style and should be avoided whenever possible.

count = 1
def inc():
    global count
    count = count + 1

Since the use of the 'global' statement is frowned upon, it should be
removed from Python 3.0.

components: Interpreter Core
messages: 67322
nosy: chester
severity: normal
status: open
title: Goodbye, 'global' statement!
type: feature request
versions: Python 3.0

Tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list