This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients martin.panter, pitrou, r.david.murray, serhiy.storchaka, twouters, vstinner
Date 2015-09-24.12:18:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> “Else” doesn’t always use a colon. Consider “1 if x else 2”.

Good catch Martin. Unfortunately the completer doesn't take context into account. "else" with a colon is a common case, but unwanted colon could be annoyed. I agree that it would be safe to not append a colon after "else". At least unless we make the completer context aware. However I don't think that unwanted space would be so annoyed. Here is updated patch.

I see that your code does an autocompletion for module names in "import", Martin. This was my next idea. Do you want to provide a patch for including this in CPython?

> I tested the patch. "wi<tab>" displays "with " (space)., but "fo<tab>" displays "for" (no space). I don't understand why.

Because there is "format(".

> IMHO you should apply it to Python 3.4-3.6 (not only 3.6).

This is definitely a new feature. And there is a risk to break something (if standard completer is used programmatic).
Date User Action Args
2015-09-24 12:18:36serhiy.storchakasetrecipients: + serhiy.storchaka, twouters, pitrou, vstinner, r.david.murray, martin.panter
2015-09-24 12:18:36serhiy.storchakasetmessageid: <>
2015-09-24 12:18:36serhiy.storchakalinkissue25209 messages
2015-09-24 12:18:36serhiy.storchakacreate