
solipsis at pitrou
Nov 15, 2009, 12:23 PM
Post #1 of 1
(461 views)
Permalink
|
|
Re: global statements outside functions/methods should raise SyntaxError
|
|
Benjamin Peterson <benjamin <at> python.org> writes: > > 2009/11/15 Michael Foord <fuzzyman <at> voidspace.org.uk>: > > Well, personally I think it would be a good thing if this raised an > > exception during bytecode compilation - but it would fall under the > > moratorium and have to wait a few years. > > It could probably be considered a bug, though, since the global > statement in that case silently has absolutely no effect. Indeed, and it's not like other implementations would be at a disadvantage if they didn't implement this error. Warning that the construct is meaningless can be helpful, especially for refugees from other languages. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev [at] python http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com
|