Author serhiy.storchaka
Recipients haypo, martin.panter, pitrou, r.david.murray, serhiy.storchaka, twouters
Date 2015-09-24.12:18:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443097116.81.0.302544344997.issue25209@psf.upfronthosting.co.za>
In-reply-to
Content
> “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).
History
Date User Action Args
2015-09-24 12:18:36serhiy.storchakasetrecipients: + serhiy.storchaka, twouters, pitrou, haypo, r.david.murray, martin.panter
2015-09-24 12:18:36serhiy.storchakasetmessageid: <1443097116.81.0.302544344997.issue25209@psf.upfronthosting.co.za>
2015-09-24 12:18:36serhiy.storchakalinkissue25209 messages
2015-09-24 12:18:36serhiy.storchakacreate