More on "with" statement

Alex Martelli aleaxit at yahoo.com
Sat Jul 14 02:50:30 EDT 2001


"Erik Max Francis" <max at alcyone.com> wrote in message
news:3B4FD2AC.BF2F9AD6 at alcyone.com...
> Roman Suzi wrote:
>
> > Programmers must be lazy to some degree. So, they tend to write
> >
> > a*(b+c+d+e)
> >
> > instead of
> >
> > a*b+a*c+a*d+a*e
>
> That's just plain more efficient.  Four additions and one multiply
> instead of three additions and four multiplies.

I think it's _three_ addition and one multiply in the former case.


Alex






More information about the Python-list mailing list