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
"-datetime.timedelt" not completed #6140
Comments
Pep8 ! |
Was this in the notebook, the terminal or the Qt console? Tab completion works different ways in different environments. |
I tested on pure ipython shell. |
The problem is present in the terminal. Note that PEP 8 does not apply here ("If operators with different priorities are used, consider adding whitespace"). Plus, I was not doing Also, one of the uses of ipython is to perform calculations quickly, so here, I would "use my own judgment" (PEP 8) and would not see any reasons to put spaces around operations, usually (in a terminal—a notebook would be different, since it is for others to read, maybe). Finally, I'm not sure I get the "might be a filename" parsing argument either: why would |
The pep-8 part was a joke, And the comment about filename ment that there is probably a reason why it treats - differently. This reason might not be anymore. Thinking about it a bit more, the only case where I see a tokenization difference for +- are magics that uses arguments. Thus the - might be treated as part of the valid char for a token whereas + is not. Note that the completer messaging spec has change recently so it might help fixing that at some point. I just wouldn't put too much hope into the fact that this is a simple fix that new to treat - and + equally. Envoyé de mon iPhone
|
Hmm. Good idea. Now, I never use magic commands with arguments, but I do a lot of subtractions, and not having completion in this case is a real limitation… :) |
Yes, we explicitly remove We might be able to improve this when we get to reworking the completions machinery, but that code is pretty thorny. |
This will be fixed by #10182 |
closed by #10182 |
After the necessary
import datetime
, completing-datetime.timedelt
with TAB does not work. Doing the same withdatetime.timedelt
works as expected.Python 2.7.8 (default, Jul 13 2014, 17:11:32)
IPython 2.1.0
The text was updated successfully, but these errors were encountered: