[Python-ideas] Tweaking closures and lexical scoping to include the function being defined
Paul Moore
p.f.moore at gmail.com
Wed Sep 28 17:58:24 CEST 2011
On 28 September 2011 16:38, Guido van Rossum <guido at python.org> wrote:
> Of course once there's different syntax, the nonlocal declaration in
> the function is redundant. And clearly I'm back-peddling. :-)
If we're back to syntax proposals on the def statement, how about
def fn() with i=1, lock=Lock():
whatever
? This is basically another bikeshed to paint, though...
Paul.
More information about the Python-ideas
mailing list