Original Launchpad bug 296116: https://bugs.launchpad.net/ipython/+bug/296116
Reported by: fdo.perez (Fernando Perez).
%timeit should preparse the input just like %time does.
Bug reported at SageDays11.
[ LP comment 1 by: Fernando Perez, on 2008-11-13 07:01:48.986269+00:00 ]
Examples from sage showing the problem:
sage: %time 2r+2r
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
File "", line 6
SyntaxError: invalid syntax
625 loops, best of 3: 128 ns per loop
625 loops, best of 3: 1.84 µs per loop
sage: %timeit 2+2
10000000 loops, best of 3: 124 ns per loop
Isn't it up to sage to do that preparsing? In any case, it seems to work correctly in current stable sage (4.6.2). Closing for now.