#797: [with patch, needs review] %timeit doesn't recognize [1..10] syntax
----------------------------+-----------------------------------------------
Reporter: jason | Owner: was
Type: defect | Status: reopened
Priority: minor | Milestone: sage-3.4.1
Component: user interface | Resolution:
Keywords: timeit ipython |
----------------------------+-----------------------------------------------
Comment (by SimonKing):
Replying to [comment:13 SimonKing]:
> In `preparse_ipython`, lines starting with `%` have not been changed
unless they refer to some interface. I added support for `%timeit`.
>
> Idea: Call `timeit.eval`
Probably I should elaborate more on how it works.
In the old version of `preparse_ipython`, it was tested whether an input
line starts with '%'. If this was the case, then the word after '%' was
checked. If that word referred to an interface, the interface was used.
If the word after '%' was differently, the line was returned without a
change.
For the new version, I suggest to test whether the word after '%' is
'timeit'. If it is, `preparse_ipython` returns `timeit.eval(..rest of the
input line..)`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/797#comment:14>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---