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.

Author Gabriel.Rodríguez.Alberich
Recipients Gabriel.Rodríguez.Alberich, ezio.melotti, mrabarnett
Date 2012-11-29.17:16:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za>
In-reply-to
Content
>>> 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

isname() shouldn't be blindly accessing name[0].
History
Date User Action Args
2012-11-29 17:16:26Gabriel.Rodríguez.Alberichsetrecipients: + Gabriel.Rodríguez.Alberich, ezio.melotti, mrabarnett
2012-11-29 17:16:26Gabriel.Rodríguez.Alberichsetmessageid: <1354209386.4.0.0657079011573.issue16578@psf.upfronthosting.co.za>
2012-11-29 17:16:26Gabriel.Rodríguez.Alberichlinkissue16578 messages
2012-11-29 17:16:25Gabriel.Rodríguez.Alberichcreate