[New-bugs-announce] [issue47227] Suppress expression chaining for RE parsing errors

Serhiy Storchaka report at bugs.python.org
Tue Apr 5 08:41:51 EDT 2022


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

The EAFP principle is widely used in the regular expressions parsing code. Exceptions like KeyError, IndexError, ValueError or OverflowError raised during parsing are converted into a helpful re.error. Expression chaining is usually suppressed in such cases to hide unrelated implementation details, but not in all cases. The following PR adds more "from None" in "raise" statements inside "except" blocks.

----------
components: Library (Lib), Regular Expressions
messages: 416774
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Suppress expression chaining for RE parsing errors
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47227>
_______________________________________


More information about the New-bugs-announce mailing list