[Python-3000] Request for prod()
Guido van Rossum
guido at python.org
Mon Jan 7 00:47:36 CET 2008
On Jan 6, 2008 1:19 AM, hashcollision <hashcollision at gmail.com> wrote:
> I request the addition of prod():
>
> def prod(seq):
> s = 1
> for x in seq:
> s *= x
>
> prod is always as useful as sum()
No it isn't.
This was discussed extensively at the time sum() was proposed and
accepted, and it was found that product() has much less usage than
sum() -- so much less so that it's not worth adding.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list