[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/interface/interfaces.py Add interface documentation for

Philipp von Weitershausen philikon at philikon.de
Sun Mar 19 12:07:29 EST 2006


Log message for revision 66075:
  Add interface documentation for
  * alsoProvides which was added in the last release or so
  * noLongerProvides which was added by Tres and myself at PyCON
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/interface/interfaces.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/interface/interfaces.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/interface/interfaces.py	2006-03-19 17:00:46 UTC (rev 66074)
+++ Zope3/branches/jim-adapter/src/zope/interface/interfaces.py	2006-03-19 17:07:29 UTC (rev 66075)
@@ -483,6 +483,31 @@
         adds I2 to the interfaces directly provided by ob.
         """
 
+    def alsoProvides(object, *interfaces):
+        """Declare additional interfaces directly for an object::
+
+          alsoProvides(ob, I1)
+
+        is equivalent to::
+
+          directivelyProvides(ob, directlyProvidedBy(ob), I1)
+        """
+
+    def noLongerProvides(object, interface):
+        """Remove an interface from the list of an object's directly
+        provided interfaces::
+
+          noLongerProivdes(ob, I1)
+
+        is equivalent to::
+
+          directlyProvides(ob, directlyProvidedBy(ob)-I1)
+
+        with the exception that if ``I1`` is an interface that is
+        provided by ``ob`` through the class's implementation,
+        ValueError is raised.
+        """
+
     def implements(*interfaces):
         """Declare interfaces implemented by instances of a class
 



More information about the Zope3-Checkins mailing list