[New-bugs-announce] [issue47066] Convert a warning about flags not at the start of the regular expression into error

Serhiy Storchaka report at bugs.python.org
Sat Mar 19 08:09:48 EDT 2022


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

This warning was introduced in 3.6. The reason is that in most other regular expression implementations global inline flags in the middle of the expression have different semantic: they affect only the part of the expression after the flag. But in Python they affect the whole expression. It caused confusion and was a source of bugs.

After 5 releases it is a time to convert this warning into error. In future we can allow global inline flags in the middle of the expression with different semantic. It is safer if one or more intermediate versions will raise an error.

----------
components: Library (Lib), Regular Expressions
messages: 415544
nosy: ezio.melotti, mrabarnett, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Convert a warning about flags not at the start of the regular expression into error
type: behavior
versions: Python 3.11

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


More information about the New-bugs-announce mailing list