Here is a weird bug in the sage command line. As you may have noticed, the sage: prompt does not return, and the command is actually still inside the for loop.

┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.1.beta5, Release Date: 2014-01-15                   │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Warning: this is a prerelease version, and it may be unstable.     ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
sage: V = Integers(2)**2
sage: for v in V:
....:     print v # pressing ^C now
KeyboardInterrupt
....: # This line is not indented. Let's press Enter
....:     # This line is indented.
....:     2+2 # Still indented (and in reality we are inside the for loop)
KeyboardInterrupt
....: 2+2
....:
KeyboardInterrupt
....:
  File "<ipython-input-2-d2906b15c545>", line 4
    Integer(2)+Integer(2)
          ^
IndentationError: expected an indented block

If you want to paste code into IPython, try the %paste and %cpaste magic functions.

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to