Matthew Barnett added the comment:

Suppose you have a repeated pattern, such as "(?:...)*" or "(?:...){0,100}".

If, after matching the subpattern, the text position hasn't changed, and none 
of the capture groups have changed, then there has been no progress, and the 
subpattern will be matched again with no more progress, unless the maximum 
count has been reached, at which point it'll continue with the remainder of the 
pattern. If there's no minimum count, then the subpattern will be matched 
repeatedly forever.

Therefore, what a repeat should do is not to attempt any more iterations if the 
text position hasn't changed and none of the capture groups have changed.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18647>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to