Message251514
> “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:36 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, twouters, pitrou, vstinner, r.david.murray, martin.panter |
2015-09-24 12:18:36 | serhiy.storchaka | set | messageid: <1443097116.81.0.302544344997.issue25209@psf.upfronthosting.co.za> |
2015-09-24 12:18:36 | serhiy.storchaka | link | issue25209 messages |
2015-09-24 12:18:36 | serhiy.storchaka | create | |
|