-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
rlcompleter raises Exception on bad input #46503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
in line 130 rlcompleter calls eval on the first part (before the last example 1: import rlcompleter
rlcompleter.Completer().complete("foo.", 0) -> raises NameError example 2: import rlcompleter
foo = 5
rlcompleter.Completer().complete("foo.bar.", 0) -> raises AttributeError the patch puts the eval call in a try-except block and catches Name- and |
Is a straightforward patch, but I'd like NAS to comment on the change in |
I have no idea what or who NAS is but comments are always welcome :) concerning the documentation: |
On Thu, Mar 20, 2008 at 08:49:32PM +0000, Sean Reifschneider wrote:
I doubt that people are relying on complete() to raise NameError or Neil |
I was thinking that the code in question could maybe also raise other import rlcompleter
rlcompleter.Completer().complete("1foo.2bar3.smth", 0) which I guess would result in a SyntaxError. If I´m right I see two possibilities. either change the regular could there be any other exception? ("In the face of ambiguity, refuse |
I confirmed that the rlcompleter can raise a SyntaxError on bad input. I attached a new version of the patch where I catch all Errors derived while this seems rather drastic I really feel that this step should in Concerning the docs: |
I attached a patch for the docs. |
In the last patch I used the wrong ticks. I hope it's fine like this. |
Committed code and doc patches as r63094. Thanks! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: