> 
> 
> Check the two alternatives:
> 
> def f(x):
>     y = x*x
>     return sin(y) + cos(y)
> 
> 44 key presses, including tabs and newlines and a blank line after the
> function, but excluding counting the shift key separately.
> 
> lambda x: (lambda y: sin(y) + cos(y))(x*x)
> 
> 42 key presses.
> 
> Apart from the extremely minor issue of "namespace pollution", I think
> that speaks for itself.

and now I've only 60 lines on my screen,
so what about

   def f(x): y = x*x; return sin(y)+cos(y);

cheers,
Stef Mientki
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to