[issue25660] tabs don't work correctly in python repl

Martin Panter report at bugs.python.org
Wed Nov 18 20:32:33 EST 2015


Martin Panter added the comment:

I think this might just be a side effect of the way we abuse the tab completer to insert a literal tab (Issue 23441, revision 82ccdf2df5ac). If I change the code to insert the letter T instead of tabs:

if not text.strip('T'):
    if state == 0:
        return text + 'T'
    else:
        return None

I see this behaviour:

* Manually type three Ts
* Press Tab once, a fourth T is added nicely
* Press Tab a second time, it beeps and displays a completion list with a single item, and then completes my line to five Ts
* Pressing Tab again repeats the beep, completion list, and appending a T

Illustration:

>>> TTTT  <== Typed T three times, then Tab twice
TTTTT  <== Completion list from second Tab press
>>> TTTTT
TTTTTT
>>> TTTTTT

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25660>
_______________________________________


More information about the Python-bugs-list mailing list