dividing tuple elements with an int or float
castironpi at gmail.com
castironpi at gmail.com
Sat Mar 22 03:23:32 EDT 2008
On Mar 21, 1:08 pm, Gabriel Genellina <gagsl-... at yahoo.com.ar> wrote:
> Sane programmers replace that crazyness with this code:
>
> tuple(x+1 for x in y)
>
> Sane programmers -like D'Aprano, Jerry Hill and me- replace that
> crazyness with this code:
>
> tuple(x/2.5 for x in y)
>
> Sane programmers don't write such semi-functional things (unless it
> helps expressing the problem in certain domains).
> I now think that deprecating map, lambda & Co. was a good thing after
> all.
If you write it that way the first time, you need therapy. Actually,
at this point, I (for one, personally) want to investigate 'certain
domains'. Tell me it's really bad at everything or what it's good
at. What can I respect about it?
More information about the Python-list
mailing list