4 ms·
I believe you just pass objects instead, like you would in OOP, and take the hit of pickling and unpickling them every time. If you really want to pass lambdas
by xmcqdpt2 3y ago
I believe you just pass objects instead, like you would in OOP, and take the hit of pickling and unpickling them every time.
If you really want to pass lambdas, you can use a third party library to pickle them
https://github.com/cloudpipe/cloudpickle https://github.com/cloudpipe/cloudpickle
Yes, this is not great.