Tim Peters added the comment:

Matching an empty string an unbounded number of times isn't a case of 
exponential runtime, it's a case of infinite runtime, unless the regexp 
internals are smart enough to cut the search off (I don't know enough about 
re's internals to know whether it's smart enough to do so).

So it's worth catching at compile time if it can be caught.  Alas, regexps are 
so complicated I doubt it's possible to do so without false positives or false 
negatives short of major effort.

For now, at least the doctest part of the patch should be harmless ;-)

----------

_______________________________________
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