Re: Decorator question (how to test if decorated function is in a class)

2009-06-20 Thread Martin P. Hellwig
Bruno Desthuilliers wrote: cut Short answer: this makes no sense. Absolutely right, took me a while to figure that out though :-) Lesson learned (again): If it really seems impossible to do something in Python, it is likely the proposed solution is flawed. -- MPH http://blog.dcuktec.com 'If

Decorator question (how to test if decorated function is in a class)

2009-06-19 Thread Martin P. Hellwig
Hi all, I have been trying out to wrap my mind around the advantages of decorators and thought I found a use in one of my experiments. (see code after my sig). Although it works, I think it should be able to do it better. My particular problem is that I want to remove an argument (say always

Re: Decorator question (how to test if decorated function is in a class)

2009-06-19 Thread Bruno Desthuilliers
Martin P. Hellwig a écrit : Hi all, I have been trying out to wrap my mind around the advantages of decorators and thought I found a use in one of my experiments. (see code after my sig). Although it works, I think it should be able to do it better. My particular problem is that I want to