[Zope] Checking object's class

Dieter Maurer dieter@handshake.de
Mon, 24 Mar 2003 19:53:54 +0100


Thierry FLORAC wrote at 2003-3-24 09:59 +0100:
 > ...
 >  - is it better to test for "object.meta_type"

Drawback:

  no inheritance check

 > or "isinstance (object, class)" 

Drawback:

  you usually need "object.aq_base".

  It's more expensive than a simple "meta_type" check.


Dieter