Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'pm,': 0.10; 'received:209.85.214.174': 0.14; 'received:mail- iw0-f174.google.com': 0.14; 'wrote:': 0.14; 'angelico': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'obvious.': 0.16; 'matching': 0.16; 'mon,': 0.17; 'issue,': 0.19; 'header:In-Reply-To:1': 0.21; 'not.': 0.26; 'message- id:@mail.gmail.com': 0.28; 'received:209.85.214': 0.28; 'subject:how': 0.29; 'functions.': 0.29; 'do.': 0.30; 'fairly': 0.30; 'usually': 0.32; 'to:addr:python-list': 0.33; 'chris': 0.34; 'decide': 0.34; 'core': 0.35; 'there': 0.35; 'using': 0.35; 'received:google.com': 0.37; 'received:209.85': 0.37; 'think': 0.38; 'subject:: ': 0.38; 'should': 0.39; 'easier': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'features:': 0.73 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=xIue1e9C6hUPlv45rQe8yhVS7eC+YabNkucew+BOGF8=; b=Ia29W0SNEsRGTxF2dAmPXfq4czXTTrkQuGkdBilsmMYny7Ub+gAJQUPH8RpQbIGhhT ysYkntZVizjxVsJ7MZrHcAWBVgu4r/qnCqYynKa7HJiV2bn7SFnNNd9q6x5ENr0mHf45 QWYit7cpLG65EcFW7kDc+7NixyArbaA34ShyU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=x/KtFwlCg/nFS306Acna22oKFdqc2eXgegAj5m7yboumTNNysLGsWZdkvX0quOzjok Krhm9qGNzHvfiMz+wT46hcX5oI1yuiUFfHPDAUpy4igHyNq37AwFYXjrMYecsQ5L85Sp QjsJclnJ9D/Nql0VJ8QpuKYXQeGbWzBBrQYyU= MIME-Version: 1.0 In-Reply-To: <3656F0E83BB545C1A7EECB1E78E6D8B8@octavian> References: <1237a287-10b0-4a2d-ba35-97b5238deda1@n11g2000yqf.googlegroups.com> <4de992d7$0$29996$c3e8da3$5496439d@news.astraweb.com> <3656F0E83BB545C1A7EECB1E78E6D8B8@octavian> Date: Mon, 6 Jun 2011 19:01:05 +1000 Subject: Re: how to avoid leading white spaces From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 21 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307350868 news.xs4all.nl 49182 [::ffff:82.94.164.166]:37105 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7080 On Mon, Jun 6, 2011 at 6:51 PM, Octavian Rasnita wrote: > It is not so hard to decide whether using RE is a good thing or not. > > When the speed is important and every millisecond counts, RE should be used > only when there is no other faster way, because usually RE is less faster > than using other core Perl/Python functions that can do matching and > replacing. > > When the speed is not such a big issue, RE should be used only if it is > easier to understand and maintain than using the core functions. And of > course, RE should be used when the core functions cannot do what RE can do. for X in features: "When speed is important and every millisecond counts, X should be used only when there is no other faster way." "When speed is not such a big issue, X should be used only if it is easier to understand and maintain than other ways." I think that's fairly obvious. :) Chris Angelico