Add Ability to Short-Circuit Out of a <python> Block #60

Closed
opened 2023-03-23 20:29:52 +00:00 by hz · 1 comment
Owner

Currently, I think it doesn't work to do like sys.exit(0) or anything like that as a way to get out of a catsoop block, though it would be nice to be able to do so (to avoid needing to indent things in the case of a big conditional or two at the start of the page).

I think we should let sys.exit be a way to quit out of a Python block, and maybe let the return code determine whether we include the output or discard it.

Currently, I think it doesn't work to do like `sys.exit(0)` or anything like that as a way to get out of a catsoop block, though it would be nice to be able to do so (to avoid needing to indent things in the case of a big conditional or two at the start of the page). I think we should let `sys.exit` be a way to quit out of a Python block, and maybe let the return code determine whether we include the output or discard it.
Author
Owner

Implemented in 69d91d5c7c

Implemented in 69d91d5c7c752c494caf59213beb057e8c0d8870
hz closed this issue 2023-03-29 13:47:17 +00:00
hz added this to the (deleted) milestone 2023-07-13 17:32:38 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
catsoop/catsoop#60
No description provided.