[issue2250] rlcompleter raises Exception on bad input

Lorenz Quack report at bugs.python.org
Fri Apr 4 20:07:24 CEST 2008


Lorenz Quack <don at amberfisharts.com> added the comment:

I confirmed that the rlcompleter can raise a SyntaxError on bad input.
Upon further investigation I found that a ReferenceError could also be
raised. I didn't check on other Exceptions.

I attached a new version of the patch where I catch all Errors derived
from Exceptions (not SystemError and KeyboardInterrupt).

while this seems rather drastic I really feel that this step should in
no case raise an Exception. I can't possibly think of a situation where
someone would want that.

Concerning the docs:
"...it will try to evaluate anything without obvious side-effects..."
I would consider raising an exception as a major side-effect so this
patch rather brings the code into accordance with the docs than it
contradicts them.

Added file: http://bugs.python.org/file9940/rlcompleter_Exception.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2250>
__________________________________


More information about the Python-bugs-list mailing list