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

Steve Alexander steve@cat-box.net
Wed, 7 May 2003 12:33:36 -0400


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

Modified Files:
	context.py 
Log Message:
SteveA + MariusG

Added comment explaining how the function signature for Wrapper given
in the interface is informative but not accurate.


=== Zope3/src/zope/proxy/interfaces/context.py 1.4 => 1.5 ===
--- Zope3/src/zope/proxy/interfaces/context.py:1.4	Wed May  7 05:33:00 2003
+++ Zope3/src/zope/proxy/interfaces/context.py	Wed May  7 12:33:36 2003
@@ -29,6 +29,15 @@
 
         Wrapper data may be passed as keyword arguments. The data are
         added to the context dictionary.
+
+        Note that the object and context must be passed as positional
+        arguments. All keyword arguments, even those called 'object' and
+        'context' are taken as part of data.
+        A less informative but more accurate function signature would be
+
+          def Wrapper(*args, **data):
+
+        Where args is either (object,) or (object, context).
         """
 
     def getobject(obj):
@@ -142,6 +151,10 @@
 
         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
+        arguments are taken to be part of **data.
         """
 
     def getmixin(obj):