variable function call

Michael Hudson mwh at python.net
Thu Nov 8 17:15:58 CET 2001


Uwe Schmitt <uwe at rocksport.de> writes:

> Hi,
> 
> I'd like to write a wrapper-function which takes a function and a
> variable parameter-list like this:
> 
> 
>     def wrapper(fun, *args):
> 
> 	... do some checks ...
> 
> 	fun(args)
        fun(*args)

HTH.  Python 2 or better (or was it 1.6?).

Cheers,
M.

-- 
  If you have too much free time and can't think of a better way to
  spend it than reading Slashdot, you need a hobby, a job, or both.
     -- http://www.cs.washington.edu/homes/klee/misc/slashdot.html#faq



More information about the Python-list mailing list