[Zope] how can I ask an object whether it is folderish?

Oliver Bleutgen Oliver Bleutgen <myzope@gmx.net>
Wed, 10 Oct 2001 12:52:07 +0200

> I'm pretty sure getattr will trigger the Acquisition machinery, I don't
> know
> if hasattr does. Might be better to unwrap the object first before
> checking.

heh, opportunity to spout out my deep zope knowledge ;-)

hasattr(object, string)
    The arguments are an object and a string. The result is 1 if the string 
    is the name of one of the object's attributes, 0 if not. 
    (This is implemented by calling getattr(object, name) and seeing whether 
    it raises an exception or not.)

(leeched from the ZMI online help)