From 0ae994814a2fce1454d7a91e2a29e75f4e840c80 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Mon, 17 Aug 2009 00:51:15 -0400 Subject: [PATCH] return tuple of functions, not a list, in plural4 --- examples/plural4.py | 2 +- generators.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/plural4.py b/examples/plural4.py index 1238623..b3ec7b4 100644 --- a/examples/plural4.py +++ b/examples/plural4.py @@ -12,7 +12,7 @@ def build_match_and_apply_functions(pattern, search, replace): return re.search(pattern, word) def apply_rule(word): return re.sub(search, replace, word) - return [matches_rule, apply_rule] + return (matches_rule, apply_rule) rules = [] with open('plural4-rules.txt', encoding='utf-8') as pattern_file: diff --git a/generators.html b/generators.html index 829a94a..1bf6c79 100755 --- a/generators.html +++ b/generators.html @@ -271,7 +271,7 @@ $ $ s return re.search(pattern, word) def apply_rule(word): return re.sub(search, replace, word) - return [matches_rule, apply_rule] + return (matches_rule, apply_rule) rules = [] with open('plural4-rules.txt', encoding='utf-8') as pattern_file: