[Zope3-checkins] CVS: Zope3/src/zope/component - interfaces.py:1.7

Steve Alexander steve@cat-box.net
Mon, 23 Jun 2003 12:52:46 -0400


Update of /cvs-repository/Zope3/src/zope/component
In directory cvs.zope.org:/tmp/cvs-serv10448/src/zope/component

Modified Files:
	interfaces.py 
Log Message:
Added a comment about how factories sometimes need to have the
context passed to them.


=== Zope3/src/zope/component/interfaces.py 1.6 => 1.7 ===
--- Zope3/src/zope/component/interfaces.py:1.6	Sun Jun 22 15:00:29 2003
+++ Zope3/src/zope/component/interfaces.py	Mon Jun 23 12:52:46 2003
@@ -147,7 +147,7 @@
         Get the factory of the given name that is nearest to the
         context.  If a matching factory cannot be found raises
         ComponentLookupError
-        
+
         """
 
     def queryFactory(context, name, default=None):
@@ -156,7 +156,7 @@
         Get the factory of the given name that is nearest to the
         context.  If a matching factory cannot be found then the
         default is returned.
-        
+
         """
 
     def getFactoryInterfaces(context, name):
@@ -273,6 +273,11 @@
 
 class IFactory(Interface):
 
+    # XXX Because __call__ does not receive a context, it is not possible
+    #     to write a factory that does its job in terms of another factory.
+    #     This functionality is needed for making advanced factories that
+    #     do what other factories do, and then mark the resultant object
+    #     with an interface.
     def __call__():
         """Return an instance of the objects we're a factory for."""