Posted 2006-08-10 03:54:03 by
To those complaining about the planned removal of
reduce() from Python, I have four lines of code for you:
def reduce(func, seq):
result = seq
for elem in seq[1:]: result = func(result, elem)
lambda is a bit harder to replace, admittedly, but I don't think naming your one-off functions is too egregious a requirement.