Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'bug': 0.02; 'mrab': 0.04; 'subject:module': 0.04; 'behavior.': 0.07; 'bug.': 0.07; 'infinite': 0.07; 'tries': 0.15; 'linking.': 0.16; 'once)': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.18; 'subject:skip:s 10': 0.18; 'issue.': 0.19; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; 'though.': 0.23; 'subject: ?': 0.24; 'fix': 0.25; 'described': 0.28; 'message-id:@mail.gmail.com': 0.29; 'avoiding': 0.29; 'pm,': 0.29; 'received:209.85.210.46': 0.30; 'received:mail- pz0-f46.google.com': 0.30; "didn't": 0.30; 'thanks': 0.32; 'tue,': 0.32; 'there': 0.33; 'match': 0.34; 'loop': 0.34; 'rather': 0.34; 'stuck': 0.34; 'to:addr:python-list': 0.35; 'issue': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'another': 0.37; 'received:209.85': 0.38; 'getting': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.40; 'more': 0.61; 'engine': 0.65; 'match,': 0.67; 'deliberate': 0.84; 'interesting,': 0.84; '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=5uFqU2kKIoTR7L2XmQ7vjBhU6YDMRUw1JbbKIyL4qz0=; b=e5SLgJHQSOgFc52IQSispKq3IpYFcXwG5jApzZzuIhkKj+Nh8mYvKn4AQHeRBoYhKa InmSlqBQDE6mwptx5g5xSFCmIjU2hEA6u9bznKMKXJYQGxbm0ACwuS/cyQRWgEMoM8xH OrLi9sXJu7HnVBD3Hf2imT3Wk1aifzPJveVlY= MIME-Version: 1.0 In-Reply-To: <4F3B13B9.2010108@mrabarnett.plus.com> References: <4F3AA287.9070604@mrabarnett.plus.com> <4F3B13B9.2010108@mrabarnett.plus.com> From: Devin Jeanpierre Date: Wed, 15 Feb 2012 08:43:37 -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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329313467 news.xs4all.nl 6845 [2001:888:2000:d::a6]:33683 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20440 On Tue, Feb 14, 2012 at 9:08 PM, MRAB wrote: > There is one place in the re engine where it tries to avoid getting > stuck in an infinite loop because of a zero-width match, but the fix > inadvertently causes another bug. It's described in issue #1647489. Just read the issue. Interesting, didn't know that was a bug rather than deliberate behavior. The other behavior (only match empty space once) makes more sense though. Thanks for linking. Still, that's for avoiding infinite loops in finditer/findall, not match/search :S -- Devin