This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Invalid regexp should rise exception
Type: Stage: resolved
Components: Regular Expressions Versions: Python 3.6
process
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 2022-04-11 14:59 by admin. 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.
History
Date User Action Args
2022-04-11 14:59:18adminsetgithub: 81868
2019-07-25 23:16:22mrabarnettsetstatus: open -> closed
resolution: not a bug
messages: + msg348459

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