Home → Advanced → Async
Reading
0%

📋 Table of Contents

  1. Coroutines
  2. Return Value: async def

1 · Coroutines

📖
Textbook Definition

"Coroutines are a more generalized form of subroutines. Subroutines are entered at one point and exited at another point. Coroutines can be entered, exited, and resumed at many different points." — Python Docs

2 · Return Value: async def

🔁 Return Value

Calling an async def function does not execute it. It returns a coroutine object. To actually run the code, the coroutine must be scheduled on an event loop (e.g., via await or asyncio.run()).

📚 See Also