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 terry.reedy
Recipients taleinat, terry.reedy, xtreak
Date 2019-08-05.20:16:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If keywords are included when the REPL has tab completions (which Windows doesn't), then it is plausible that IDLE should.  It could be considered part of 'Shell should (mostly) imitate REPL'.  But I can see Tal's point, though the relative expansion is pretty small.  And there is nothing on the master completions issue #27609 where I collected known not-yet-rejected suggestions and ideas.

The implementation is trivial.  Add two new lines to  So you can easily patch a private copy.  I am preparing a minimal PR.

import keyword  # add
    def fetch_completions(self, what, mode):
                    bigl = eval("dir()", namespace)
                    bigl.extend(keyword.kwlist)  # add

True, False, and None are also in builtins, so cannot serve as a test.

A separate idea: annotate completion list, at least as an option, with 'keyword' or class, possibly prefixed with 'built-in', so 'built-in function', 'function', and so on.
Date User Action Args
2019-08-05 20:16:06terry.reedysetrecipients: + terry.reedy, taleinat, xtreak
2019-08-05 20:16:06terry.reedysetmessageid: <>
2019-08-05 20:16:06terry.reedylinkissue37765 messages
2019-08-05 20:16:06terry.reedycreate