Hi
Does anybody know how to pass multiple arguments to the function
tested in timeit.timer() in
python?
I googled and found how to pass one argument:
x=10000
mytime = timeit.Timer( setup="from Createlst import createlst", stmt=
"createlst(%s)" %(x) )
But how can I extend it to two or more arguments?
Like this:
p1=createlst.cr eatelst(10000)
p2=createlst.cr eatelst(10000)
mytime = timeit.Timer(se tup="from list_concat_cop y import list_concat_cop y",
stmt="list_conc at_copy.list_co ncat_copy(%x,%y )"%p1,p2 )
I don't know how to end the timeit.Timer. Should it be (%x,%y)"%p1,p2 or
(%x,%y)"%p1,%p2 or (%x,%y)"(%p1%p2 ) .
I tried and none worked. I just got error message like global variable "A'
not defined.
Can anybody help?
Thanks!