<div>Hi,</div>
<div>&nbsp;</div>
<div>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. </div>
<div>&nbsp;</div>
<div>I just tried following:</div>
<div>&nbsp;</div>
<div>#####################################################################</div>
<div>
<p>from zope.component import *<br>from zope.interface import *<br>from zope.interface.verify import *</p>
<p>class IA(Interface): pass</p>
<p>class IB(IA): pass</p>
<p>&nbsp;</p>
<p><br>class B(object):<br>&nbsp;&nbsp;&nbsp; implements(IB)</p>
<p><br>verifyClass(IA, B)&nbsp; #returns True<br>verifyClass(IB, B) #returns True<br>verifyClass(Interface, B) #returns True</p>
<p>&nbsp;</p>
<p>class IC(Interface) : pass</p><br>
<div>#####################################################################</div><br>&nbsp;</div>
<div>Its usually a good idea to setup unit tests for testing these kind of things. </div>
<div>&nbsp;</div>
<div>With regards,</div>
<div>- Shailesh</div>
<div>&nbsp;</div>
<div><span class="gmail_quote">On 7/15/08, <b class="gmail_sendername">Tim Cook</b> &lt;<a href="mailto:timothywayne.cook@gmail.com">timothywayne.cook@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">If interface B inherits from interface A and class B implements<br>interface B; do I need to explicitly state that class B provides<br>
interface A?<br><br>Concrete example:<br><br>class IElement(Interface):<br>&nbsp;&nbsp;&nbsp;&nbsp;value = Object(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; schema=IDataValue,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; title=_(u&quot;value&quot;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; description=_(u&quot;&quot;&quot;Data value of this leaf.&quot;&quot;&quot;),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; required=False<br>&nbsp;&nbsp; )<br><br>class IDvText(IDataValue):<br><br>...<br><br><br>class DvText(DataValue):<br><br>....<br><br>implements(IDvText)<br>classProvides(IDvText)<br><br><br>Will Element.value allow instances of DvText or do I need to change the<br>
DvText classProvides call to:<br><br>classProvides(IDataValue,IDvText)<br><br>Thanks,<br>Tim<br><br><br><br><br><br>--<br>Timothy Cook, MSc<br>Health Informatics Research &amp; Development Services<br>LinkedIn Profile:<a href="http://www.linkedin.com/in/timothywaynecook">http://www.linkedin.com/in/timothywaynecook</a><br>
Skype ID == timothy.cook<br>**************************************************************<br>*You may get my Public GPG key from&nbsp;&nbsp;popular keyservers or&nbsp;&nbsp; *<br>*from this link <a href="http://timothywayne.cook.googlepages.com/home*">http://timothywayne.cook.googlepages.com/home*</a><br>
**************************************************************<br><br>_______________________________________________<br>Zope3-users mailing list<br><a href="mailto:Zope3-users@zope.org">Zope3-users@zope.org</a><br><a href="http://mail.zope.org/mailman/listinfo/zope3-users">http://mail.zope.org/mailman/listinfo/zope3-users</a><br>
<br><br></blockquote></div><br>