From 584614b7390774bb32d78503b49910eec37fb8a4 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Tue, 14 Jul 2009 00:52:38 -0400 Subject: [PATCH] really fixed numbering --- iterators.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iterators.html b/iterators.html index e1903e0..7fb466a 100755 --- a/iterators.html +++ b/iterators.html @@ -252,8 +252,8 @@ rules = LazyRules() rules_filename = 'plural6-rules.txt' def __iter__(self): - self.pattern_file = open(self.rules_filename) - self.cache = [] + self.pattern_file = open(self.rules_filename) + self.cache = [] self.cache_index = 0
  1. The __iter__() method is only going to be called once, after you instantiate the class, assign it to rules, and call iter(rules) to create the iterator.