Author cito
Recipients cito, georg.brandl
Date 2009-11-27.10:47:20
SpamBayes Score 0.0016185
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:22citosetrecipients: + cito, georg.brandl
2009-11-27 10:47:22citosetmessageid: <1259318842.77.0.740725384087.issue7402@psf.upfronthosting.co.za>
2009-11-27 10:47:21citolinkissue7402 messages
2009-11-27 10:47:20citocreate