:bulb:Spotlight on a new feature:bulb: Because we ...
# announcements
k
💡Spotlight on a new feature💡 Because we were off last Thursday and Friday for the Thanksgiving Holiday here in the U.S., I have two weeks of work to choose from for my spotlight this week. We have found many users that are just starting with Prefect can get confused about deferred computation patterns; in particular, many users would write code like:
Copy code
@task
def return_two_things():
    return 1, 2
with Flow("example") as flow:
    one, two = return_two_things # this raises an error
This would cause an error, because Prefect has no way of knowing how many values your task returns (because it has not been run yet!). @Jim Crist-Harif crafted an elegant solution that allows you to specify the number of return values so that you can continue using familiar Python syntax.
Copy code
@task(nout=2)
def return_two_things():
    return 1, 2
with Flow("example") as flow:
    one, two = return_two_things # this now works!
Thank you to you the community that continues to provide feedback, so that we can continue to add enhancements such as these once we have had the chance to observe and choose the best way to provide a solution. For more details, please see the link here. In addition, this may look more like a 💡spotlight💡on @Jim Crist-Harif but he as just published a new deployment tutorial guide, perfect for anyone getting started or more seasoned users wanting to read about our new flow configuration. The link can be found here.
❤️ 17
🚁 10
🚀 19