Author terry.reedy
Recipients cheryl.sabella, rhettinger, taleinat, terry.reedy, xtreak
Date 2020-07-07.21:20:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594156843.96.0.818441387662.issue37765@roundup.psfhosted.org>
In-reply-to
Content
Cheryl said "This looks good" on the PR." while noting that True should not be added as  After trying out REPL completions in macOS Terminal, I *really* want to be able to type 'im'<tab> and have 'import' appear.  (When there is just one match, it is filled in without displaying a list of one item.)  I increasingly suffer from 'dystypia' (which I coined as the reverse of 'dyslexia'), and 'import' is one of my worst words.  And I have to type it daily.  On #17238, Ramchandra Apte also requested completion of 'import'.

Sorting keywords by length, we get:
>>> sorted(keyword.kwlist, key=lambda s: len(s))
['as', 'if', 'in', 'is', 'or', 'and', 'def', 'del', 'for', 'not', 'try', 'None', 'True', 'elif', 'else', 'from', 'pass', 'with', 'False', 'async', 'await', 'break', 'class', 'raise', 'while', 'yield', 'assert', 'except', 'global', 'import', 'lambda', 'return', 'finally', 'continue', 'nonlocal', '__peg_parser__']

I agree that adding 2 and 3 letter keywords is not useful. Among 4 letter keywords, None and True are already present from builtins.  'elif' and 'else' would need at least 3 and 4 keystrokes to complete ('e', <Tab>, Down for 'else', <Enter>).  'from' would need at least 4 because of 'filter' and 'frozenset'.  'pass' would need 3 because of 'pow'.  'with' would require at least 5 if 'while' were added.  So skip length 4 keywords also.

So I am changing the proposal to adding the 17 keywords (other than False, already present) of length 5 or more.  These include 'async' and 'await', requested by Karthikeyan in the opening post above.
History
Date User Action Args
2020-07-07 21:20:44terry.reedysetrecipients: + terry.reedy, rhettinger, taleinat, cheryl.sabella, xtreak
2020-07-07 21:20:43terry.reedysetmessageid: <1594156843.96.0.818441387662.issue37765@roundup.psfhosted.org>
2020-07-07 21:20:43terry.reedylinkissue37765 messages
2020-07-07 21:20:43terry.reedycreate