[Zope-dev] form variables and **kw

Oliver Bleutgen myzope@gmx.net
Wed, 02 Oct 2002 10:31:31 +0200


Reposting to zope-dev because no answers on the zope list.

Hi all, I have some questions.
Say I have a external method/product method return_vars which I call 
from a form:

def return_vars(self, var=None, **kw):
   return "var: %s, kw: %s" % (var,kw)


Is it correct that any passed form variable besides "var" will get lost, 
i.e. that ZPublisher will _not_ marshall the other variables into the 
method call?

If so, why? Is this a python limitation? I played around with 
co_varnames and python doesn't seem to offer a possibility to recognize 
**kw as something special.

Where does this marshalling happen, in ZPublisher/mapply.py?


TIA,
oliver