[Python-3000] Sky pie: a "var" keyword
Nick Coghlan
ncoghlan at gmail.com
Wed Oct 11 10:27:13 CEST 2006
Greg Ewing wrote:
> Nick Coghlan wrote:
>
>> Re-using 'global' wasn't popular because it would actually be *wrong*
>> for the new semantics
>
> All things considered, re-using "global" is
> what I'd be most in favour of at the moment.
>
> I don't agree that it's wrong -- it's perfectly
> legitimate to regard "local" and "global" as
> relative terms, i.e. anything not local to you
> is global from your point of view.
Except that the term currently refers specifically to module globals. Names in
nested scopes are typically referred to as closure variables, not as any
flavour of global.
You *could* try to change the meaning of global as you describe, but I believe
it would be horribly confusing ("wait, do you mean a real module global, or do
you mean a non-local variable?").
Cheers,
Nick.
P.S. In case it wasn't clear, I'm personally fine with 'nonlocal'. The only
objections I've seen to the term are that it's a negative definition (but the
concept itself is a negative one) and the word looks ugly to some folks.
Neither of those objections bothers me overly much :)
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
More information about the Python-3000
mailing list