[Python-3000] Request for prod()
g.brandl at gmx.net
Sun Jan 6 11:08:36 CET 2008
> I request the addition of prod():
> def prod(seq):
> s = 1
> for x in seq:
> s *= x
> prod is always as useful as sum()
It would have to be called product(), and I believe it has been proposed
multiple times and been rejected under the "not every 3-line function
has to be builtin" rule.
It could of course be added to functools...
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.
More information about the Python-3000