callable virtual method

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Mon Aug 17 14:35:19 CEST 2009


Jean-Michel Pichavant a écrit :
> Scott David Daniels wrote:
(snip)
>> But there _is_ one moment when you can check those things, then avoid
>> checking thereafter: object creation.  So you can complicate your
>> __init__ (or __new__) with those checks that make sure you instantiate
>> only fully defined subclasses:

That's something I'd rather do in a custom metaclass. But YMMV, of course...




More information about the Python-list mailing list