@@ -52,7 +52,7 @@ This process repeats indefinitely.
5252Even if the queue is empty, the event loop continues to cycle (somewhat
5353aimlessly).
5454
55- Effective execution relies on tasks sharing well; a greedy job could hog
55+ Effective execution relies on tasks sharing well and cooperating ; a greedy job could hog
5656control and leave the other tasks to starve, rendering the overall event loop
5757approach rather useless.
5858
@@ -96,7 +96,8 @@ Calling it creates and returns a :ref:`coroutine <coroutine>` object.
9696 f"By the way, my lucky number is: {magic_number}."
9797 )
9898
99- Note that calling it does not execute the function::
99+ Calling the async function, `loudmouth_penguin `, does not execute the print statement;
100+ instead, it creates a coroutine object::
100101
101102 >>> loudmouth_penguin(magic_number=3)
102103 <coroutine object loudmouth_penguin at 0x104ed2740>
@@ -134,7 +135,7 @@ one::
134135 ...
135136
136137Similar to a coroutine function, calling a generator function does not run it.
137- Instead, it provides a generator object::
138+ Instead, it creates a generator object::
138139
139140 >>> get_random_number()
140141 <generator object get_random_number at 0x1048671c0>
@@ -262,7 +263,7 @@ and how to make your own asynchronous operators.
262263coroutine.send(), await, yield and StopIteration
263264================================================
264265
265- :mod: `!asyncio ` leverages 4 components to pass around control.
266+ :mod: `!asyncio ` leverages four components to pass around control.
266267
267268:meth: `coroutine.send(arg) <generator.send> ` is the method used to start or
268269resume a coroutine.
@@ -342,9 +343,9 @@ That might sound odd to you. You might be thinking:
342343
343344 2. What about a ``yield from `` within the coroutine function to a (plain)
344345 generator?
345- ``SyntaxError: yield from not allowed in a coroutine. ``
346+ It causes the following error: ``SyntaxError: yield from not allowed in a coroutine. ``
346347 This was intentionally designed for the sake of simplicity -- mandating only
347- one way of using coroutines. Originally ``yield `` was actually barred as well,
348+ one way of using coroutines. Initially ``yield `` was barred as well,
348349 but was re-accepted to allow for async generators.
349350 Despite that, ``yield from `` and ``await `` effectively do the same thing.
350351
0 commit comments