Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20425 > unrolled thread

Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

Started byDevin Jeanpierre <jeanpierreda@gmail.com>
First post2012-02-14 20:43 -0500
Last post2012-02-14 20:43 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ? Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-02-14 20:43 -0500

#20425 — Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?

FromDevin Jeanpierre <jeanpierreda@gmail.com>
Date2012-02-14 20:43 -0500
SubjectRe: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ?
Message-ID<mailman.5816.1329270228.27778.python-list@python.org>
On Tue, Feb 14, 2012 at 1:05 PM, MRAB <python@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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web