reduce(func, seq, initial=0)
10 Oct
2014
10 Oct
'14
3:11 a.m.
Hi folk, I stumbled upon the builtin reduce function. It has an optional parameter initial, however if trying to set it like import operator as op reduce(op.add, range(10), initial=0) I get TypeError: reduce() takes no keyword arguments I think it would be really straightforward to also add keyword possibilities, at least to the parameter initial. What do you think? best, Stephan
3458
Age (days ago)
3458
Last active (days ago)
8 comments
6 participants
participants (6)
-
Chris Angelico
-
Florian Bruhin
-
Nick Coghlan
-
Stefan Behnel
-
Stephan Sahm
-
Steven D'Aprano