Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.023 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'exception': 0.12; 'am,': 0.14; 'wrote:': 0.14; 'exceptions.': 0.16; 'furman': 0.16; 'timed': 0.16; 'cc:addr:python-list': 0.17; 'mon,': 0.17; 'header :In-Reply-To:1': 0.21; 'cc:2**0': 0.22; 'received:209.85.161.46': 0.23; 'received:mail-fx0-f46.google.com': 0.23; 'posted': 0.25; 'received:209.85.161': 0.26; 'example': 0.27; 'message- id:@mail.gmail.com': 0.28; 'subject:how': 0.29; 'version,': 0.29; 'version': 0.29; 'cc:addr:python.org': 0.30; "didn't": 0.31; "isn't": 0.33; 'version.': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.37; 'but': 0.38; 'data': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; '11:48': 0.84; 'readability': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=+u12yLyTabieYiOJD80fVZgOYasYldTewuSyr8OGuYM=; b=vPPgh+m6JEVSEPTrybIahWxIoX4dZS4tChoLaj2Z0vJwicQZjwhM8khiXODizyB6hw FXtw0D1ayOwF4FGYa5RLhPmqxusNOVYuznIHfRnLJkV/hccpUlSehY7q4e/w4/AvqASV DsmEOOxmL4JjmjICo42xLG8knJxY0hhlxuhc4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=Ce5LTR+jkp9t6xdVuAJEd8+kKqrfCFOYnU4zPIsKl2I/E2qnQPQjTwpYeTKxKguopv a6ifDsd8gprZHkffU8R+4G989I4Mr1TT9DB4FE7Px21bjq7zeSEkjhKt0WkUiPowdMIe wzcETw2xksrOfz296AOv0l2exyNiJDyb8RT5c= MIME-Version: 1.0 In-Reply-To: <4DED12DF.6030405@stoneleaf.us> References: <9e861b0e-e768-401b-b5ca-190f20830a08@s9g2000yqm.googlegroups.com> <94ph22FrhvU5@mid.individual.net> <4de8eef1$0$29996$c3e8da3$5496439d@news.astraweb.com> <1237a287-10b0-4a2d-ba35-97b5238deda1@n11g2000yqf.googlegroups.com> <94svm4Fe7eU1@mid.individual.net> <65164054-f11d-4f8e-a141-31513e70ca04@h9g2000yqk.googlegroups.com> <954cb5F5qbU1@mid.individual.net> <4DED12DF.6030405@stoneleaf.us> From: Ian Kelly Date: Mon, 6 Jun 2011 11:42:27 -0600 Subject: Re: how to avoid leading white spaces To: Ethan Furman Content-Type: text/plain; charset=ISO-8859-1 Cc: Python 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: 7 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307382178 news.xs4all.nl 49039 [::ffff:82.94.164.166]:60714 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7101 On Mon, Jun 6, 2011 at 11:48 AM, Ethan Furman wrote: > I like the readability of this version, but isn't generating an exception on > every other line going to kill performance? I timed it on the example data before I posted and found that it was still 10 times as fast as the regex version. I didn't time the version without the exceptions.