Title: Invalid regexp should rise exception
Type: Stage: resolved
Components: Regular Expressions Versions: Python 3.6
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: belegnar, ezio.melotti, mrabarnett
Priority: normal Keywords:

Created on 2019-07-25 22:34 by belegnar, last changed 2019-07-25 23:16 by mrabarnett. This issue is now closed.

Messages (2)
msg348458 - (view) Author: belegnar (belegnar) Date: 2019-07-25 22:34
`re.error` should be rised on `re.compile("string{data}")` because manual says only numbers are valid within `{}`
msg348459 - (view) Author: Matthew Barnett (mrabarnett) * (Python triager) Date: 2019-07-25 23:16
For historical reasons, if it isn't valid as a repeat then it's a literal. This is true in other regex implementations, and is by no means unique to the re module.
Date User Action Args
2019-07-25 23:16:22mrabarnettsetstatus: open -> closed
resolution: not a bug
messages: + msg348459

stage: resolved
2019-07-25 22:34:42belegnarcreate