> I'm +1 on `nonlocal` as well, having long been bothered by the absence
> of something like it. Ka-Ping, will you write a PEP? If not, I'll take
> it on.
Since a PEP seems to be on the horizon, I just wanted to give a quick
mention of what eventually became my favorite spelling of this keyword
--
Fredrik Lundh wrote:
> and you don't need to wait for Python 3000 either, of course -- if
> done right, [shared memory] would certainly fit into some future 2.X
> release.
Working on this. Unixoids should be doable nicely; Windows is a bit of a
challenge, but I'm looking to see what's the best I
Fredrik Lundh wrote:
> alright, the first google hit for "nonlocal pep" is a mail from Guido
> where he's "+1/can anyone write a PEP" in response to a mail from
> you:
I'm +1 on `nonlocal` as well, having long been bothered by the absence
of something like it. Ka-Ping, will you write a PEP? If not
Nick Coghlan wrote:
> Re-using 'global' wasn't popular because it would actually be
> *wrong* for the new semantics
On Wed, 11 Oct 2006, Greg Ewing wrote:
> 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 y
Neil Toronto wrote:
> From what I can see, you could object to *every* keyword on the grounds
> that the name is rebound in the innermost lexical scope: nonlocal (it's
> not, it has a local binding), outer (it's really inner), and external
> (nope, it's internal) all have this problem.
The spe
Nick Coghlan wrote:
> Except that the term currently refers specifically to module globals. Names
> in
> nested scopes are typically referred to as closure variables
they're called "free variables" in Python.
"closure" is such a boring name. when did you last see a function that
wasn't "clos
Nick Coghlan wrote:
> 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 o
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
> legiti