Skip to content

Commit

Permalink
Allow cell mode timeit without setup code.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonysyu committed May 27, 2012
1 parent 5e31374 commit 4f6b8aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IPython/core/magics/execution.py
Expand Up @@ -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))
Expand Down

0 comments on commit 4f6b8aa

Please sign in to comment.