[issue45539] Negative lookaround assertions sometimes leak capture groups

Matthew Barnett report at bugs.python.org
Thu Oct 21 12:19:16 EDT 2021


Matthew Barnett <python at mrabarnett.plus.com> added the comment:

It's definitely a bug.

In order for the pattern to match, the negative lookaround must match, which means that its subexpression mustn't match, so none of the groups in that subexpression have captured.

----------
versions: +Python 3.10

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


More information about the Python-bugs-list mailing list