Passing parameterized function handle in Python
If you have:
def my_ode(K, tau, y, u):
return K*u/tau - y/tau
you could define something like:
def make_ode_helper(k, tau):
return lambda (y, u): my_ode(K, tau, y, u)
and should be able to initialize MyThing with:
mt = new MyThing(make_ode_helper(k, tau), y0)
then you could call this helper with only y and u parameters:
someresult = ode_helper(y, u)