[issue1456280] Traceback error when compiling Regex

Jeffrey C. Jacobs report at bugs.python.org
Mon Oct 13 15:09:23 CEST 2008


Jeffrey C. Jacobs <timehorse at users.sourceforge.net> added the comment:

This is another version of the redundant repeat issue defined in issues 
2537 and 1633953 and although not described by the original report for 
issue 214033, the comments further down that issue also describe a 
similar situation.

In this case, the problem arises from the '[(](?P<key>[^)]*)?[)]' 
portion of your regexp code because you have a zero-or-more repeat 
repeated zero-or-one times, which in the current version of python 
causes this error.  Technically, the outer zero-or-one operator ('?') is 
redundant and you can eliminate it, but this IMHO should not cause the 
error listed below and I will look into a solution in issue 2636.

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1456280>
_______________________________________


More information about the Python-bugs-list mailing list