Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '2.7': 0.04; 'specifying': 0.07; 'python': 0.08; '>>>>': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:gator410.hostgator.com': 0.09; 'subject:string': 0.09; 'valueerror:': 0.09; '~ethan~': 0.09; 'wrote:': 0.14; 'captured': 0.16; 'received:72.11': 0.16; 'received:72.11.125': 0.16; 'received:72.11.125.166': 0.16; 'subject:formatting': 0.16; 'cc:addr:python-list': 0.17; 'to:2**1': 0.20; 'header:In-Reply- To:1': 0.21; 'cc:2**0': 0.22; 'cc:addr:python.org': 0.30; 'print': 0.31; 'header:User-Agent:1': 0.35; 'skip:{ 10': 0.35; 'subject:new': 0.37; 'subject:: ': 0.38; 'subject:with': 0.39; 'format': 0.40; 'received:websitewelcome.com': 0.67; 'python2.7': 0.84; 'subject:local': 0.84 Date: Mon, 06 Jun 2011 14:07:46 -0700 From: Ethan Furman User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: "Prasad, Ramit" Subject: Re: new string formatting with local variables References: <4DED2320.7050708@stoneleaf.us> <0604E20B5F6F2F4784C9C8C71C5DD4DD2E349F5BD7@EMARC112VS01.exchad.jpmchase.net> In-Reply-To: <0604E20B5F6F2F4784C9C8C71C5DD4DD2E349F5BD7@EMARC112VS01.exchad.jpmchase.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: mail.admailinc.com ([192.168.10.136]) [72.11.125.166]:1249 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== Cc: "'python-list@python.org'" 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: 11 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307393682 news.xs4all.nl 49042 [::ffff:82.94.164.166]:36593 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7109 Prasad, Ramit wrote: >> print "{} was captured by {}".format(solo, jabba) > Is this Python2.7 specific? > > Python 2.6.x : >>>> print "{} was captured by {}".format('t1', 't2') > ValueError: zero length field name in format Apparently it is 2.7 and greater -- my apologies for not specifying that. ~Ethan~