Martin Panter added the comment:

Maybe there are two special cases colliding here:

1. complete("A.foo", 0) returns "A.foo(". But the opening bracket is in 
readline.get_completer_delims(), which means the completer has suggested not 
only a “word” but also a delimiter.

2. Perhaps Lorenz has taken "A.foo(" directly and passed it back to the 
completer. But as Robert said, if Readline were used, it would see the bracket 
as a delimiter, and only pass an empty string as the text.

The question is how should the completer behave when it gets (invalid) input 
that would not be possible from default Readline usage?

Lorenz: why are you passing "A.foo(" to the completer, when it only parses 
attribute names, and not other Python syntax such as brackets?

----------
nosy: +martin.panter

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22141>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to