[issue42426] IDLE: Fix reporting RE error in searchengine
Serhiy Storchaka
report at bugs.python.org
Sat Nov 21 10:19:37 EST 2020
New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:
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
Pattern: a\z
Expected:
Error: bad escape \z
Pattern: a\z
Offset: 1
----------
assignee: terry.reedy
components: IDLE
messages: 381566
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Fix reporting RE error in searchengine
versions: Python 3.10, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42426>
_______________________________________
More information about the Python-bugs-list
mailing list