alexandre kempf
12/04/2019, 4:13 PM@task
def return_2_values(x, y):
return x, y
with Flow("lolilol") as flow:
a, b = return_2_values(x=2, y=4)
But I can't because task are not iterable 😕
The only trick I found is to use a dictionary inside my task and then use GetItem. Unfortunaly, with this method, I need to know that is inside "return_values" at the level of the Flow in order to get the correct keys. Is there a way to do it without prior information on the task ? Like a normal python function 🙂nicholas
12/04/2019, 4:24 PMjosh
12/04/2019, 4:25 PM@task
def a():
return 1, 2
with Flow('test') as flow:
res = a()
other_task(res[0])
other_task(res[1])
alexandre kempf
12/04/2019, 4:25 PMjosh
12/04/2019, 4:28 PMnicholas
12/04/2019, 4:28 PM