Skip to content

Comment on Exceptions (2003)parent

Comments

Python also has a `StopIterationError` that is raised to signal the end of a `for` loop, which is not exceptional at all.

It's called "StopIteration", not "StopIterationError", because it is not an error.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.