Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-transit.tcx.org.uk!rt.uk.eu.org!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.042 X-Spam-Evidence: '*H*': 0.92; '*S*': 0.00; 'message-id:@web.de': 0.09; '%r"': 0.16; '(1,': 0.16; 'received:10.249': 0.16; 'subject:vs.': 0.16; 'thinking.': 0.16; 'upset': 0.16; 'very,': 0.16; 'wrote:': 0.18; 'say,': 0.19; 'stuff': 0.22; 'header:In-Reply-To:1': 0.22; 'formatting': 0.23; 'from:addr:web.de': 0.23; 'removed.': 0.24; 'do,': 0.25; 'code': 0.25; 'print': 0.29; 'correct': 0.29; 'usually': 0.31; 'thanks': 0.31; 'version': 0.32; 'header:User- Agent:1': 0.33; 'to:addr:python-list': 0.34; 'but': 0.37; 'received:de': 0.39; "it's": 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'your': 0.61; 'show': 0.67; 'response.': 0.67; 'hate': 0.73; 'advantages': 0.80; '19:44,': 0.84 Date: Sat, 31 Dec 2011 19:59:19 +0100 From: Alexander Kapps User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 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> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:uhDgR4J1ifKVu7MbofkQG8kwQ3dGZZ/asYS1mPoHozm 4Ul0tedETsFnDQq2zxML9ts74B0HodNuWKDclnTeO3yid5sbQo iXy3fKwc00JWPpivy0bd3NdeLptIlAcP2rGaS+SoSw0JlgMh12 8cyvbhtwk5X7icLHieq8rCELud7HyWSrQIAUvn42h5I3/jzthZ frdApX9XFuXTVxTSnjA+A== 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325358726 news.xs4all.nl 6964 [2001:888:2000:d::a6]:53042 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18268 On 31.12.2011 19: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 = "%r %r %r %r" > > print formatter % (1, 2, 3, 4) > > What is the .format version of this concept? > formatter = "{0} {1} {2} {3}" formatter.format(1,2,3,4) I have to say, I simply hate .format(), and I will be very, very upset if classic formatting will really be removed. I understand that .format() has a lot of advantages for more complex formatting, but for the simple stuff I usually do, it's just terribly inconvenient (try {} on a German keyboard).