[Python-ideas] Tweaking closures and lexical scoping to include the function being defined

Ethan Furman ethan at stoneleaf.us
Thu Sep 29 23:53:10 CEST 2011


Greg Ewing wrote:
> Ethan Furman wrote:
>> Nick Coghlan wrote:
>>
>>>     @nonlocal(n=0, lock=threading.Lock())
>>
>> I think this fits in nicely with the @staticmethod and @classmethod 
>> decorator usage as well.
> 
> Maybe @iwastoolazytocreateaclassforthis would be a
> better name? :-)

Nah, it should be @thisisbetterasanalgorythmwithstatethanastinkinoopclass !

~Ethan~




More information about the Python-ideas mailing list