[New-bugs-announce] [issue38981] better name for re.error Exception class.
Matthias Bussonnier
report at bugs.python.org
Thu Dec 5 11:56:07 EST 2019
New submission from Matthias Bussonnier <bussonniermatthias at gmail.com>:
better error/exception name for re.compile error.
Currently the error raise by re.compile when it fails to compile is `error` defined in sre_constants.py:
```
class error(Exception):
"""Exception raised for invalid regular expressions.
```
This is quite disturbing as most exception start with an uppercase and have a tiny bit more descriptive name.
Would it be possible to have it renamed as something more explicit like `ReCompileError`, and still keeping the potential `error` alias as deprecated ?
----------
components: Regular Expressions
messages: 357867
nosy: ezio.melotti, mbussonn, mrabarnett
priority: normal
severity: normal
status: open
title: better name for re.error Exception class.
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38981>
_______________________________________
More information about the New-bugs-announce
mailing list