You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bpo-12759: "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2012-11-29.17:32:22.052>created_at=<Date2012-11-29.17:16:26.267>labels= ['expert-regex', 'type-crash']
title='Regular expressions with empty named groups break isname check'updated_at=<Date2012-11-29.17:35:09.963>user='https://bugs.python.org/GabrielRodrguezAlberich'
>>> import re
>>> re.compile("(?P<>)")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/re.py", line 190, in compile
return _compile(pattern, flags)
File "/usr/lib/python2.7/re.py", line 240, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python2.7/sre_compile.py", line 500, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python2.7/sre_parse.py", line 673, in parse
p = _parse_sub(source, pattern, 0)
File "/usr/lib/python2.7/sre_parse.py", line 308, in _parse_sub
itemsappend(_parse(source, state))
File "/usr/lib/python2.7/sre_parse.py", line 544, in _parse
if not isname(name):
File "/usr/lib/python2.7/sre_parse.py", line 218, in isname
if not isident(name[0]):
IndexError: string index out of range
GabrielRodrguezAlberichmannequin
changed the title
Regular expressions with empty named groups breaks isname check
Regular expressions with empty named groups break isname check
Nov 29, 2012
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: