[Zope] Re: TypeError: loop over non-sequence (Was: Logfiles)

Wolfram Kerber wk@gallileus.de
Thu, 6 Dec 2001 12:19:23 +0100


Well, i think interfaces are a good thing,  it's just that they're not used
very frequently in the current zope version because you usually 'implement'
an interface by subclassing. Those interfaces you found are mainly for
documentation (wich is an important aspect of interfaces nevertheless). This
will all change with zope3 (looking forward to that)...
For now i would suggest defining an interface just for the functionality
that you add over a usual Folder and adding this to __implements__.

so, you can write:

class myFolder(Folder.Folder):
  ...
  __implements__ = Folder.__implements__ + (my_interface,)


Wolfram

----- Original Message -----
From: "Tille, Andreas" <TilleA@rki.de>
Cc: "Zope user list" <zope@zope.org>
Sent: Thursday, December 06, 2001 11:32 AM
Subject: [Zope] Re: TypeError: loop over non-sequence (Was: Logfiles)


> On Thu, 6 Dec 2001, Wolfram Kerber wrote:
>
> > in class MyFolder you should remove the line '__implements__ = Folder'
> Well, this helps!
>
> > or replace 'Folder' with an interface ;-)
> Well it was copied from Zope Developers Guide and I perhaps
missinterpreted
> something because I'm a Python beginner.
>
> Just to understand things right:  Would you suggest using an interface?

> I found some interfaces in
>
>       /usr/lib/zope/lib/python/Products/OFSP/help
>
> Namely Folder.py would perhaps be the right thing to use.  (I thought it
> would be used in my __implements__ statement which was obviousely wrong.)
>
> Kind regards
>
>          Andreas.
>