Yeah! I think the PIL book is great for the first ~10 chapters or so, as an explanation of reasoning and syntax. But the later examples definitely feel like out-of-context snippets that often leave me scratching my head a little.
Memoization is great; that's basically what @shaun did in his implementation of an AssetManager in this thread, which works great. It creates images, etc at the last-possible moment, but then reuses them once they've been created.
I don't think memoization would help in this case (this activateSpeechbox() method accepts a key, which sets up and then starts a dialogue box system that runs itself afterward, and which in most cases will only call a given event once. So, lots of different results from the same function call, rather than commonly-repeated results. Right? I should definitely memoize a LOT more of my common functions, though, because I think a lot of our in-game logic produces a fairly small number of possible results repeatedly.