Prefect 2 - Task returns 2 results

Hi friends,
In Prefect 1 there was a argument in the task decorator called “nout”. If my function returns 2 results I could use “nout=2”.
How can do the same thing in Prefect 2?

I am trying to do something like this:

def function_2_returns():

	return datrafame_1, dataframe

def my_super_flow():
    datrafame_1, dataframe_2 = function_2_returns()  # This returns 2 dataframes
1 Like

There is currently no tuple unpacking afaik, but you could solve it by returning a list of objects and accessing those in a downstream task

if this is not suitable for your work, feel free to open a feature request on GitHub, this way, it’s on a backlog