ironpython3 icon indicating copy to clipboard operation
ironpython3 copied to clipboard

`eval` of a string starting with a blank line raises `SyntaxError`

Open BCSharp opened this issue 1 year ago • 0 comments

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

BCSharp avatar Dec 14 '24 05:12 BCSharp