Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'formatting': 0.07; 'method,': 0.07; 'referring': 0.07; 'strings.': 0.07; 'python': 0.09; '22,': 0.09; 'compact': 0.09; 'other)': 0.09; 'pep': 0.09; 'underlying': 0.09; "(i'm": 0.16; 'advantage.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'handling.': 0.16; 'notice;': 0.16; 'sees': 0.16; 'string': 0.17; 'wrote:': 0.17; 'exists': 0.17; 'thu,': 0.17; 'unicode': 0.17; 'received:209.85.214.174': 0.21; "python's": 0.23; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'handling': 0.27; 'in.': 0.27; 'message-id:@mail.gmail.com': 0.27; 'rest': 0.28; 'chris': 0.28; 'finds': 0.29; 'lies': 0.29; "i'm": 0.29; 'function': 0.30; 'on,': 0.30; 'problem': 0.33; 'to:addr:python- list': 0.33; 'languages': 0.33; 'version': 0.34; 'received:google.com': 0.34; 'nov': 0.35; 'said,': 0.35; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'sure': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'world': 0.63; 'more': 0.63; 'hang': 0.65; 'absolutely': 0.84; '4:00': 0.84; 'expressive': 0.84; 'glad': 0.86; 'hand,': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=WZ/gh3c09BdJUPp7nqnK4Qf6ZjCGf6fu8RjcjmYwLI8=; b=A5kaWOgVmwFC/1bnFYAWKYvaiUA7MZLzbFRpyFvJ9Tejw7hpClqdoOF1RW6AShw4Q6 REdvjmq3GzmeH4H7c2MP5Gq6sZOxGDCJ2up3CKPObgIsA0GNkrfvOabEwQrSGF5Qer/m umGll5DHOb8RMAftHIszS+DI645Ay8jSl9LxSv5NDoFEx9MgQPw93oQ4DirhHNez1JGC uDrM0arVgxbzMgBlFX2/XEEH2+p8xXWBH3PsYgHcJNiXiNiEWLmbO5kYt4imLZJIgjZf YPNCI4y+DGcTmYxOcu9xrivo0qlBqLAJBiSSjd7lIKAPaWNY9OGHR0+Y7/7Pwwwc2ZsI NMuA== MIME-Version: 1.0 In-Reply-To: <50AD0962.5080002@ncf.ca> References: <31a82817-8c9b-4dd2-a468-89d8d081fd1b@googlegroups.com> <50AD0962.5080002@ncf.ca> Date: Thu, 22 Nov 2012 09:17:30 +1100 Subject: Re: Yet another Python textbook 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.15 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1353536254 news.xs4all.nl 6843 [2001:888:2000:d::a6]:48621 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:33774 On Thu, Nov 22, 2012 at 4:03 AM, Colin J. Williams wrote: > On 20/11/2012 4:00 PM, Chris Angelico wrote: >> To the OP: jmf has an unnatural hatred of Python 3.3 and PEP 393 >> strings. Take no notice; the rest of the world sees this as a huge >> advantage. Python is now in a VERY small group of languages (I'm aware >> of just one other) that have absolutely proper Unicode handling *and* >> efficient string handling. >> >> ChrisA >> > It's interesting to see that someone else finds the format function to be a > pain. Perhaps the problem lies with the documentation. Hang on, what? I'm not sure where the format function comes in. I was referring to the underlying representation. That said, though, I'm just glad that %-formatting is staying. It's an extremely expressive string formatting method, and exists in many languages (thanks to C's heritage). Pike's version is insanely powerful, Python's is more like C's, but all three are compact and convenient. str.format(), on the other hand, is flexible. It strikes me as rather more complicated than a string formatting function needs to be, but that may be a cost of its flexibility. ChrisA