[Python-ideas] statistics.sum [was Re: Pre-PEP: adding a statistics module to Python]

Joshua Landau joshua at landau.ws
Tue Aug 6 03:40:04 CEST 2013


On 6 August 2013 01:41, Cameron Simpson <cs at zip.com.au> wrote:

> On 06Aug2013 06:04, Steven D'Aprano <steve at pearwood.info> wrote:
> | Show of hands please, +1 or -1 on statistics.sum.
>
> For me: +1 on statistics.sum, and +0.8 for calling it "sum" instead
> of the painfully cumbersome "precise_sum".
>
> Regarding the latter, it is only going to end up in code as "sum"
> if someone imports it; concerned coders can always "import sum as
> precise_sum" or the like.
>

Just to be clear, in my view the purpose of naming it distinctly from
builtins.sum was to aid in the discovery phase. Hence an "import as" is not
an alternative.

(I also feel like it's not a big deal, so I wouldn't feel offended if the
matter was ignored.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130806/e6aff6b5/attachment.html>


More information about the Python-ideas mailing list