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

eval of a string starting with a blank line raises SyntaxError #1841

Open
BCSharp opened this issue Dec 14, 2024 · 0 comments
Open

eval of a string starting with a blank line raises SyntaxError #1841

BCSharp opened this issue Dec 14, 2024 · 0 comments

Comments

@BCSharp
Copy link
Member

BCSharp commented Dec 14, 2024

The following succeeds with CPython:

# should not throw
eval(" 3.14")  # OK
eval("\t3.14") # OK
eval("\n3.14") # raises SyntaxError in ipy

# should raise SyntaxError
try: eval("\n 3.14")
except SyntaxError: pass  # OK
else: assert False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant