moved pattern_file back to __init__ in plural6.py

This commit is contained in:
Mark Pilgrim
2009-07-27 06:20:29 -04:00
parent 62aa447daf
commit 6c0a137742
5 changed files with 16 additions and 10 deletions
+3 -1
View File
@@ -17,8 +17,10 @@ def build_match_and_apply_functions(pattern, search, replace):
class LazyRules:
rules_filename = 'plural6-rules.txt'
def __iter__(self):
def __init__(self):
self.pattern_file = open(self.rules_filename, encoding='utf-8')
def __iter__(self):
self.cache = []
self.cache_index = 0
return self