Question about exausted iterators

Terry Reedy tjreedy at
Thu May 18 18:42:57 EDT 2006

"Christophe" <chris.cavalaria at> wrote in message 
news:446c2dea$0$5306$626a54ce at
>Instead of saying that all works as intended could you be a little
>helpful and tell me why it was intended in such an obviously broken way
>instead ?

I answered both your explicit and implied questions in good faith.  But you 
seem to be too attached to your pre-judgment to have benefited much, so I 
won't waste my time and yours saying more.  Instead I suggest that you try 

1. Write a specification for your an alternate, more complicated, iterator 
2. Write a simple class with .next method that implements your 
3. Test your class with your example.
4. Consider how you would persuade people to add the extra machinery 
5. Consider what you would do when people don't.

If you want, post a report on your experiment, and I will read it if I see 

Terry Jan Reedy

More information about the Python-list mailing list