PyDocs

Nav

Python Runtime Services

StopIteration

builtins

exception
Signal the end from iterator.__next__().
Changed in 3.3, 3.5, 3.7
  • 3.3: Added value attribute and the ability for generator functions to use it to return a value.
  • 3.5: Introduced the RuntimeError transformation via from __future__ import generator_stop, see PEP 479.
  • 3.7: Enable PEP 479 for all code by default: a StopIteration error raised in a generator is transformed into a RuntimeError.
Members of StopIteration

v

value
generator return value
0 Examples
No examples for builtins/StopIteration.
See Also
No see-alsos for builtins/StopIteration
0 Notes
No notes for StopIteration