Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'mrab': 0.04; 'subject:module': 0.04; 'stuff.': 0.05; 'infinite': 0.07; 'interpreter.': 0.07; 'loop.': 0.09; 'subject: \n ': 0.16; 'weird.': 0.16; 'wrote:': 0.18; 'subject:skip:s 10': 0.18; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; 'fine,': 0.23; 'subject: ?': 0.24; 'work.': 0.27; 'producing': 0.28; 'message-id:@mail.gmail.com': 0.29; 'pm,': 0.29; 'admit': 0.30; 'pattern': 0.30; 'tue,': 0.32; "can't": 0.33; 'it.': 0.33; 'too': 0.33; 'crazy': 0.34; 'stuck': 0.34; 'to:addr:python-list': 0.35; 'something': 0.35; 'received:209.85.160': 0.36; 'combination': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'could': 0.38; 'think': 0.38; 'becomes': 0.39; 'received:209.85.160.46': 0.39; 'received:mail- pw0-f46.google.com': 0.39; 'received:209': 0.39; 'user': 0.40; 'to:addr:python.org': 0.40; 'hope': 0.61; 'ever': 0.64; 'engine': 0.65; 'imagine': 0.66; 'cause': 0.67; 'works,': 0.68; 'soon': 0.72; 'failure': 0.74; 'subject:Nothing': 0.84; 'subject:nothing': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=CdydDXPVmMBGeLGakVLlddI4MZPcOtVIw8wyFcEYEe0=; b=UQgURG4I8qICoI1NBZA2PP3dmp87iiNRAeAeEaVsB0Qh2rdMr4DiXJN8fad5AHZ5NV 4G95JKygR+lQTQv/CGuYmPEJET3Fktpry68Qd6AGK9dMeydjdGX3wbFVM1ql2VJ1j6iG 2Z61Oc6HOu0/fafem8TOjMw7Nq4NV+4OJz/2A= MIME-Version: 1.0 In-Reply-To: <4F3AA287.9070604@mrabarnett.plus.com> References: <4F3AA287.9070604@mrabarnett.plus.com> From: Devin Jeanpierre Date: Tue, 14 Feb 2012 20:43:05 -0500 Subject: Re: re module: Nothing to repeat, but no sre_constants.error: nothing to repeat ? To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329270228 news.xs4all.nl 6891 [2001:888:2000:d::a6]:39976 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20425 On Tue, Feb 14, 2012 at 1:05 PM, MRAB 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