To give this old horse a kick: The "given" syntax in the recent thread could give a nice solution for the problem that started this thread.
Instead of my proposal of:
smooth_signal = [average := (1-decay)*average + decay*x for x in signal from average=0.]
We could use given for both the in-loop variable update and the variable initialization:
smooth_signal = [average given average=(1-decay)*average + decay*x for x in signal] given average=0.
This especially makes sense for the extended syntax, where my proposal of:
(z, y := f(z, x) -> y for x in iter_x from z=initial_z)
(y given z, y = f(z, x) for x in iter_x) given z=initial_z
So in stead of adding 2 symbols and a keyword, we just need to add the one "given" keyword.
It's worth noting, as Serhiy pointed out, that this is already supported in python, albeit with a very clunky syntax:
smooth_signal = [average for average in  for x in signal for average in [(1-decay)*average + decay*x]]
(y for z in [initial_z] for x in iter_x for z, y in [f(z, x)])