The author is right in that you should use iterators and generators whenever they are a elegant solution.
I do not think, that you should use nested functions that often, as already mentioned, they are hard to test.
You get more readable and testable code, when you put the code in a new method or in another class instead. You end up with less lines per method and you can pass the data explicitly, getting rid of the self.