About Michele Simionato's "classinitializer" decorator

Michele Simionato michele.simionato at gmail.com
Mon May 26 13:50:23 EDT 2008


On May 26, 7:10 pm, imho <ce... at comeno.it> wrote:
> Hi all.
> I just send this post as a comment to the third part of Michele
> Simionato's article about metaprogramming techniques at:
>
> http://www.ibm.com/developerworks/linux/library/l-pymeta3.html?S_TACT...
>
> I found extremely useful the classinitializer "trick".

I never use it. Too clever. I am waiting for class decorators
in Python 2.6.

> I was thinking
> over the caveat not to call a class initializer after the _metaclass_
> hook (an exception being raised in that case).
> Am I wrong if I state there's a plain solution to this ?

I think your solution is fine. Still, consider waiting for
class decorators ;)

       Michele Simionato




More information about the Python-list mailing list