Path: csiph.com!usenet.pasdenom.info!aioe.org!news.mb-net.net!news.babsi.de!open-news-network.org!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; 'programmer': 0.03; 'subject:error': 0.03; 'subject:Python': 0.06; 'exception,': 0.09; 'subject:messages': 0.09; 'worse': 0.09; 'yeah,': 0.09; 'python': 0.11; 'language.': 0.14; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'java.': 0.16; 'repr()': 0.16; 'skip:l 110': 0.16; 'str()': 0.16; 'unchanged': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'stack': 0.19; 'user.': 0.19; '(the': 0.22; 'example': 0.22; 'python?': 0.22; 'exists': 0.24; 'string,': 0.24; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'feature': 0.29; 'array': 0.29; 'said,': 0.30; 'then.': 0.30; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'that.': 0.31; 'request,': 0.31; "user's": 0.31; 'text': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'shorter': 0.36; 'method': 0.36; 'shows': 0.36; 'list': 0.37; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'new': 0.61; "you're": 0.61; 'show': 0.63; 'different': 0.65; 'directed': 0.83; 'subject:location': 0.84; 'serious': 0.97; '2013': 0.98 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:content-transfer-encoding; bh=qCFZVZKgsQBAV6Oj6fBPjR8HLAuA5npIhGriTuyU9XA=; b=BdhF2XDeChB2LN14XnsSpGxfG+wzl/elUgYx0+Z/GC2aKK4235GylcLi1/Gbm4XFIp z5x+2KmwgsEDqdD40srPMDb9xPU4c8/Gbw5YgWzDn7q0bdSEDp0xyDFzDIsXso4ekEQ6 bM3QcAK9ZQ//59GGJ/Ho7fuVIW+B+Pm0lB5GkAPFCmi0a3iFBgwF/D32WesGxreNP94o 4JkseW4eYnw0kgLCzIWWLbQzXkRyT0D85ncCZkTVXVNy0aWX5RmWgW6YrXGT8dqbyxPt Tmu/bPgxHL98nXRB5L8i4huisiDzGMVUJ3IwWLVk6NUHNQ+PoiK7glJcrBE7Ck84/D+q Ke5g== MIME-Version: 1.0 X-Received: by 10.52.65.238 with SMTP id a14mr14289303vdt.24.1369729075002; Tue, 28 May 2013 01:17:55 -0700 (PDT) In-Reply-To: References: <20130527061154.GA3301@cskk.homeip.net> Date: Tue, 28 May 2013 18:17:54 +1000 Subject: Re: Python error codes and messages location 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.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: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369729084 news.xs4all.nl 15911 [2001:888:2000:d::a6]:42775 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46266 On Tue, May 28, 2013 at 6:10 PM, F=E1bio Santos = wrote: > Just to clarify, I am suggesting to have the unchanged messages in > tracebacks, but having some methods in the exception to get the exception > and message localised. Just like repr() and str() are directed at differe= nt > audiences (the programmer vs. The user), so is a traceback vs a message b= ox. There's no particular reason for that to be a method on the exception, then. You're just asking to localize a text string, and I think that functionality already exists someplace :) > OpenERP for example shows stack traces to the user. It could show a short= er > message in the user's language. Sounds like an OpenERP feature request, then. > On 28 May 2013 08:19, "Chris Angelico" wrote: >> Can we internationalize English instead of localizing Python? >> > > That is worse than saying, "why don't we all just code in python?". Or c.= Or > java. Or JavaScript. > > Let's not get into that. I prefer len() to new > LengthCalculatorFactoryBuilder().createLengthCalculatorFactory().createLe= ngthCalculator().calculateLengthOf(). > And a good old Python list or JavaScript array to a collection of segfaul= ts. Yeah, like I said, that wasn't a serious suggestion :) ChrisA