On Tue, Feb 14, 2012 at 1:05 PM, MRAB <pyt...@mrabarnett.plus.com> wrote:
>> And yeah, even something as crazy as ()* works, but as soon as it
>> becomes (a*)* it doesn't work. Weird.
>>
> I think it's a combination of warning the user about something that's
> pointless,
> as in the case of "$*", and producing a pattern which could cause the
> internal
> regex engine to get stuck in an infinite loop.

Considering that ()* works fine, I can't imagine it ever gets stuck in
infinite loops. But I admit I am too lazy to check against the
interpreter.

Also, complete failure is an exceptionally (heh) poor way of warning
people about stuff. I hope that's not really it.

-- Devin
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to