define

Bengt Richter bokr at oz.net
Mon May 12 12:19:28 EDT 2003


On Mon, 12 May 2003 09:21:30 -0600, "Daniel Fackrell" <unlearned at DELETETHIS.learn2think.org> wrote:

>"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?
>
Hm, ...

    (a, b, c, sign) = self.(a, b, c, sign)
    self.y = (-b + sign*sqrt(b**2 - 4.0*a*c))/2.0*a

??


Regards,
Bengt Richter




More information about the Python-list mailing list