Permalink
Browse files

Merge pull request #1769 from tonysyu/timeit-bug

Allow cell mode timeit without setup code (i.e. with an empty line).
  • Loading branch information...
2 parents 5e31374 + 4f6b8aa commit 89c23370cacc3bdee12af9a199656e83a387df5b @fperez fperez committed May 28, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 IPython/core/magics/execution.py
@@ -750,7 +750,7 @@ def timeit(self, line='', cell=None):
opts, stmt = self.parse_options(line,'n:r:tcp:',
posix=False, strict=False)
- if stmt == "":
+ if stmt == "" and cell is None:
return
timefunc = timeit.default_timer
number = int(getattr(opts, "n", 0))

0 comments on commit 89c2337

Please sign in to comment.