Programming Languages
Bug Report
Python second loop over results is empty: generators and iterators are one-shot
Our nightly export reported the right row count but wrote an empty CSV. A refactor had turned a list into a generator, and the first loop consumed it. Here is how we traced it, the three ways to fix it, and the type hints that now catch it.