On Thursday 26 May 2005 03:31, Leeuw van der, Tim wrote:
> In java-terms you'd say that one interface *extends* another interface,
> rather than implements. But I guess this wording is because Python doesn't
> have interfaces, and therefore in your class-definition you might not see
> the difference?

I don't think *extends* is correct. An example:

class I1(Interface):
  pass

class I2(I1):
  pass

In the case above ``I2`` extends ``I1``. ``I2`` inherits all fields and method 
declarations from ``I1``.

But providing is different, since it does:

class I1(IInterface):
  pass

class I2(Interface):
  pass

directlyProvides(I2, I1)

Here ``I1`` is provided by ``I2``, in other words ``I2`` must provide all the 
methods and fields described in ``I1``. Also note that ``I1`` extends 
``IInterface`` and not ``Interface``!

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to