Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VarPyIterate raises EPyStopIteration exception with message 'Stop Iteration' #454

Closed
nmadani opened this issue Dec 25, 2023 · 2 comments
Closed

Comments

@nmadani
Copy link

nmadani commented Dec 25, 2023

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.

@pyscripter
Copy link
Owner

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.

@nmadani
Copy link
Author

nmadani commented Dec 25, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants