Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'string': 0.09; 'msg': 0.09; 'separating': 0.09; 'strings.': 0.09; 'subject:question': 0.10; 'developer': 0.10; 'wrote': 0.14; '23,': 0.16; 'files.': 0.16; 'language': 0.16; 'wrote:': 0.18; 'translated': 0.19; 'written': 0.21; 'separate': 0.22; 'header:User-Agent:1': 0.23; 'config': 0.24; 'source': 0.25; 'possibly': 0.26; 'skip:_ 20': 0.27; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'bunch': 0.31; 'probably': 0.32; 'actual': 0.34; 'johnson': 0.35; 'located': 0.36; 'done': 0.36; 'should': 0.36; 'being': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'expression': 0.60; "you're": 0.61; 'costs': 0.63; 'more': 0.64; 'close': 0.67; 'received:74.208': 0.68; 'received:74.208.4.194': 0.84; 'rick': 0.93; '2013': 0.98 Date: Sat, 22 Jun 2013 19:28:52 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: python-list@python.org Subject: Re: n00b question on spacing References: <51C4D2FF.8000709@digipen.edu> <51870913-c348-4807-bc25-aa7c8fbf0001@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:+YxTn4LMTg3lbm0eWKziMBpjej9E4xxgD2L8Yh/LFr7 ImwOzypy3N9V5QoCvMZx696EPARi+mEQf3dQbtacfO/LseLGHs VEQIHSI7W/IzWQdspjMhK93BFbtHeL5jbzimyt3BAVja1yqz4k CfYVTDLKFP6S32qlT89+hswtjFXQqfwQ0b0dZa2FAWgeLt/xu9 UJqopOTCXy531tVe5HR0Cp13tZ7Gc5BEDB9+YtbVr2DU8MD/iH cyCg211r0xBa46fow0HTophxfQmG492qcb08M01R+Gdxxye2+l p8PBxCky+gEDxOOTP9T73n7nR2kIryhEZo2ffVy6/RGeOuG5wR H84VVIhuJ+UtFKL8UAKo= 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371943746 news.xs4all.nl 15902 [2001:888:2000:d::a6]:34041 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48953 On 06/22/2013 07:12 PM, Chris Angelico wrote: > On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson > wrote: >> _fmtstr = "Item wrote to MongoDB database {0}, {1}" >> msg = _fmtstr.format(_arg1, _arg2) > > As a general rule, I don't like separating format strings and their > arguments. That's one of the more annoying costs of i18n. Keep them in > a single expression if you possibly can. > On the contrary, i18n should be done with config files. The format string is the key to the actual string which is located in the file/dict. Otherwise you're shipping separate source files for each language -- blecch. The program that's intended to be internationalized is written using "programmereze" strings. That's a strange inhuman language that's only approximately comprehensible by the developer and close associates. Then that gets translated into a bunch of language-specific config files, with English probably being one of them. -- DaveA