Message95762
In the section "Using the batteries" of the "Idioms and Anti-Idioms in
Python" document
(http://docs.python.org/dev/howto/doanddont.html#using-the-batteries),
the reduce statement is used for summing up numbers as an example. I
think this is rather an anti-example, because Python already has a sum
function built-in, i.e. reduce(operator.add, nums)/len(nums) can be
written much simpler as sum(nums)/len(nums). |
|
Date |
User |
Action |
Args |
2009-11-27 10:47:22 | cito | set | recipients:
+ cito, georg.brandl |
2009-11-27 10:47:22 | cito | set | messageid: <1259318842.77.0.740725384087.issue7402@psf.upfronthosting.co.za> |
2009-11-27 10:47:21 | cito | link | issue7402 messages |
2009-11-27 10:47:20 | cito | create | |
|