[Zope3-dev] Chapter 1 Step 6 now available
Steve Alexander
s.alexander@lancaster.ac.uk
Thu, 21 Feb 2002 10:00:42 +0000 (GMT)
On Wed, 20 Feb 2002, Martijn Faassen wrote:
> Steve Alexander wrote:
> [snip]
> > That very accurately describes what my Decorator class does. The
> > interface it declares, via __implements__, is exactly the same as the
> > component it is decorating. However, it adds certain operations that
> > views can use *if* they know about them.
>
> Isn't that scary?
yes :-)
> I mean, if I understand it well, a decorated object
> supplies extra interfaces, but there's no way to find out by
> checking __implements__ or using the introspection tools of the
> interfaces package, right? You just have to 'know' about this, and
> that could be troublesome -- it's why we want interfaces in the first
> place.
>
> Or am I missing something?
No. You're quite right, and this is something I want to add to
Decorator.py in the future. However, for my current purposes, the
Decorator is only used within a single View component, so the interfaces
don't matter -- no other components get to see them.