[issue16007] Improved Error message for failing re expressions

Serhiy Storchaka report at bugs.python.org
Sun Oct 16 05:02:54 EDT 2016


Serhiy Storchaka added the comment:

Since 3.5 (issue22578) the re.error exception has attributes that contain a pattern and the position of the error. Error message contains the position of the error. A pattern is not included in the error message for purpose: it can be too long. Usually the pattern is clear from the context, and you always can check the pattern attribute.

----------
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Add additional attributes to re.error

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16007>
_______________________________________


More information about the Python-bugs-list mailing list