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!feed.xsnews.nl!border-1.ams.xsnews.nl!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.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.012 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'content- type:multipart/signed': 0.09; 'filename:fname piece:signature': 0.09; '%r"': 0.16; "'bout": 0.16; '(1,': 0.16; 'content- type:application/pgp-signature': 0.16; 'filename:fname piece:asc': 0.16; 'filename:fname:signature.asc': 0.16; 'subject:vs.': 0.16; 'thinking.': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'header:In-Reply- To:1': 0.22; 'code': 0.25; 'print': 0.29; 'correct': 0.29; 'thanks': 0.31; 'version': 0.32; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.34; 'but': 0.37; 'received:128': 0.37; 'received:10.0.0': 0.38; 'to:addr:python.org': 0.40; 'your': 0.61; 'show': 0.67; 'response.': 0.67 Date: Sat, 31 Dec 2011 13:47:02 -0500 From: Evan Driscoll User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: .format vs. % References: <5642862.375.1325355574622.JavaMail.geo-discussion-forums@vbbhx10> <3779937.289.1325357048110.JavaMail.geo-discussion-forums@vbtv37> In-Reply-To: <3779937.289.1325357048110.JavaMail.geo-discussion-forums@vbtv37> X-Enigmail-Version: 1.3.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig754201003B1262A827E083E3" 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: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325357753 news.xs4all.nl 6988 [2001:888:2000:d::a6]:35249 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18265 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig754201003B1262A827E083E3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable How 'bout just: >>> s =3D "{0} {1} {2} {3}" >>> s.format(1, 2, 3, 4) '1 2 3 4' Evan On 12/31/2011 13:44, davidfx wrote: > Thanks for your response. I know the following code is not going to be= correct but I want to show you what I was thinking. > > formatter =3D "%r %r %r %r" > > print formatter % (1, 2, 3, 4) > > What is the .format version of this concept? > --------------enig754201003B1262A827E083E3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJO/1iuAAoJEAOzoR8eZTzg4jIH/3pDVFzuwDrMG7A0vojG1B8H oGxhRb/5lGlpGxIQIU68+isGiO+WFnkCRBhIJYtemEuMyGHqcSBYTH5MwNZ4Gfl3 Spy4MmOamIR4YzXj3/cR/8LNft0e8ZK4aOiOlmpFcGdSV/PDjPhaBlkzEhm+aHQC y6ZMTXd7BiH18ERX2bkZGPF6O+9Sij5aVKyKSkEbH6eV89E/Sy06jEVI0lUeK8xj +iTJBT4PCHhcIfhQEGLM7hzKQVqrI1z8IlJaMFrzolMRKy6hRtbEz80UwStMTPwc /dqfG10p5ovvWjk1oaT1UMRtgymn8N1jC4gPecoq/kPuovqkZZnRDoE2CqieUes= =0YDi -----END PGP SIGNATURE----- --------------enig754201003B1262A827E083E3--