[Python-Dev] __class_init__
Skip Montanaro
skip@pobox.com (Skip Montanaro)
Thu, 15 Nov 2001 13:24:03 +0100
>> [__class_init__]
Tim> [Guido said] ... "The right way" is to define a custom metaclass
Tim> instead (whose __init__ plays the role __class_init__ would have
Tim> played if defined in the class). It makes sense to me, but I'll
Tim> have to play with it to be convinced it's as usable.
For those of us with next to no ExtensionClass experience, I think it would
be helpful to describe what __class_init__ does. I saw it there in the
PyGtk 2.x wrappers before JamesH converted to new-style classes. I had no
idea what it did (and blissfully ignored it) and James apparently didn't
need any similar functionality after the conversion.
Thx,
Skip