A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/039326.html below:

[Python-Dev] product()

[Python-Dev] product() [Python-Dev] product()Raymond Hettinger raymond.hettinger at verizon.net
Wed Oct 22 21:43:05 EDT 2003
In the course of writing up Pep 289, it became clear that
the future has a number of accumulator functions in store.
Each of these is useful with iterators of all stripes and
each helps eliminate a reason for using reduce().

Some like average() and stddev() will likely end up in a 
statistics module.  Others like nbiggest(), nsmallest(),
anytrue(), alltrue(), and such may end-up somewhere else.

The product() accumulator is the one destined to be a builtin.

Though it is not nearly as common as sum(), it does enjoy
some popularity.  Having it available will help dispense
with reduce(operator.mul, data, 1).

Would there be any objections to my adding product() to
Py2.4?  The patch was simple and it is ready to go unless 
someone has some major issue with it.


Raymond Hettinger


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4