Hi,

I believe not. In any case, implements, provides and such things are more
like indications of what is being supported by a class and they are not
enforced by runtime strictly.

I just tried following:

#####################################################################

from zope.component import *
from zope.interface import *
from zope.interface.verify import *

class IA(Interface): pass

class IB(IA): pass




class B(object):
    implements(IB)


verifyClass(IA, B)  #returns True
verifyClass(IB, B) #returns True
verifyClass(Interface, B) #returns True



class IC(Interface) : pass

#####################################################################


Its usually a good idea to setup unit tests for testing these kind of
things.

With regards,
- Shailesh

On 7/15/08, Tim Cook <[EMAIL PROTECTED]> wrote:
>
> If interface B inherits from interface A and class B implements
> interface B; do I need to explicitly state that class B provides
> interface A?
>
> Concrete example:
>
> class IElement(Interface):
>     value = Object(
>        schema=IDataValue,
>        title=_(u"value"),
>        description=_(u"""Data value of this leaf."""),
>        required=False
>    )
>
> class IDvText(IDataValue):
>
> ...
>
>
> class DvText(DataValue):
>
> ....
>
> implements(IDvText)
> classProvides(IDvText)
>
>
> Will Element.value allow instances of DvText or do I need to change the
> DvText classProvides call to:
>
> classProvides(IDataValue,IDvText)
>
> Thanks,
> Tim
>
>
>
>
>
> --
> Timothy Cook, MSc
> Health Informatics Research & Development Services
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> Skype ID == timothy.cook
> **************************************************************
> *You may get my Public GPG key from  popular keyservers or   *
> *from this link http://timothywayne.cook.googlepages.com/home*
> **************************************************************
>
> _______________________________________________
> Zope3-users mailing list
> Zope3-users@zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users
>
>
>
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to