On Sat, Feb 4, 2012 at 9:19 PM, Antti J Ylikoski <antti.yliko...@tkk.fi> wrote: >> I'm not sure how naughty this is, but the same thing can be done without >> using >> nonlocal by storing the local state as an attribute of the enclosed >> function >> object: >> >> ... > > Yes, I do know that, but then it would not be a closure :-)))))))))
Sure it is. Where do you think it looks up the function object? Cheers, Ian -- http://mail.python.org/mailman/listinfo/python-list