Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!rt.uk.eu.org!news-transit.tcx.org.uk!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.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'operator': 0.04; 'python': 0.08; 'php,': 0.09; 'received:209.85.210.174': 0.13; 'received :mail-iy0-f174.google.com': 0.13; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:vs.': 0.16; 'wrote:': 0.18; 'jan': 0.19; 'header:In-Reply-To:1': 0.22; 'string': 0.24; 'stefan': 0.24; 'code': 0.25; 'message-id:@mail.gmail.com': 0.28; 'pm,': 0.29; 'tue,': 0.32; 'people,': 0.32; 'to:addr:python-list': 0.34; 'languages': 0.35; 'similar': 0.36; 'but': 0.37; 'received:google.com': 0.37; "there's": 0.37; 'using': 0.38; 'received:209.85': 0.38; 'else': 0.39; "it's": 0.40; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'huge': 0.61; 'more': 0.61; '2012': 0.67; 'instantly': 0.67; '10:47': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WMmFuzkRz3swuhXEjnF7n2s6wfsqwM+Nxqwm5S5UE3g=; b=QO2Dw76ZjafHvR/S5OuP46Yf1gIO+nqt2th2lSiSqX1NHHweVBGhr9UHv8vNdgevFi oRHlA7k9gRuv5dN1wJM8ad5eNgw1UmZaSdAivuW4Gf0rnrJ0tQK04tJDoDV/FIzpuRne /3LIxb6oa/UzPHkyvd0ynkSc6BwML147UtTvw= MIME-Version: 1.0 In-Reply-To: <20120103114716.GA24859@sleipnir.bytereef.org> References: <5642862.375.1325355574622.JavaMail.geo-discussion-forums@vbbhx10> <4EFF559E.1050408@gmail.com> <4f027b79$0$29880$c3e8da3$5496439d@news.astraweb.com> <4F02DE94.8000506@gmail.com> <20120103114716.GA24859@sleipnir.bytereef.org> Date: Wed, 4 Jan 2012 00:04:31 +1100 Subject: Re: .format vs. % From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 1325595875 news.xs4all.nl 6865 [2001:888:2000:d::a6]:58272 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18401 On Tue, Jan 3, 2012 at 10:47 PM, Stefan Krah wrote: > For me the %-style is much more readable. It's also very similar to C's printf, which means it's similar to everything else that's similar to printf. That makes it instantly grokkable to many many people, which is a Good Thing. It's like using the + operator for string concatenation - there's no requirement to do so, and not all languages do (REXX, PHP, and SQL come to mind); but supporting the "obvious thing" gives a huge slab of potential Python users the chance to understand and write code with one less trip to the documentation. ChrisA