diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index 66ee259..8a1552f 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -776,6 +776,10 @@ python-profiler package from non-free.""") posix=False, strict=False) if stmt == "" and cell is None: return + elif cell == '': + warn("Empty cell. Did you mean to use %timeit?") + return + timefunc = timeit.default_timer number = int(getattr(opts, "n", 0)) repeat = int(getattr(opts, "r", timeit.default_repeat))