Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: .format won't display my value with 2 decimal places: Why? Date: Tue, 26 Jan 2016 04:48:36 +1100 Lines: 17 Message-ID: References: <56A1B69F.3040300@gmail.com> <1453743169.404634.502055130.69AAD060@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de PTu5Erc8ji/JOeFf1yZQRgb+hkSiZGkoDUp/U5jdKVUA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'differently.': 0.09; 'parameter.': 0.09; 'subject:Why': 0.09; 'translations': 0.09; 'jan': 0.11; 'ignore': 0.14; 'languages,': 0.15; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'translation': 0.16; 'string': 0.17; 'flexibility': 0.18; 'all,': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'saying': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'sense': 0.26; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'does,': 0.29; "i'm": 0.30; 'fixed': 0.31; 'maybe': 0.33; 'tue,': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'lines': 0.36; 'received:209.85': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'two': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'sure': 0.39; 'build': 0.40; 'subject:with': 0.40; 'still': 0.40; 'some': 0.40; 'different': 0.63; 'situation': 0.67; 'choose': 0.68; '26,': 0.72; '(is': 0.84; 'chrisa': 0.84; 'subject:value': 0.84; 'to:none': 0.91; 'carries': 0.91; 'spell': 0.91 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:cc :content-type; bh=9xTknl3QX1C8jC5bwhUUc3d3v+53qUgY/bIDhQiprGE=; b=tVdJB7HjhIANaE4W/+5vmJfnFRg/+SOR++SVoPTD55Ix6J5YaVGJ8K7dflDHQQER6U XyBKRJ2EoFZevX0vuP8nucIyEhPj/1b3/7geYyw2bMVzt+drqgr8CyU2B+BGKf9SEgYU OZH8cOHRsayyPo5GZ9wzI8mOUGpgMQV8aWUPXwkFXQo18h9Sj7avNPRdpINe4PqDeC51 2xBugyDqNGLHaQ7aUQPl0k63iBPx05AK2LHBc5zFBrYzBZYOuBpYsuR6bVmEd46MJV69 bhkcjzAKLX5rt/SIM0ezqQsRP3zpBHW6NAWEDuresnCGAeKvBCxlZPFIcHusELh9u2TN rwNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-type; bh=9xTknl3QX1C8jC5bwhUUc3d3v+53qUgY/bIDhQiprGE=; b=YgZpFlMyVYOymzlTtpCkpudsD38xpFljXG5ggAv+P3lbdtuQxD1IxTS2d7BpxqMlu6 8WP2kyoUXXNL2VJWo2kg1svZoWfjGceUI6/pXJ5nD0OfSpBdqDfShpcMs0W0YQeLHHcp n5qCE14jHbMrqbRU7EkMcPwwmXbSEsfQjHwqPOGJ4CwJDcMKlOfDe+J3Gt5AI4RVvEHj 3tZynw6+iHj3dDlIsWX7w+9yUDcXYPoRd2MFutEZvxaOOaMY/sZ5SL5ReVGWkEnrDcCk rsYccoQ2N4UQFFatREfXr6T4NgNPCjsAQ+Oct8hNs6/1ekpr66Ond4WWUa33p60UcANg PzPw== X-Gm-Message-State: AG10YORfr7a+ITxhGUvj+hD7k2d99Q/opxvuLXU6Wxk1sgO7epSRULL3j8UGURrqDhvuwYvmotYtQYhMsj/0YQ== X-Received: by 10.50.111.169 with SMTP id ij9mr19113835igb.92.1453744116560; Mon, 25 Jan 2016 09:48:36 -0800 (PST) In-Reply-To: <1453743169.404634.502055130.69AAD060@webmail.messagingengine.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102102 On Tue, Jan 26, 2016 at 4:32 AM, Random832 wrote: > On Mon, Jan 25, 2016, at 12:23, Chris Angelico wrote: >> if some translations don't use a token at all, > > I'm not sure what situation that would be reasonable in. I don't do much with different human languages, but it's possible that you might build up a message in a variety of different ways, and include tokens differently. Maybe you'd include a product name in two different places, and each translation would get to choose which of the lines includes it. Maybe there's a fixed string that carries the sense of what you're saying better than the parameterized one does, so you ignore the parameter. It's the same flexibility as reordering tokens, but some tokens get reordered to nowhere. (Is it still a teleportation spell when the destination is oblivion? -- Venser) ChrisA