in reply to Re^2: How do I read files in a directory and not directories?
in thread How do I read files in a directory and not directories?

"I would imagine that using the while statement instead of for would reduce the chance of the program getting caught in a loop."

Um, okay, I'll bite: Why? Whatever do you mean? There are some advantages to using while with the iterator form rather than for with the list form... I can't see how this is one of them.

I think that it's actually considerably harder to accidentally write an infinite for than an infinite while.