-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
IDLE: Fix reporting RE error in searchengine #86592
Comments
In Lib/idlelib/searchengine.py there is a code which decomposes re.error and reports error message, pattern, and position of error. The problem is that that code does not match the structure of re.error. It takes args[0] as error message, and args[1] (if specified) as position in the pattern. But actually re.error always sets args[0] to formatted error message, and args has only one item. So some code in IDLE is dead. Currently reported: Error: bad escape \z at position 1 Expected: Error: bad escape \z |
The confusion about error.args is this: BaseException.args is documented as "The tuple of arguments given to the exception constructor." With the value fetching fixed, the displayed message could be changed to something else (in another issue), such as Thanks for the patch. |
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: