Skip to content

Commit e44c8ba

Browse files
committed
Coroutine
1 parent 21a6b21 commit e44c8ba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2211,7 +2211,7 @@ Coroutine
22112211
### Helper Decorator
22122212
* **All coroutines must first be "primed" by calling `'next(<coroutine>)'`.**
22132213
* **Remembering to call next() is easy to forget.**
2214-
* **Solved by wrapping functions that return a coroutine with a decorator:**
2214+
* **Solved by wrapping coroutine functions with a following decorator:**
22152215

22162216
```python
22172217
def coroutine(func):

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1915,7 +1915,7 @@
19151915
</ul><div><h3 id="helperdecorator">Helper Decorator</h3><ul>
19161916
<li><strong>All coroutines must first be "primed" by calling <code class="python hljs"><span class="hljs-string">'next(&lt;coroutine&gt;)'</span></code>.</strong></li>
19171917
<li><strong>Remembering to call next() is easy to forget.</strong></li>
1918-
<li><strong>Solved by wrapping functions that return a coroutine with a decorator:</strong></li>
1918+
<li><strong>Solved by wrapping coroutine functions with a following decorator:</strong></li>
19191919
</ul><pre><code class="python language-python hljs"><span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">coroutine</span><span class="hljs-params">(func)</span>:</span>
19201920
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">out</span><span class="hljs-params">(*args, **kwargs)</span>:</span>
19211921
cr = func(*args, **kwargs)

0 commit comments

Comments
 (0)