From 3661e75eec96d0f0ba60440436fafa7fd94379b7 Mon Sep 17 00:00:00 2001 From: nocturn9x Date: Wed, 18 Nov 2020 13:09:04 +0100 Subject: [PATCH] Improved coroutines explanation --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a74434..2ede0ee 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,9 @@ The reason for this is that while giambio tries to separate the async and sync w - It creates this weird coroutine object - Passes that object to `await`, which runs the function -So basically that's why you always need to put `await` in front of an async function when calling it. +This is due to the fact that people started writing asynchronous Python code _before_ the `async`/`await` syntax was added, +so many libraries (like asyncio), had to figure out some clever hacks to make it work without native support from the language +itself, taking advantage of generator functions (we'll talk about those later on), and coroutines are heavily based on generators. ## Something actually useful