what's wrong with "lambda x : print x/60,x%60"

bonono at gmail.com bonono at gmail.com
Tue Dec 6 04:12:02 EST 2005


Paul Rubin wrote:
> bonono at gmail.com writes:
> > I think there is, for python. Not that I agree with it. The language
> > doesn't prevent you from using the short one-liner style but the idioms
> > prefer the line by line(and one single op/action per line) style.
>
> Are you serious?!!  You're saying idiomatic Python prefers
>
>      temp1 = a + b
>      temp2 = c * d
>      temp3 = temp1 + temp2
>      x = temp3 + e
>
> to
>
>      x = a + b + (c * d) + e
>
> ???!!!
>
> I don't think you look at the same Python code I do ;-).

Not for this particular example, but that is the impression I get, I
said the "form/style". Especially when we are talking about
reduce/map/filter vs explicit for loop.




More information about the Python-list mailing list