[Zope] There is no methods or functions to check the attribute of result from ZSQL ?_? Right?

Max M maxm@mxm.dk
Wed, 30 Jan 2002 09:07:00 +0000


> I just hope to solve a easy question. I really couldn't find any 
> method or function in Python Script to check a attribute exist or not.
> I couldn't just simply to ckeck the attribute in Python Script.


There is a hasattr somewhere. But I cannot remember from the top of my 
head how it's called from a Python script.

But one of the following should work ;-)

_.hasattr(obj, 'attr')
context.hasattr(obj, 'attr')
context._.hasattr(obj, 'attr')

regards Max M

Terry wrote: