Path: csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(except': 0.05; 'strings.': 0.07; 'subject:Error': 0.07; 'throw': 0.09; 'stored': 0.10; 'wed,': 0.15; '(source': 0.16; 'centralized': 0.16; 'grepping': 0.16; 'stored?': 0.16; 'wrote:': 0.16; 'variable': 0.18; '2015': 0.20; 'arguments': 0.22; 'exceptions': 0.22; 'sep': 0.22; "python's": 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'error': 0.27; 'question': 0.27; 'message- id:@mail.gmail.com': 0.27; 'turns': 0.27; 'curve': 0.29; 'code': 0.30; 'source': 0.33; 'url:python': 0.33; 'grateful': 0.33; 'file': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'url:org': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'mean': 0.38; 'to:addr:python.org': 0.40; 'where': 0.40; 'deals': 0.67; 'anywhere.': 0.84; 'subject:Location': 0.84; 'to:name:python': 0.84; 'url:cpython': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=h9P0w6gPo1n9LWd86qvkC3DOyL8vt4o6aRwXyo1t3/4=; b=ESdXEJheqtRnTSL17uUDQkzHGBZIfyCCTfUTN39EWy5kjjxTelrJF7f+1Rhxm4YVaz yJ7ao/WfHu7fGQxgNdgNy9shmW/zUFxWzDlpZKJ0QNUW2WtnMT3jr9dp18R1FCiDbBXu o8ajwnhpnHkSzsf2D5Ubv5eMGRdRBTKAiLhctLUi6U4nFLR1zSn897zCildU4yscvWLk mwljokZscdizVmKtyVbAeY+p+Rt/HoOtkPO9KBIU7cwO8wicnLBxDAdM/+BatxVoUTAM KJ1NPXkRN0ebnCMHzZi+SlY1emk7RcSrpDAwCw5GTReb/udPUx2uWRrDoy+jJD4N3NJv 6oyQ== X-Received: by 10.170.212.195 with SMTP id d186mr6676121ykf.124.1441229065473; Wed, 02 Sep 2015 14:24:25 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1331973293.1064548.1441222230547.JavaMail.ngmail@webmail12.arcor-online.net> References: <1331973293.1064548.1441222230547.JavaMail.ngmail@webmail12.arcor-online.net> From: Ian Kelly Date: Wed, 2 Sep 2015 15:23:46 -0600 Subject: Re: Location of an Error Message To: Python Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441229073 news.xs4all.nl 23734 [2001:888:2000:d::a6]:38619 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95898 On Wed, Sep 2, 2015 at 1:30 PM, wrote: > Where are the error messages stored? E. g., in which (source code) file i= s the message "NameError: name 'sdfe' is not defined" stored (except for va= riable arguments like "sdfe")? I do know that I can throw exceptions for my= self, but this question came to my mind in thinking about translating the e= rror messages to improve Python's learning curve for newbies. Grepping the source turns up this: https://hg.python.org/cpython/file/tip/Python/ceval.c#l150 > Additionally, I would be grateful if you would give to me the file name (= e. g. in hg.python.org) which is the Interpreter's first piece of source co= de which deals with the error strings. What do you mean by "first"? I don't think the error messages are centralized anywhere.