[Python-ideas] Tweaking closures and lexical scoping to include the function being defined
Nick Coghlan
ncoghlan at gmail.com
Tue Sep 27 21:55:58 CEST 2011
On Tue, Sep 27, 2011 at 3:50 PM, Gisle Aas <gisle at activestate.com> wrote:
> On Sep 27, 2011, at 6:12 , Guido van Rossum wrote:
>
>> "our" is something in Perl, right?
>
> That's right, and "our" is similar to Python's "global". Perl went with "state" as the keyword the concept described in this thread.
>
> state $foo = 1;
I actually like that as a term for the concept (I've certainly used it
in my own descriptions in this very thread), but I shudder to think
how much code would have to change if we made 'state' a keyword :P
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list