[Zope] looping through objectValues, how to get methods?
Jerome Alet
alet@unice.fr
Wed, 19 Jul 2000 17:09:47 +0200 (MET DST)
On Wed, 19 Jul 2000, ed colmar wrote:
> I have a method that looks through "objectValues". Using "hasattr" and
> "getattr" I can see the variables contained in the object.
>
> How do I get the values generated from an object's method in a similar
> fashion?
>
> For example:
> if hasattr(i, 'djname'): #get djname variable
> if hasattr(i, 'mixing_for()'): #try to get
> mixing_for() method
did you try removing the parenthesis, like:
if hasattr(i, 'mixing_for')
good luck
Jerome ALET - alet@unice.fr - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 37 76 30
28 Avenue de Valombrose - 06107 NICE Cedex 2 - FRANCE