Conversation

imagine being the person responsible for designing the `core::iter` module, arguably the most impactful piece of engineering not bundled into the compiler somehow, and special-casing FusedIterator for "this does not resume" instead of ReIterator for "this does resume"
1
19
Replying to and
Iterator could guarantee None being returned after the first time it's returned. It would require adding extra state and checks to certain iterators and iterator adaptors. It wouldn't simply get optimized out and it would make them a bit more difficult to write correctly.
1
I wanted it to feel like using iterators in Python with even more convenience from method chaining and having all of the itertools and itertools docs functionality built into it. Python notably doesn't provide that guarantee and doesn't offer an adaptor for it. Not very useful.
1