[Python-Dev] __class_init__

Tim Peters tim.one@home.com
Thu, 15 Nov 2001 01:45:39 -0500


[Tim]
> I haven't had time to look into it yet, but it's definitely on my
> agenda.  Why don't you want it [__class_init__] anymore?

[Thomas Heller]
> Two reasons:
>
> - It seems I can also achieve what I want with attribute descriptors
> - I have no idea how it would be implemented.
>
> OTOH, it would definitely be nice to have...

I pinged Guido about this (he'll fire me if I ever do that again <wink>),
and he's really not keen on it.  "The right way" is to define a custom
metaclass instead (whose __init__ plays the role __class_init__ would have
played if defined in the class).  It makes sense to me, but I'll have to
play with it to be convinced it's as usable.