Forwarding keyword arguments

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue Jun 23 20:34:23 EDT 2009


En Tue, 23 Jun 2009 20:57:36 -0300, Robert Dailey <rcdailey at gmail.com>  
escribió:

> Suppose I have 2 functions like so:
>
> def Function2( **extra ):
>    # do stuff
>
> def Function1( **extra ):
>    Function2( extra )
>
> As you can see, I would like to forward the additional keyword
> arguments in variable 'extra' to Function2 from Function1. How can I
> do this? I'm using Python 3.0.1

Function2(**extra)
See http://docs.python.org/3.0/reference/expressions.html#calls

-- 
Gabriel Genellina




More information about the Python-list mailing list