[Python-ideas] Proposal: A Reduce-Map Comprehension and a "last" builtin
Ethan Furman
ethan at stoneleaf.us
Thu Apr 5 20:31:41 EDT 2018
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~
More information about the Python-ideas
mailing list