I've edited my post after seeing your update FYI.
> while in python it must have been defined before chronologically.This was what my example above was meant to demonstrate. The print(a) is fine because a=x has been executed first chronologically, although it was done after lexically (ie, below).
not sure what you mean. Example?
I'm saying it has to match the semantic of the definitionBut definition are different between language aren't they? Like a closure can just be an anonymous function in some languages. Or do you consider that there is one true definition, and incorrect uses? You say that "Scoping rules are different", but you might just consider that the definition of a scope is different between languages. I could then argue that python doesn't have a definition for lexical variables. But I see it's a very poor argument, as you can't say that a language doesn't have a feature simply because the feature has another name :).
But what matters here is the visibility of lexicalsThat makes sense. And IMHO it's an argument for calling our variable lexical aliases rather than just package variables :D.
I still don't think calling python variables lexical is really helpful, especially when comparing it to perl. But I see your points and accept them as valid. I won't discuss much further, or at all, because who cares about python anyway?
In reply to Re^6: Nesting Functions
by Eily
in thread Nesting Functions
by betmatt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |