On 7/3/06, Josiah Carlson <jcarlson@uci.edu> wrote:
Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
Josiah Carlson wrote:
If the only code that benefits from such changes are "very *simple*", then I think that says something about its necessity.
The point is that they're only "very simple" if you can write them using access to an outer scope. Without that ability, they become less simple, less efficient, more convoluted, harder to follow, etc.
As is known and has been stated, assigning to a parent scope can be emulated in various ways, either through an explicit namespace object, or through a namespace list.
And the fact that this desire and need remains, even amongst people who should know better, suggests that it may be worth supporting it more directly, as the current work-arounds ain't pretty. -- --Guido van Rossum (home page: http://www.python.org/~guido/)