[Python-Dev] PEP 450 adding statistics module

Paul Colomiets paul at colomiets.name
Mon Sep 9 09:51:31 CEST 2013


Hi Guido,

On Sun, Sep 8, 2013 at 8:32 PM, Guido van Rossum <guido at python.org> wrote:
> Going over the open issues:
>
> - Parallel arrays or arrays of tuples? I think the API should require
> an array of tuples. It is trivial to zip up parallel arrays to the
> required format, while if you have an array of tuples, extracting the
> parallel arrays is slightly more cumbersome. Also for manipulating of
> the raw data, an array of tuples makes it easier to do insertions or
> removals without worrying about losing the correspondence between the
> arrays.

I think there is a big reason to use parallel arrays that might be
overlooked. You can feed an array.array('f') to the function, which
may save a lot of memory.

--
Paul


More information about the Python-Dev mailing list