Problem with Lexical Scope

jslowery at jslowery at
Mon Dec 12 09:56:06 CET 2005

That does make sense. So there is no way to modify a variable in an
outer lexical scope? Is the use of a mutable data type the only way?

I'm trying to think of a case that would create semantic ambiguity when
being able to modify a variable reference in an outer scope, but I
cannot (which is probably short-sighted). Is this behavior correct
because of performance or perhaps because of a certain design of the

More information about the Python-list mailing list