Skip to content

Emit pass for empty blocks in generated Python - #22

Merged
mikebarkmin merged 1 commit into
openpatch:mainfrom
mattibat:fix/python-empty-blocks
Sep 28, 2026
Merged

mikebarkmin merged 1 commit into
openpatch:mainfrom
mattibat:fix/python-empty-blocks

Conversation

@mattibat

Copy link
Copy Markdown
Contributor

Any empty block (a one-sided falls, an empty loop body, an empty fall, ...) produced Python that fails with an IndentationError:

if a > b:
    print(a)
else:

Empty bodies now get pass, and an empty else is left out entirely:

if a > b:
    print(a)

Java and JavaScript output is unchanged.

@mikebarkmin
mikebarkmin merged commit 35fcc96 into openpatch:main Sep 28, 2026
1 check passed
@mikebarkmin

Copy link
Copy Markdown
Member

thx

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

Successfully merging this pull request may close these issues.

2 participants