[Python-Dev] PEP for Better Control of Nested Lexical Scopes (original) (raw)

Almann T. Goo almann.goo at gmail.com
Tue Feb 21 14:16:08 CET 2006


Jeremy,

I definitely agree that option one is more in line with the semantics in place within Python today.

The names of naming statements are quite hard to get right, I fear. I don't particularly like "use." It's too generic. (I don't particularly like "scope" for option 2, either, for similar reasons. It doesn't indicate what kind of scope issue is being declared.) The most specifc thing I can think of is "free" to indicate that the variable is free in the current scope. It may be too specialized a term to be familiar to most people.

I am not married to any particular keyword for sure--I would be happy for the most part if the language was fixed regardless of the keyword chosen. "free" gives me the sense that I am de-allocating memory (my C background talking), I don't think most people would get the mathematical reference for "free".

I certainly hope that an initiative like this doesn't get stymied by the lack of a good name for such a keyword. Maybe something like "outer"?

I think free == global in the absence of other bindings.

I actually like this, would sort of make "global" obsolete (and thus making the global scope behave like other lexical scopes with regard to to re-binding, which is probably a good thing)

-Almann

-- Almann T. Goo almann.goo at gmail.com



More information about the Python-Dev mailing list