[Zope3-checkins] CVS: Zope3/src/zope/proxy/interfaces - context.py:1.6

Steve Alexander steve@cat-box.net
Thu, 8 May 2003 10:51:03 -0400


Update of /cvs-repository/Zope3/src/zope/proxy/interfaces
In directory cvs.zope.org:/tmp/cvs-serv18592/src/zope/proxy/interfaces

Modified Files:
	context.py 
Log Message:
Renamed provides to providedby.


=== Zope3/src/zope/proxy/interfaces/context.py 1.5 => 1.6 ===
--- Zope3/src/zope/proxy/interfaces/context.py:1.5	Wed May  7 12:33:36 2003
+++ Zope3/src/zope/proxy/interfaces/context.py	Thu May  8 10:51:02 2003
@@ -134,7 +134,7 @@
     """Interface implemented by callables in 'decorator' module"""
 
     def Decorator(object, context=None, mixinfactory=None,
-                  names=(), provides=None, **data):
+                  names=(), providedby=None, **data):
         """Create and return a new decorator for object.
 
         Decorator is a subtype of Wrapper.
@@ -145,15 +145,16 @@
         'names' is a tuple of names that are dispatched to the mixin rather
         than to the object. The mixin is instantiated from the factory
         before the first dispatch of one of the names.
-        If provides is not None, its value is used as the decorator's
-        __provides__ attribute. This is typically used to make the decorator's
-        apparent interface be a union of the object's and the mixin's.
+        If providedby is not None, its value is used as the decorator's
+        __providedBy__ attribute. This is typically used to make the
+        decorator's apparent interface be a union of the object's and the
+        mixin's.
 
         Wrapper data may be passed as keyword arguments. The data are added
         to the context dictionary.
 
         Note that the arguments object, context, mixinafactory, names,
-        and provides must be given as positional arguments. All keyword
+        and providedby must be given as positional arguments. All keyword
         arguments are taken to be part of **data.
         """
 
@@ -169,19 +170,19 @@
     def getnames(obj):
         """Returns the names."""
 
-    def setprovides(obj, provides):
-        """Sets the __provides__ attribute to the given value.
+    def setprovidedby(obj, providedby):
+        """Sets the __providedBy__ attribute to the given value.
 
-        If the given value is None, remove the provides so that
-        obj.__provides__ will pass through to the decorated object.
+        If the given value is None, remove the providedby so that
+        obj.__providedBy__ will pass through to the decorated object.
         """
 
-    def getprovides(obj):
-        """Returns the 'provides' value of the object.
+    def getprovidedby(obj):
+        """Returns the 'providedby' value of the object.
 
-        Returns None if there is no provides.
+        Returns None if there is no providedby.
         This does not pass through to the decorated object, as
-        obj.__provides__ would.
+        obj.__providedBy__ would.
         """
 
 
@@ -193,7 +194,7 @@
     to the wrapped object.
 
     There is special support for making the decorator instance appear to
-    provide a particular collection of interfaces via its __provides__
+    provide a particular collection of interfaces via its __providedBy__
     attribute.
     """