sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

top-level indented & continued line causes unexpected EOF in sagews #2808

Closed DrXyzzy closed 1 month ago

DrXyzzy commented 6 years ago

In a .sagews file:

this does not cause an error

%python3
    x = [98,
         99]

but this (note the indentation) causes an unexpected EOF

    x = [98,
         99]
---
Error in lines 0-1
Traceback (most recent call last):
  File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1013, in execute
    exec compile(block+'\n', '', 'single') in namespace, locals
  File "<string>", line 1
    x = [Integer(98),
                    ^
SyntaxError: unexpected EOF while parsing
williamstein commented 2 months ago

Tagging this as wontfix, because it will be fixed indirectly by creating a sage worksheet style mode (and kernel) for Jupyter notebooks. That will be https://github.com/sagemathinc/cocalc/issues/6374.

https://github.com/sagemathinc/cocalc/issues/6374 will do all parsing and evaluation via Jupyter.