New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%%timeit should warn of empty contents #2862
Comments
It looks like this can't be a general line+cell feature without changing the specification for That said, |
I can have a go at the timeit case as part of #2855 |
Oh, sorry @JanSchulz - already stuck it in there. |
I don't have tests for these since there seems to be a problem with running cell magics in docstring tests. Opening an issue for that... |
Notifies user if they run %%timeit with an empty cell block - see issue ipython#2862.
Warns the user if they run a %%sx derivative with an empty cell - issue ipython#2862. This is not perfect since, from within sx, there's no way to to tell which of sx/system/! were issued and we have to be generic.
Closed by PR #2874. |
Notifies user if they run %%timeit with an empty cell block - see issue ipython#2862.
Warns the user if they run a %%sx derivative with an empty cell - issue ipython#2862. This is not perfect since, from within sx, there's no way to to tell which of sx/system/! were issued and we have to be generic.
I accidentally used
%%timeit
when I meant to use%timeit
in the notebook (tab completion makes this all too easy). This means that the expression I thought I was timing was being treated as the setup expression, and it was actually looping over an empty block. I thought those speedups were too good to be true.For %%timeit, and perhaps for line+cell magics in general, it would be good to get some warning on an empty main block, in case the user meant to use the line version.
The text was updated successfully, but these errors were encountered: