(original) (raw)
On 1 Jun 2014 18:13, "Steven D'Aprano" <steve@pearwood.info> wrote:
\>
\> My feeling is that the CPython standard library should be written for
\> CPython, that is, it should stick to the current naive implementation of
\> median, and if PyPy wants to speed the function up, they can provide
\> their own version of the module. I should \*not\* complicate the
\> implementation by trying to detect which Python the code is running
\> under and changing algorithms accordingly. However, I should put a
\> comment in the module pointing at the tracker issue. Does this sound
\> right to others?
One option is to set the pure Python module up to be paired with an accelerator module (and update the test suite accordingly), even if we \*don't provide\* an accelerator in CPython. That just inverts the more common case (where we have an accelerator written in C, but another implementation either doesn't need one, or just doesn't have one yet).
Cheers,
Nick.
>
\>
\> Thanks,
\>
\>
\>
\> --
\> Steve
\> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
\> Python-Dev mailing list
\> Python-Dev@python.org
\> https://mail.python.org/mailman/listinfo/python-dev
\> Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com