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

Except handler bug #556

wants to merge 4 commits into
base: master


None yet
5 participants
Copy link

akaptur commented Apr 16, 2014

Fixes #555.

akaptur added some commits Apr 15, 2014

Raise exceptions when no handlers are provided
Previously, writing a bare (try (foo)) would invoke Pokemon exception catching (gotta catch 'em all) instead of the correct behavior, which is to raise the exception if no handler is provided.

Note that this is a cute feature of Hy, as a `try` with no `except` is a syntax error.  We avoid the syntax error here because we don't use Python's compiler, which is the only thing that can throw Syntax Errors.  :D

This comment has been minimized.

Copy link

paultag commented Apr 16, 2014

Looks great. A paired with Allison on this - has ack from me. @akaptur - mind adding yourself to AUTHORS?

RFR @hylang/core


This comment has been minimized.

Copy link

olasd commented Apr 16, 2014

Unhappy flake8 is unhappy.

Honestly I could see the "correct behavior" go either way. But I suppose this is a sensible generalization of the "n exception handlers" case for n = 0, so 👍.

akaptur added some commits Apr 16, 2014


This comment has been minimized.

Copy link

theanalyst commented Apr 27, 2014

Has 2 ACKs, flake8 is happy now, good to merge I guess


This comment has been minimized.

Copy link

berkerpeksag commented Apr 28, 2014

Thanks for the patch, @akaptur! 3f9ae91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment