
On Dec 14, 2019, at 12:36, Christopher Barker <pythonchb@gmail.com> wrote:
Of the top of my head, I can’t think of a single non-contrived example of using a bare iterator in case that is not specifically doing something “special”.
Calling iter on a container is hardly the only way to get an Iterator. You also get Iterators from open, map, filter, zip, genexprs, generator functions, most itertools functions, etc. And I’m pretty sure at least the first of those is learned pretty early and used pretty often by novices. In fact, I think files are one of the most common ways people learn about iterators. There are certainly a lot of StackOverflow dups asking why `for line in file:` gives them no lines when just 10 lines earlier the same file had 20 lines.