[Python-Dev] Lexical scoping in Python 3k
jcarlson at uci.edu
Mon Jul 3 07:15:39 CEST 2006
Greg Ewing <greg.ewing at 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.
> Also I don't buy the argument that something has to
> be useful for big, complicated things in order to be
> worth having in the language.
I never claimed that something needed to be useful for "big, complicated
things" in order to be worth having in the language. To be explicit, if
nontrivial code isn't improved, that doesn't necessarily mean that the
feature is useless. However, if the feature is really only useful for
generally trivial cases *without* the feature, then making them even
more trivial, I think, is a bit of over optimization.
More information about the Python-Dev