VarPyIterate raises EPyStopIteration exception with message 'Stop Iteration'
nmadani opened this issue · 2 comments
Fantastic project!
In Webinar II's VarPythDemo, clicking Run raises an EPyStopIteration exception with the message 'Stop Iteration'.
Platforms:
Python version: 3.12.1 (Windows 64, not ARM)
Delphi 12 Athens
Windows 11 Pro ARM 22H2 build 22621.2861
via Parallels Version 19.2.0 (54827)
on macOS Sonoma 14.2.1
Thank you.
It does, but it gets handled. Just ignore it.
This is standard and expected. StopIteration is raised by Python to exit for loops. See for instance https://stackoverflow.com/questions/14413969/why-does-next-raise-a-stopiteration-but-for-do-a-normal-return.
and https://docs.python.org/3/library/exceptions.html.
Thank you. Raising an exception for a normal condition, i.e., an end-of-loop condition signal for an iterator... well, that's a new pattern to me!