[Zope] looping through objectValues, how to get methods?

Chris Withers chrisw@nipltd.com
Wed, 19 Jul 2000 16:12:08 +0100


Hi Ed :-)

StarRave marches on I see...

I'm assuming mixing_for is a method?

>                     if hasattr(i, 'mixing_for()'):  #try to get
> mixing_for() method
>                         days_mixing=getattr(i,'mixing_for()')

in which case the above should be:
                     if hasattr(i, 'mixing_for'):
                         days_mixing=i.mixing_for()

cheers,

Chris