Re: problem with closures
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
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