Re: problem with closures

2006-12-07 Thread Gerard Brunick
free variables around, and I don't claim to understand the rules. alain wrote: > Hi, > > I have a problem with closures. > I am trying to implement yet another design by contract decorator which > would look like the following: > > def contract(f):

problem with closures

2006-12-06 Thread alain
Hi, I have a problem with closures. I am trying to implement yet another design by contract decorator which would look like the following: def contract(f): def newf(*args, **kw): import new precondition = new.function(f.func_code.co_consts[1