Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.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.014 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'am,': 0.12; '%r"': 0.16; '(1,': 0.16; 'repr': 0.16; 'subject:vs.': 0.16; 'thinking.': 0.16; 'wrote:': 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; 'header:X-Complaints-To:1': 0.33; 'to:addr:python-list': 0.34; 'received:au': 0.36; 'but': 0.37; 'think': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.40; 'your': 0.61; 'show': 0.67; 'response.': 0.67; '05:44': 0.84; 'anymore,': 0.95; 'received:110': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Lie Ryan Subject: Re: .format vs. % Date: Sun, 01 Jan 2012 06:34:45 +1100 References: <5642862.375.1325355574622.JavaMail.geo-discussion-forums@vbbhx10> <3779937.289.1325357048110.JavaMail.geo-discussion-forums@vbtv37> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 110-175-240-90.static.tpgi.com.au User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 In-Reply-To: <3779937.289.1325357048110.JavaMail.geo-discussion-forums@vbtv37> 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: 13 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325360101 news.xs4all.nl 6977 [2001:888:2000:d::a6]:37665 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18272 On 01/01/2012 05:44 AM, 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? > I don't think the (%r)epr-formatting exist anymore, so if you want to do that you'll need to call repr manually.