This commit is contained in:
Mark Pilgrim
2009-09-11 15:22:41 -04:00
parent 5d2139870d
commit a7ed2c0ca0
+1 -1
View File
@@ -297,7 +297,7 @@ rules = []
<p class=d>[<a href=examples/plural5.py>download <code>plural5.py</code></a>]
<pre class='nd pp'><code>def rules(rules_filename):
with open('plural5-rules.txt', encoding='utf-8') as pattern_file:
with open(rules_filename, encoding='utf-8') as pattern_file:
for line in pattern_file:
pattern, search, replace = line.split(None, 3)
yield build_match_and_apply_functions(pattern, search, replace)