From 2d484b2ae2e8d450abfd252347c633d049b48523 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Sat, 16 May 2009 01:42:02 -0400 Subject: [PATCH] spiffied up intro text in generators.html#generators [thanks A.H.] --- generators.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators.html b/generators.html index bc303e0..83df95c 100644 --- a/generators.html +++ b/generators.html @@ -285,7 +285,7 @@ finally:

Generators

-

Now you’re ready to learn about generators. +

Wouldn’t it be grand to have a generic plural() function that parses the rules file? Get rules, check for a match, apply appropriate transformation, go to next rule. That’s all the plural() function has to do, and that’s all the plural() function should do.

[download plural5.py]

def rules():