[issue44163] IDLE ValueError in HyperParser

Terry J. Reedy report at bugs.python.org
Mon May 17 22:33:12 EDT 2021


Terry J. Reedy <tjreedy at udel.edu> added the comment:

Thank you for the report.  Which 3.9.?  hyperparser has not changed in a year, but some of the calltip logic has.

This occurred when you typed a '(' and IDLE tried to open a calltip but failed, and you did not notice its absence.  Easy when not looking for it to help complete the call, especially when others are around.  Do you have any idea if more likely to have been in editor or shell, or did you use a mix of both?

The preceding lines are

        indexinrawtext = (len(self.rawtext) -
                          len(self.text.get(index, self.stopatindex)))
        if indexinrawtext < 0:

The resolution of this issue might be augment the error message to print the window type, the index as line.col as well as 'insert', the two lengths, and at least part of the text.

We should perhaps look at other callback error messages that IDLE raises.

----------
nosy: +taleinat

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44163>
_______________________________________


More information about the Python-bugs-list mailing list