--- "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> The elegance of that solution very much depends on
> the cost of the duplicate
> operation vs. the additional function call.
>
> And for the usecase at hand, that's exactly the
> point not to do it:
>
> [EMAIL PROTECTED]:/tmp$ python -m timeit '(lambda x:
> lambda y: y+y)(10 *
> 10)'
> 1000000 loops, best of 3: 1.04 usec per loop
> [EMAIL PROTECTED]:/tmp$ python -m timeit 'lambda: 10
> * 10 + 10 * 10'
> 1000000 loops, best of 3: 0.336 usec per loop
>
Good point. I also realized as I was slowly waking up
later in the morning that the trigonometry didn't make
a whole lot of sense either.
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news,
photos & more.
http://mobile.yahoo.com/go?refer=1GNXIC
--
http://mail.python.org/mailman/listinfo/python-list