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

Error for empty 'assert' statement inconsistent with CPython #2511

Open
PhilipD8 opened this issue Nov 5, 2024 · 1 comment
Open

Error for empty 'assert' statement inconsistent with CPython #2511

PhilipD8 opened this issue Nov 5, 2024 · 1 comment

Comments

@PhilipD8
Copy link

PhilipD8 commented Nov 5, 2024

This code block

from cmu_cpcs_utils import testFunction

@testFunction
def test():
    assert

test()

when run in CPython 3.11, prints
SyntaxError: invalid syntax

and when run on master Brython, prints
Exception: <Javascript TypeError>: this.tree[0].ast is not a function

Thanks again for taking a look! :)

@PierreQuentel
Copy link
Contributor

Sorry, I can't reproduce the issue, the error message is correct with Brython 3.13.0. Which version are you using ?

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

No branches or pull requests

2 participants