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 Valery.Khamenya
Recipients Valery.Khamenya
Date 2010-11-08.09:22:35
SpamBayes Score 4.3377218e-10
Marked as misclassified No
Message-id <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za>
In-reply-to
Content
1. The patch introduces autocompletion for keys in dictionaries (patch attached)

2. The patched rlcompleter as such works OK for unicode dictionary keys as well. All tests pass OK. HOWEVER, readline's completion mechanism seem to be confused with unicode strings -- see comments to Completer.dict_key_matches(). So, perhaps, one day some changes should be applied to readline code too.

3. rlcompleter.py has no tests in trunk -- I spawn a separate issue for it. Meanwhile I took test_rlcompleter.py from 2.7 and extended it.

4. The following usual lines in .pythonstartup:
import readline
import rlcompleter
readline.parse_and_bind('tab: complete')
readline.parse_and_bind('Control-Space: complete')

should be extended by this one:
readline.set_completer_delims(re.compile(r'[\'"\\[]').sub('', readline.get_completer_delims()))
History
Date User Action Args
2010-11-08 09:22:40Valery.Khamenyasetrecipients: + Valery.Khamenya
2010-11-08 09:22:40Valery.Khamenyasetmessageid: <1289208160.65.0.489934250712.issue10351@psf.upfronthosting.co.za>
2010-11-08 09:22:36Valery.Khamenyalinkissue10351 messages
2010-11-08 09:22:35Valery.Khamenyacreate