On 04/05/2018 03:24 PM, Peter O'Connor wrote:
Well, whether you factor out the loop-function is a separate issue. Lets say
we do:
smooth_signal = [average = compute_avg(average, x) for x in signal from
average=0]
Is just as readable and maintainable as your expanded version, but saves 4
lines of code. What's not to love?
It is not readable and it is not Python (and hopefully never will be).
--
~Ethan~
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/