Plugin system

Dan Perl danperl at rogers.com
Sun Oct 31 14:54:00 EST 2004


I didn't know about issubclass.  Thanks.

Dan

<exarkun at divmod.com> wrote in message 
news:mailman.5738.1099251404.5135.python-list at python.org...
> On Sun, 31 Oct 2004 13:56:10 -0500, "Dan Perl" <danperl at rogers.com> wrote:
>>
>> [snip]
>>
>> I forgot what I'm doing in my own code.  I looked at it again and found 
>> that
>> I'm not using isinstance(), instead I am doing a check for
>> "baseClass.Handler in hndlrCls.__bases__", which is much better, because 
>> it
>> doesn't need the creation of an instance.  Here is the actual code (my
>> handlers are the equivalent of your plugins):
>
>  I wouldn't go as far as to say it is "much better".  Using issubclass() 
> might be, though.
>
>  Jp 





More information about the Python-list mailing list