Message95762
| Author |
cito |
| Recipients |
cito, georg.brandl |
| Date |
2009年11月27日.10:47:20 |
| SpamBayes Score |
0.0016184999 |
| Marked as misclassified |
No |
| Message-id |
<1259318842.77.0.740725384087.issue7402@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|
History
|
|---|
| 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 |
|