use lists instead of tuples in generator chapter too [thanks A.H.]

This commit is contained in:
Mark Pilgrim
2009-05-16 01:38:26 -04:00
parent 0a884ee32b
commit 9f96f01e07
6 changed files with 21 additions and 21 deletions
+5 -5
View File
@@ -31,11 +31,11 @@ def match_default(noun):
def apply_default(noun):
return noun + 's'
rules = ((match_sxz, apply_sxz),
(match_h, apply_h),
(match_y, apply_y),
(match_default, apply_default)
)
rules = [[match_sxz, apply_sxz],
[match_h, apply_h],
[match_y, apply_y],
[match_default, apply_default]
]
def plural(noun):
for matches_rule, apply_rule in rules: