From d0f392cb5231c00af95729b435464f6f179261f1 Mon Sep 17 00:00:00 2001 From: Mark Pilgrim Date: Tue, 14 Jul 2009 00:47:00 -0400 Subject: [PATCH] removed stray notes about caching --- iterators.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iterators.html b/iterators.html index 8ae17c1..622e0bd 100755 --- a/iterators.html +++ b/iterators.html @@ -314,8 +314,8 @@ rules = LazyRules() return funcs
  1. The __next__() method gets called whenever someone — say, a for loop — calls next(rules). This method will only make sense if we start at the end and work backwards. So let’s do that. -
  2. The last part of this function should look familiar, at least. The build_match_and_apply_functions() function hasn’t changed; it’s the same as it ever was. Each line of the pattern file will be read exactly once, as late as possible. -
  3. The only difference is that, before returning the match and apply functions (which are stored in the tuple funcs), we’ve going to save them in self.cache. Each match and apply function will be built exactly once, as late as possible, then cached. +
  4. The last part of this function should look familiar, at least. The build_match_and_apply_functions() function hasn’t changed; it’s the same as it ever was. +
  5. The only difference is that, before returning the match and apply functions (which are stored in the tuple funcs), we’ve going to save them in self.cache.

Moving backwards…