Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I concur.
--
nosy: +rhettinger
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7329
Terry J. Reedy tjre...@udel.edu added the comment:
I once proposed this change, but became less supportive as I can to
appreciate have fewer rather than more special-case rules. With
Gabriel's explanation, I now oppose the idea and think this should be
closed.
--
nosy: +tjreedy
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment:
The compiler doesn't know how the code is going to be used apart from
the mode parameter:
py c=compile(x=1,,exec)
py import dis
py dis.dis(c)
1 0 LOAD_CONST 0 (1)
3 STORE_NAME 0
New submission from Ezio Melotti ezio.melo...@gmail.com:
Python currently accepts global statements at the top level:
global foo
Beside being a meaningless operation, this might lead unexperienced user
to make mistakes like:
foo = 5
global foo # make foo global
def func():
... print foo
Benjamin Peterson benja...@python.org added the comment:
Please bring this up on Python-dev if you'd like to change it. The fact
that there's a test verifying that this can happen suggests there is
some reason.
--
___
Python tracker