Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Ben Finney Newsgroups: comp.lang.python Subject: Re: raise None Date: Fri, 01 Jan 2016 07:18:21 +1100 Lines: 23 Message-ID: References: <56847239$0$1590$c3e8da3$5496439d@news.astraweb.com> <5684842a$0$1596$c3e8da3$5496439d@news.astraweb.com> <5684aa1a$0$1602$c3e8da3$5496439d@news.astraweb.com> <56854b49$0$1615$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de hypCPAK/LF+T74ReS+eA+gabBhXuT5wDypHsSfI/sErA== Cancel-Lock: sha1:g51YTp25Vz3wHkPq1GqQBXZh2Uw= 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; 'feature.': 0.07; 'benjamin': 0.09; 'indicates': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'splitting': 0.09; 'subject:None': 0.09; '+1.': 0.16; 'advocating': 0.16; 'inability': 0.16; 'raises.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; "steve's": 0.16; 'writer': 0.16; 'debugging': 0.18; 'library': 0.20; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'figure': 0.27; 'actual': 0.28; 'obscure': 0.29; "i'm": 0.30; 'code': 0.30; 'knows': 0.32; "he's": 0.33; 'hopefully': 0.33; 'steven': 0.33; 'traceback': 0.33; 'desirable': 0.35; 'tasks': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'someone': 0.38; 'to:addr:python.org': 0.40; 'your': 0.60; 'decision': 0.61; 'information': 0.63; 'between': 0.65; '_o__)': 0.84; 'mencken': 0.84; 'oscar': 0.84; 'received:125': 0.84; '\xe2\x80\x94henry': 0.84; 'difficult,': 0.91; 'technique': 0.93 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) 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:101080 Oscar Benjamin writes: > Exactly. The critical technique is looking at the traceback and > splitting it between what's your code and what's someone else's. > Hopefully you don't need to look at steves_library.py to figure out > what you did wrong. However if you do need to look at Steve's code > you're now stumped because he's hidden the actual line that raises. +1. As best I can tell, Steven is advocating a way to obscure information from the traceback, on the assumption the writer of a library knows that I don't want to see it. Given how very often such decisions make my debugging tasks needlessly difficult, I'm not seeing how that's a desirable feature. -- \ “Firmness in decision is often merely a form of stupidity. It | `\ indicates an inability to think the same thing out twice.” | _o__) —Henry L. Mencken | Ben Finney