classification
Title: Auto Completions with case insensitive
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: mkasula, python-dev, steven.daprano, taleinat
Priority: normal Keywords: patch

Created on 2020-05-06 12:34 by mkasula, last changed 2020-10-17 19:35 by taleinat.

Pull Requests
URL Status Linked Edit
PR 19954 closed python-dev, 2020-05-06 12:39
PR 19957 open python-dev, 2020-05-06 13:33
Messages (5)
msg368241 - (view) Author: Madhusudhan Kasula (mkasula) * Date: 2020-05-06 12:34
Now, we don't have user option to make completions with case insensitive.
It would be nice if user have option to enable/disable case insensitive completions.
msg368263 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2020-05-06 15:17
Python is a case-sensitive language. Why would case-insensitive completions be useful?
msg368264 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2020-05-06 15:19
This is a new feature, so it would have to go into 3.9, all older versions are in feature-freeze.
msg368269 - (view) Author: Madhusudhan Kasula (mkasula) * Date: 2020-05-06 15:43
Yes. Python is case sensitive language and this feature will not break its essence.
This case insensitive completion will help interpreter user for easy typing and choose from the available options.
In the following example even user typed 'os.po', completions will give user all the options ignoring case:

>>>  os.po
os.POSIX_FADV_DONTNEED    os.POSIX_FADV_NORMAL      os.POSIX_FADV_SEQUENTIAL  os.popen(                 os.posix_fallocate(       
os.POSIX_FADV_NOREUSE     os.POSIX_FADV_RANDOM      os.POSIX_FADV_WILLNEED    os.posix_fadvise(         
>>> os.po

And finally, this is implemented as an controllable user option with default value as 'case sensitive'. So user can choose to go case insensitive or not. Even core 'readline' also provide this option with 'set completion-ignore-case on'.
msg378824 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-10-17 19:35
Thanks for the suggestion and for the high quality PR, Madhusudhan!

I'm not sure about this feature. It seems harmless enough, with the default being the existing case-sensitive completion. But it seems like a rather esoteric thing to want, so I'm not sure it's worth adding to the stdlib and maintaining indefinitely.

Would you mind bringing this up for discussion on Python-Ideas, so that we can get a feel for how many others would find this useful?
History
Date User Action Args
2020-10-17 19:35:48taleinatsetnosy: + taleinat
messages: + msg378824
2020-05-06 15:43:24mkasulasetmessages: + msg368269
2020-05-06 15:19:04steven.dapranosetmessages: + msg368264
versions: - Python 3.5, Python 3.6, Python 3.7, Python 3.8
2020-05-06 15:17:36steven.dapranosetnosy: + steven.daprano
messages: + msg368263
2020-05-06 13:33:26python-devsetpull_requests: + pull_request19273
2020-05-06 12:39:41python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request19270
stage: patch review
2020-05-06 12:34:19mkasulacreate