Small update.
This commit is contained in:
parent
e612b827c0
commit
9f10890b0b
|
@ -250,9 +250,10 @@ Reduction Functions
|
|||
===================
|
||||
|
||||
The utility of generator expressions is greatly enhanced when combined
|
||||
with reduction functions like sum(), min(), and max(). The sandbox
|
||||
contains a draft statistics module with several new accumulation
|
||||
functions including: product(), average(), nlargest(), and nsmallest().
|
||||
with reduction functions like sum(), min(), and max(). The heapq
|
||||
module in Python 2.4 includes two new reduction functions: nlargest()
|
||||
and nsmallest(). Both work well with generator expressions and keep
|
||||
no more than n items in memory at one time.
|
||||
|
||||
|
||||
Acknowledgements
|
||||
|
|
Loading…
Reference in New Issue