The signature of `micropython.schedule()` is `(func, arg)`, i.e. it takes the callback function and a single argument.
Is there a technical reason why only a single argument is supported?
I have a case where I'd like to pass multiple arguments. I resorted to grouping all the arguments into a tuple. That works but feels somewhat inelegant...
Code: Select all
micropython.schedule(func, (arg1, arg2, arg3))
def func(args):
arg1, arg2, arg3 = args
...
Julien