Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gauthamzz

This comment has been minimized.

Copy link

commented Feb 26, 2018

👍

@a-huy

This comment has been minimized.

Copy link

commented Feb 27, 2018

You might want to define a custom Exception class for this - it looks like the current implementation will confuse KeyboardInterrupt and unrelated functional exceptions as an attempt to recurse.

@ProgVal

This comment has been minimized.

Copy link

commented Feb 28, 2018

Next step: tail-recursion optimization

@petiepooo

This comment has been minimized.

Copy link

commented Feb 28, 2018

Cool hack, but a-huy is right: a naked except clause? Tsk tsk..

@tchoutri

This comment has been minimized.

Copy link

commented Feb 28, 2018

Can't wait for proper recursion now!

@LukeB42

This comment has been minimized.

Copy link

commented Feb 28, 2018

👍

@Aristarhys

This comment has been minimized.

Copy link

commented Feb 28, 2018

🤘

@jasen-b

This comment has been minimized.

Copy link

commented Feb 28, 2018

a custom exception is not needed, the exception problem can be fixed by reducing the scope of the try block and using some messy branching or a tidy little goto.

@skliarpawlo

This comment has been minimized.

Copy link

commented Mar 3, 2018

I think you can pass __next_arg via exception params instead of stackify object state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.