[Python-bugs-list] [ python-Bugs-493252 ] maximum recursion limit exceeded in match
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 14 Dec 2001 07:57:46 -0800
Bugs item #493252, was opened at 2001-12-14 02:54
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=493252&group_id=5470
Category: Regular Expressions
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: P. de Jong (peterdejong)
>Assigned to: Fredrik Lundh (effbot)
>Summary: maximum recursion limit exceeded in match
Initial Comment:
RuntimeError: maximum recursion limit exceeded
in match, while trying to match a string of 16384
bytes. (Python 2.0)
The error does not occur after eliminating some 100
characters from the string.
The error does not occur in Python 1.5.2. So I cannot
upgrade.
Peter de Jong
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-12-14 07:57
Message:
Logged In: YES
user_id=31435
Assigned to /F. Echo Guido's belief that the regexp can
almost certainly be rewritten to avoid this and run much
faster at the same time.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-14 05:53
Message:
Logged In: YES
user_id=6380
Hi Peter!
This usually happens when the pattern contains * or + in a
way that causes more backtracking than one would naively
expect. Can you show us the pattern? There's usually an easy
way to rewrite the pattern so that it won't overflow -- and
it will be faster too...
BTW I would upgrade to Python 2.1.1 -- that's the most
stable release to date.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=493252&group_id=5470