define
Daniel Fackrell
unlearned at DELETETHIS.learn2think.org
Mon May 12 11:21:30 EDT 2003
"Bengt Richter" <bokr at oz.net> wrote in message
news:b9j286$74l$0 at 216.39.172.122...
> Ok, let's do the whole deal ;-)
>
> b = self.b
> sign = self.sign
> a = self.a
> c = self.c
> y = (-b + sign*sqrt(b**2 - 4.0*a*c))/2.0*a
> self.y = y
> vs
> with self ~ sqrt:
> y = (-b + sign*sqrt(b**2 - 4.0*a*c))/2.0*a
I would probably write the former as:
(a, b, c, sign) = (self.a, self.b, self.c, self.sign)
self.y = (-b + sign*sqrt(b**2 - 4.0*a*c))/2.0*a
Maybe the present request could be satisfied by finding a way to simplify
the compound assignment?
--
Daniel Fackrell (newsgroups.NOSPAM at dfackrell.mailshell.com)
When we attempt the impossible, we can experience true growth.
More information about the Python-list
mailing list