5 ms·
I'll admit I may have missed it in my quick scroll through, but I don't see iterators (as a concept) or generators anywhere. I guess you could argue the latter
by notQuiteEither 3y ago
I'll admit I may have missed it in my quick scroll through, but I don't see iterators (as a concept) or generators anywhere. I guess you could argue the latter are too advanced, but I'd argue both are central to proper python.
Edit: clearly I'm illiterate, a closer inspection shows iteration brought up several times.
- bddicken 3y agoYou're right in that I don't go into any depth on what an Iterable class is, but iteration (while, for) are definitely addressed throughout. In the intro class I teach, we don't do classes, and thus, don't delve too much into what an Iterator class is, so it's not included here.
- notQuiteEither 3y agoMakes perfect sense! And yes, I edited my original comment because I skimmed far too quickly.