Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'wed,': 0.03; 'ugly': 0.09; 'am,': 0.14; 'wrote:': 0.14; 'angelico': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'obscure': 0.16; 'wrap': 0.19; 'header:In-Reply-To:1': 0.21; 'literal': 0.23; 'received:209.85.210.174': 0.23; 'received:mail- iy0-f174.google.com': 0.23; 'message-id:@mail.gmail.com': 0.28; 'looks': 0.31; 'to:addr:python-list': 0.33; 'rather': 0.34; 'chris': 0.34; 'function.': 0.35; 'probably': 0.36; 'received:google.com': 0.37; 'received:209.85': 0.37; 'pretty': 0.37; 'put': 0.37; 'subject:: ': 0.38; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'kind': 0.60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=8wIaEL/OEeMOQP3x3eo18oX4wn0AUdrzRDc5iXhMaG8=; b=T/B3PubESAlks/pRBXDOeOEBrwzshW9pJGErY5sKSKzTyWCcQgXBWuY80iTHMMBgaL nyXT0qkYg0PYgxLsaSCUbBTLFIQouFWkyT6X+E+tV7gtdHqqzh4XjIfd2xZHefXYx6+U wgIQx3gtxG753D9v/hdO2ZoQ0/vGX0FRQkK+U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=a3sly6Z2ByZBu0Df6LUYQD4V8OC1tTa9FTTieqIAIKlN3fcPViUScI9hU+g1rSmIj1 hDGz8eR+RqkVdpS7gr7bADm8/b4rxfNqlrQey6ZoF8DTQ8yZ8XovVs0CACeJ8nRrkWAE WotXiK78C6dMYdF5hrbuuspbL7VdN+sEhJZ3s= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 8 Jun 2011 09:26:40 +1000 Subject: Re: Dynamic Zero Padding. From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 15 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1307489204 news.xs4all.nl 49039 [::ffff:82.94.164.166]:53394 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7201 On Wed, Jun 8, 2011 at 7:43 AM, Mel wrote: > :) > > ('%%0%dd' % (pads,)) % (n,) > > Probably be good to wrap it in a function. =A0It looks kind of obscure as= it > is. Would get rather pretty (read: ugly and impossible to read) if you wanted to put a literal percent sign in front of the number. :) Chris Angelico