Numeric root-finding in Python

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Feb 20 21:21:38 EST 2012


On 21/02/2012 01:33, David Monaghan wrote:
> On Sun, 12 Feb 2012 10:20:17 -0500, inq1ltd<inq1ltd at inqvista.com>  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.




More information about the Python-list mailing list