Currently, 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.
I agree our Python is case sensitive language and this feature will not break its essence.
This case insensitive completion will help interpreter users for easy typing and choose from the available options.
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’.
In the following example when user typed ‘os.po’, completions will give user all the options ignoring case:
>>> import os
>>> os.po
os.popen( os.posix_fadvise( os.posix_fallocate( os.posix_spawn( os.posix_spawnp(
>>> import rlcompleter
>>> # set ignore case ON
>>> rlcompleter.set_ignore_case(True)
>>> 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(
>>> # revert
>>> rlcompleter.set_ignore_case(False)
>>> os.po
os.popen( os.posix_fadvise( os.posix_fallocate( os.posix_spawn( os.posix_spawnp(
I have already implemented this feature and it is waiting for your support to get merged into mainline python.
Pull Request: https://github.com/python/cpython/pull/19957
Issue Created: https://bugs.python.org/issue40529
Please do comment and support.