[mod_python] parameters

Graham Dumpleton grahamd at dscpl.com.au
Wed Aug 3 18:04:16 EDT 2005


A clarification.

If we are talking about this in the context of mod_python, the
ability to have form arguments automatically translated to
function parameters only works when mod_python.publisher is
used. Further, only "kwargs" is applicable as there isn't any
way in mod_python.publisher that form arguments can be mapped
to an "args" parameter as shown.

Graham

On 04/08/2005, at 6:30 AM, Chris Jackson wrote:

> def myFunc(arg, *args, **kwargs):
> ...
>
> -- arg is one argument
> -- *args accept any number of excess positional arguments
> -- **kwargs accepts any excess keyword-bound arguments stored as a 
> dictionary
>
> I hope this helps.
>
> ~= Chris =~
>
> On 8/3/05, Khormaee, Cy <cy.khormaee at hp.com> wrote:
>> Hey all,
>>
>> I was curious if there is a way to create a parameter which will 
>> accept an arbitrary number of keyword arguments in python.
>>
>> Currently, im trying to make a procedure to accept output from a form 
>> which has a variable number of submission fields.  The HTML form only 
>> outputs keyword arguments (as far as I know) so i cant use an 
>> arbitary argument list.
>>
>> Any help would be greatly appreciated.
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list