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

return in finally swallows exceptions #841

Open
iritkatriel opened this issue Oct 24, 2024 · 1 comment
Open

return in finally swallows exceptions #841

iritkatriel opened this issue Oct 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@iritkatriel
Copy link

In

return True if index_is_datetime and ordered else False
there is a return statement in a finally block, which would swallow any in-flight exception.

This means that if any exception is raised from the try body (including BaseException such as KeyboardInterrupt), it will not propagate on as expected.

See also https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions.

@iritkatriel iritkatriel added the bug Something isn't working label Oct 24, 2024
@twopirllc twopirllc removed their assignment Oct 26, 2024
@twopirllc
Copy link
Owner

Hello @iritkatriel

Thanks for point the mistake out. Since v3.14, the development branch has had many improvements including "better" validators. Checkout the development branch and let me know what you think. If you have any improvements to mak, please make a PR. Any help is greatly apprecaited. 😎

Kind Regards,
KJ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants