mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
spiffied up intro text in generators.html#generators [thanks A.H.]
This commit is contained in:
+1
-1
@@ -285,7 +285,7 @@ finally:
|
||||
|
||||
<h2 id=generators>Generators</h2>
|
||||
|
||||
<p>Now you’re ready to learn about generators.
|
||||
<p>Wouldn’t it be grand to have a generic <code>plural()</code> function that parses the rules file? Get rules, check for a match, apply appropriate transformation, go to next rule. That’s all the <code>plural()</code> function has to do, and that’s all the <code>plural()</code> function should do.
|
||||
|
||||
<p class=d>[<a href=examples/plural5.py>download <code>plural5.py</code></a>]
|
||||
<pre><code>def rules():
|
||||
|
||||
Reference in New Issue
Block a user