Closed justinrporter closed 2 years ago
This seems like a good idea. If you could open a PR, I'd be happy to accept (only thing missing is some documentation and a test, AFAIK; but I can also help with that)
Wait is this what return_tuple does? I happened across it when I was adding my decorator to task.py
(where iterate_task
is located).
Yes, I had also forgotten about the existence of return_tuple
, but it does seem to already be there
I think we can close it here as the functionality is present as return_tuple
(although, I would agree that the API is not very consistent in naming)
Agreed!
I have been using a decorator to provide the functionality of
iteratetask
instead of the function.The reason I like this is that it specifies how to handle the output (i.e. how many items in the tuple) closer to the place the output is specified (i.e. at the end of the function) rather than where the workflow is specified (which is usually a different file).
So it looks like:
I've been using the following for a few weeks without incident:
Is this something you'd be interested in adding? Is there any reason I haven't foreseen that this isn't a good idea?