Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '3.2': 0.05; 'cpython': 0.05; 'pgp': 0.09; 'subject:string': 0.09; 'used).': 0.09; 'message-----': 0.12; 'am,': 0.13; 'wrote:': 0.15; '-----begin': 0.16; '-----end': 0.16; 'gnupg': 0.16; 'hash:': 0.16; 'newlines': 0.16; 'roy': 0.16; 'skip:0 60': 0.16; 'subject:formatting': 0.16; 'subject:vs.': 0.16; 'thunderbird': 0.16; 'url:enigmail': 0.16; 'url:mozdev': 0.16; 'comment:': 0.19; 'received:209.85.210.174': 0.19; 'received:mail-iy0-f174.google.com': 0.19; 'filter': 0.22; 'header:In-Reply-To:1': 0.22; 'joining': 0.23; 'skip:[ 10': 0.26; 'windows': 0.26; 'id:': 0.29; 'match': 0.30; 'separate': 0.31; 'lines': 0.31; 'signed': 0.32; 'message-id:@gmail.com': 0.32; 'does': 0.32; 'to:addr:python-list': 0.34; 'instead': 0.34; 'header:User-Agent:1': 0.34; 'uses': 0.35; "isn't": 0.35; 'certain': 0.36; 'using': 0.37; 'received:192': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'something': 0.38; 'case,': 0.38; 'received:192.168.1': 0.39; 'version:': 0.39; 'to:addr:python.org': 0.39; 'prevent': 0.40; 'received:209': 0.40; 'order': 0.62; 'subject:. ': 0.66; 'blank': 0.71; '5.0': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=aUp+SKgSM6op4RMsbYAc14vPwzRUVDU0aopRBeOWw+U=; b=HLfj/n8WPwWDNKXRZCEwcB1nM0K7a7LW1hnuvjKS2HaBI/O6C+3K5LP1Z0wTzfp9yT bAPskFBLpGm/65+NfkLqw7WT/TmETfit17W9Qe4lvEqS4d/UUZmy8U/R8YrCNLefFjw/ gyyr0q+3nCv/wmX9TH5jo41vd+r3AGNd6Welo= Date: Sun, 10 Jul 2011 18:24:33 -0500 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: String concatenation vs. string formatting References: In-Reply-To: X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1310340301 news.xs4all.nl 21885 [2001:888:2000:d::a6]:54907 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:9200 -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 On 2011.07.10 09:33 AM, Roy Smith wrote: > The canonical way to do that would be something like > > fields = [demux_filter, field_filter, fpsin_filter, i2pfilter, > dn_filter, fpsout_filter, trim_filter, info_filter] > avs.write(''.join(fields)) That would look really awful (IMO) if the strings weren't intended to be on separate lines (I use embedded newlines instead of joining them with newlines in order to prevent blank lines whenever a certain filter isn't used). In this particular case, they are, so even though it uses a lot of whitespace, it does match the layout of its output. - -- CPython 3.2 | Windows NT 6.1.7601.17592 | Thunderbird 5.0 PGP/GPG Public Key ID: 0xF88E034060A78FCB -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAwAGBQJOGjSxAAoJEPiOA0Bgp4/LHzcH+gKeSCkbdEh8jg2UV0vICJdS Fea95/vqCbZkjQxSuW8L73CpoACiv4XQ6hoxyIUq7maf+W89rGMVmLsPWYXtmif9 FV6WM3kSpg4hoC1cbqGW5g1bnpMnSPlznm74mKtdGhF+3zEtlm9+j8m53362YQHc 0Y9D+4KAeee5QUT/NII5QBRvSG2rAuv5+sayMNayix0pCJLEGrRLp/7LJOyhvJLN eDdywE+svfcQAi4iGAylrmvDfgf6pBgysyY/pv2YD9IpdpYL5mkVqLi+ADZdZBOb M4uxBReowgC/RaWxB+qEvfg5AxWmfg4uCtAl48Z/Jv/uYR9d9jeHAlbuV2xPfnk= =wRB5 -----END PGP SIGNATURE-----