Re: aufwärts suchen bis * gefunden

Raphael Ritz <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
On 2/25/11 7:50 PM, Michael Graf wrote:
> Danke, das hat geholfen - ich habs jetzt so, und es funktioniert. Ob es auch gut ist - keine Ahnung
>
>      def getParentProgramme(self):
>          """Returns the upper Programme.
>          """
>          context = self.context
>          stopType = ['Programme']

schaut mir alles soweit OK aus nur die folgende Zeile verstehe ich nicht.
Die brauchst Du doch gar nicht.

Raphael

>          portal_type = getattr(aq_base(context), 'portal_type', None)
>          for obj in self.aq_chain:
>              if hasattr(obj, 'portal_type') and obj.portal_type in stopType:
>                  return obj
>          return None
>
> Danke fürs drüberschauen und kommentieren :-)
>
> lg und schönes Wochenende
> michi
>
>



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.