Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.01; 'subject:Python': 0.05; 'assert': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'bieber': 0.16; 'syntax': 0.16; 'wrote:': 0.18; 'pointed': 0.21; 'header:In-Reply-To:1': 0.22; 'feb': 0.22; 'math': 0.24; 'code': 0.26; 'problem': 0.29; 'sun,': 0.30; 'error.': 0.32; 'header:User-Agent:1': 0.33; 'header:X-Complaints- To:1': 0.34; 'from:addr:yahoo.co.uk': 0.34; 'lee': 0.34; 'question,': 0.34; 'rather': 0.34; 'probably': 0.35; 'to:addr :python-list': 0.35; 'however,': 0.35; 'david': 0.35; 'received:org': 0.36; 'except': 0.39; 'received:78': 0.40; 'might': 0.40; 'to:addr:python.org': 0.40; 'legal': 0.72; 'dennis': 0.73; 'why?': 0.77; '-0500,': 0.84; 'received:as13285.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Numeric root-finding in Python Date: Tue, 21 Feb 2012 02:21:38 +0000 References: <4f375f0f$0$29986$c3e8da3$5496439d@news.astraweb.com> <11t5k79mo14t3h2lerqurqaa4v4lcf85iv@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-21-111.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: <11t5k79mo14t3h2lerqurqaa4v4lcf85iv@4ax.com> X-Antivirus: avast! (VPS 120220-2, 20/02/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329790881 news.xs4all.nl 6960 [2001:888:2000:d::a6]:42255 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20655 On 21/02/2012 01:33, David Monaghan wrote: > On Sun, 12 Feb 2012 10:20:17 -0500, inq1ltd wrote: > >> >> >> I don't know the first thing about this math problem however, >> >> if I were to code this I might try ; >> >> except ZeroDivisionError: >> assert w = -1 >> >> rather than; >> >> except ZeroDivisionError: >> assert w == -1 > > Why? > > DM Why not is probably a better question, given that Dennis Lee Bieber and Dave Angel have already pointed out that this is not legal Python, it'll give a syntax error. -- Cheers. Mark Lawrence.