On Oct 3, 9:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> Ok, but then you have to explicitely decorate every method. To avoid this, > you may use a metaclass; this article by Michael Foord explains > how:http://www.voidspace.org.uk/python/articles/metaclasses.shtml#a-metho... Since Python 2.6 is out, I would recommend using a class decorator for this task. The class decorator is not inherited, so in order to decorate methods in subclasses one has to repeat it, which I see as a feature (explicit is better than implicit). Otherwise the readers of your classes will not have any visual clue that something magic is going on; moreover, you will lower the risk of decorating methods that should not be decorated (I mean, in case of accidents). Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list