[Python-Dev] global variable modification in functions [Re: elimination of scope bleeding of iteration variables]

Guido van Rossum guido at python.org
Mon May 1 16:32:40 CEST 2006


On 4/30/06, Ben Wing <ben at 666.com> wrote:
> [1] ideally, change this behavior, either for 2.6 or 3.0.  maybe have a
> `local' keyword if you really want a new scope.
> [2] until this change, python should always print a warning in this
> situation.
> [3] the current 'UnboundLocal' exception should probably be more
> helpful, e.g. suggesting that you might need to use a `global foo'
> declaration.

You're joking right?

--
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list