[Python-Dev] The iterator story

Neil Schemenauer nas@python.ca
Fri, 19 Jul 2002 16:22:26 -0700


Neal Norwitz wrote:
> In what context?  Were you iterating over a file or something else?
> I'm wondering if this is a problem, perhaps pychecker could generate
> a warning?

I was switching between implementing something as a generator and
returning a list.  I was curious why I was getting different behavior
until I realized I was iterating over the result twice.  I don't
think pychecker could warn about such a bug.

  Neil