Hi Roger,

I didn't follow this discussion closely but thought this needed a comment.

Roger Ineichen wrote:

[snip lots of context...]
Did you recognize that the __init__ are different.

A IContentProvider defines:

def __init__(self, context, request, view)
    self.context = context
    self.request = request
    self.view = view

and a IPagelet defines:

def __init__(self, context, request):
    self.context = context
    self.request = request

Probably we should describe this in the interface too.
This whould manifest the difference of content provider
which provide content and pagelets whcih defines content
in a better way.
It would make sense to have the 'view' attribute a part of the IContentProvider interface, and *that* might make them different. The constructor signature is all about the class instead of the instance and should therefore *not* be part of the interface.

It is perfectly reasonable to have a number of different (multi-)adapters with different signatures that adapt to the same interface.

Hope this makes sense.  I'll go back to lurking now.

Regards

 Jacob

--
Jacob Holm
CTO
Improva ApS

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to