[Zope] Checking object's class

Thierry FLORAC thierry.florac@onf.fr
Mon, 24 Mar 2003 09:59:37 +0100


  Hi,

I use custom Zope products written in Python.
In several cases, I have to check for published object's class and adapt 
several front-end parameters according to it.
My questions are simple :
 - is it better to test for "object.meta_type" or "isinstance (object, class)" 
(concerning performances as well as the possibility to create subclasses) ?
 - as long as subclasses are not to be created from ZMI but from another 
backoffice, is it possible to use the same "meta_type" for a class and all 
it's subclasses ?

Thanks,

  Thierry
-- 
  Linux every day, keeps Dr Watson away...
  http://gpc.sourceforge.net -- http://www.ulthar.net