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

Robert Rottermann robert@redcor.ch
Wed, 10 Oct 2001 14:05:37 +0200


Thanks Chris,
it seams to work also in the most primitive form:
  objectList = f.objectValues()
  for o in objectList:
    if (o.isFolderish()):
      print o.getId() , ' is folderish'
    else:
      ....

----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>
To: "Andrew Kenneth Milton" <akm@theinternet.com.au>
Cc: "Robert Rottermann" <robert@redcor.ch>; <zope@zope.org>
Sent: Wednesday, October 10, 2001 12:39 PM
Subject: Re: [Zope] how can I ask an object whether it is folderish?


> Andrew Kenneth Milton wrote:
> >
> > if hasattr(object, isPrincipiaFolderish) and
object.isPrincipiaFolderish:
> >     print "object is Folderish."
>
> ...or, more neatly:
>
> if getattr(object,'isPrincipiaFolderish',None):
>    print "I'm folderish"
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>