Problem with Lexical Scope

jslowery at gmail.com jslowery at gmail.com
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
interpreter?




More information about the Python-list mailing list