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? -- http://mail.python.org/mailman/listinfo/python-list