[issue37765] IDLE: Include keywords in __main__ autocomplete list

2019-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: Raymond, since there is no proposal to 'add __main__', I don't understand your response. For the case in question, the completion list continues to be based on the keys in __main__.__builtins__.__dict__, and main__.__dict__, as it always has been.

[issue37765] IDLE: Include keywords in __main__ autocomplete list

2019-08-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Since the word "main" is short and since the dunder prefix is common, I don't expect to get much value out of adding '__main__'.ISTM, this just increases the risk of a false positive for a given dunder method. > To be clear, I'm currently -1 on this s

[issue37765] IDLE: Include keywords in __main__ autocomplete list

2019-08-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: After more research, I am more inclined to add the keywords to the global identifiers list. The IDLE doc says that they should be present. "Show Completions Open a scrollable list allowing selection of keywords and attributes." If this issue were rejected,

[issue37765] IDLE: Include keywords in __main__ autocomplete list

2019-08-05 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Thanks Terry, I used a similar patch. My main use case was around typing where normal shell autocompletes it and was curious if it was intentional. I didn't know that windows didn't give keywords. The keywords are short and added very rarely and pe

[issue37765] IDLE: Include keywords in __main__ autocomplete list

2019-08-05 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +14876 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/15138 ___ Python tracker __

[issue37765] IDLE: Include keywords in __main__ autocomplete list

2019-08-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: 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 pret