#8121: preparsing of "time" special command inconsistent in company of
parenthesis
------------------------+---------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-4.3.2
Component: notebook | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------+---------------------------------------------------
On the Sage (=IPython) command line:
{{{
sage: time (2+2)/3
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
4/3
sage: time(2+2)/3
...
NameError: name 'time' is not defined
}}}
In the notebook
{{{
sage: time (2+2)/3
...
NameError: name 'time' is not defined
}}}
This is happening because in some cases Sage treats "time <foo>" as a
function call, and sometimes not. In the notebook it is always a
function, when <foo> starts with a paren, but on the command line it is a
function only if there is no space between time and (.
FIX: Make the notebook work exactly the same was as the command line, in
this instance. That seems like a reasonable solution or compromise.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8121>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.