
Sept. 29, 2011
9:36 p.m.
Paul Moore wrote:
On 29 September 2011 14:30, Nick Coghlan <ncoghlan@gmail.com> wrote:
@nonlocal(n=0, lock=threading.Lock()) def global_counter(): with lock: n += 1 return n
The above says to me "the following values are nonlocal to this function",
It still has the problem that the *visibility* is *local*, directly contradicting what the keyword says. -- Greg