Re: programming by contract using "decorators"

2007-09-03 Thread Michele Simionato
Russ wrote: > Dealing with the arguments was not a trivial matter -- at least not > for me. I had to experiment a bit to get it right. The "getarg" > function is simply a utility for parsing the ordered and keyword > arguments. It's very simple, but if something like this already > exists, please

programming by contract using "decorators"

2007-09-03 Thread Russ
In the thread I started a few days ago, I was told that "programming by contract," could be done with "decorators." I was skeptical that this was a good approach, but as an exercise, I tried to code it up in a reasonably elegant form. I'd like to think I succeeded -- and I must admit that those who