> This particular case is easily solved: > > def f_lambda(x,pars): > return lambda x: poly(x,*pars) > > You let the closure take care of pars and return a function that takes > exactly one argument x.
Hi Oscar, This is the opposite of what I am trying to do. In the example, x represents the data and pars represent the parameters I want to determine, so it is the pars which I need passed into the “func_code.co_varnames” part of f. Maybe your suggestion gets me in that direction, but I don’t see how. Thanks, Andre _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor