Resolution: was Re: [Python-Dev] re.finditer

Oct. 3, 2003
7:13 p.m.
Summary: bug 817234 http://sourceforge.net/tracker/index.php?func=detail&aid=817234&group_id=5470&atid=105470 in Python 2.3 and 2.3.1, finditer does not raise StopIteration if the end of the string matches with an empty match. That is, the following code will loop forever:
import re i = re.finditer( ".*", "asdf" ) for m in i: print m.span() ... (0, 4) (4, 4) (4, 4) (4, 4) (4, 4) (4, 4) (4, 4)
Seo Sanghyeon posted what appears to be a correct fix. The code was introduced in the fix for bug 581080 http://sourceforge.net/tracker/index.php?func=detail&aid=581080&group_id=5470&atid=105470 but removing this line does not re-introduce that bug. Thanks, and kudos to Seo... kb
7818
Age (days ago)
7818
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kevin J. Butler