[Zope3-checkins] CVS: Zope3/src/zope/interface - interfaces.py:1.4

Jim Fulton jim@zope.com
Wed, 29 Jan 2003 12:03:35 -0500


Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv23457

Modified Files:
	interfaces.py 
Log Message:
Put the type registry interface in sync with current usage and
implementation.


=== Zope3/src/zope/interface/interfaces.py 1.3 => 1.4 ===
--- Zope3/src/zope/interface/interfaces.py:1.3	Mon Dec 30 09:01:21 2002
+++ Zope3/src/zope/interface/interfaces.py	Wed Jan 29 12:03:33 2003
@@ -259,39 +259,23 @@
     a required interface.
     """
 
-    def register(require, object):
-        """Register an object for a required interface.
+    def register(interface, object):
+        """Register an object for an interface.
 
-        The require argument may be None.  This effectively defines a
+        The interface argument may be None.  This effectively defines a
         default object.
-
         """
 
-    def get(implements, default=None):
-        """Return a registered object
-
-        The registered object is one that was registered to require an
-        interface that one of the interfaces in the 'implements'
-        specification argument extends or equals.  An attempt will be
-        made to find the component that most closely matches the input
-        arguments.
-
-        The object returned could have been registred to require None.
-
-        Note that the implements may be None, it which case a
-        component will be returned only if it was registered with a
-        require of None.
-
+    def get(interface, default=None):
+        """Return the object registered for the given interface.
         """
 
-    def getAll(implements=None):
+    def getAll(implements):
         """Get registered objects
 
-        Return all objects registered with a require interfaces such
-        that if the 'implements' argumennt is not None, it is an
-        implementation specification such that some of the interfaces
-        in the specification extend or equal the require interface (or
-        the require interface was None).
+        Return a sequence of all objects registered with interfaces
+        that are extended by or equal to one or more interfaces in the
+        given interface specification.
 
         """