logoalt Hacker News

pansa2today at 2:53 AM0 repliesview on HN

I’d say it’s more common for iterator-based loops to run to completion than to hit a `break` statement. The `StopIteration` exception is how the iterator signals that completion.