Ticket #9048 (new defect)

Opened 3 years ago

Last modified 3 years ago

semicolon does not suppress output in the notebook

Reported by: zimmerma Owned by: jason, was
Priority: major Milestone: sage-5.10
Component: notebook Keywords:
Cc: Work issues:
Report Upstream: N/A Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

In the text version of Sage, var('x'); does not print anything. However, in the notebook, it prints x, even with the ; that should prevent output. This is quite annoying. Is there a reason for that?

Change History

comment:1 Changed 3 years ago by jason

  • Summary changed from different behaviour of var in notebook and text version to semicolon does not suppress output in the notebook

Changed the title to identify the underlying issue. Note that 1+2; also prints out something in the notebook, but not in the command line.

My guess is that it is a convention in ipython, since a semicolon does nothing in just plain python:

% sage -python
Python 2.6.4 (r264:75706, May  6 2010, 23:38:46) 
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 1+2;
3


Note: See TracTickets for help on using tickets.