Re: c[:]()
In <1180886141.096 451.68060@k79g2 000hse.googlegr oups.com>,
Stebanoid@gmail .com wrote:
>And has the same issue as a list comprehension if all you want is the side
>effect of the calls: a useless temporary list full of `None`\s is build.
>
functoins can return a values, and you get it. I don't think that it
is bad side effect.
I don't either. By definition it's not a side effect at all. Side effects
are the "things that happen" besides the return values.
Warren Stringer wanted to call the functions just for the side effects
without interest in the return values. So building a list of return
values which is immediately thrown away is a waste of time and memory.
No, the side effect is the printing of 'From Russia with love.'
IMHO there's a difference between this single `None` that can't be
prevented and abusing a list comprehension or `map()` just for side
effects and not for building a list with meaningful content.
Ciao,
Marc 'BlackJack' Rintsch
In <1180886141.096 451.68060@k79g2 000hse.googlegr oups.com>,
Stebanoid@gmail .com wrote:
>>[using `map()`]
>effect of the calls: a useless temporary list full of `None`\s is build.
functoins can return a values, and you get it. I don't think that it
is bad side effect.
are the "things that happen" besides the return values.
Warren Stringer wanted to call the functions just for the side effects
without interest in the return values. So building a list of return
values which is immediately thrown away is a waste of time and memory.
When you write simple
you have side effect too - returning "None".
>>>def a(): print "From Russia with love."
>>>a()
>>>a()
IMHO there's a difference between this single `None` that can't be
prevented and abusing a list comprehension or `map()` just for side
effects and not for building a list with meaningful content.
Ciao,
Marc 'BlackJack' Rintsch
Comment