[Python-Dev] Should standard library modules optimize for CPython?

Victor Stinner victor.stinner at gmail.com
Mon Jun 2 10:43:47 CEST 2014


2014-06-01 10:11 GMT+02:00 Steven D'Aprano <steve at pearwood.info>:
> My feeling is that the CPython standard library should be written for
> CPython,

Right. PyPy, Jython and IronPython already have their "own" standard
library when they need a different implement.

PyPy: "lib_pypy" directory (lib-python is the CPython stdlib):
https://bitbucket.org/pypy/pypy/src/ac52eb7bbbb059d0b8d001a2103774917cf7396f/lib_pypy/?at=default

Jython: "Lib" directory (lib-python is the CPython stdlib):
https://bitbucket.org/jython/jython/src/9cd9ab75eadea898e2e74af82ae414925d6a1135/Lib/?at=default

IronPython: "IronPython.Modules" directory:
http://ironpython.codeplex.com/SourceControl/latest#IronPython_Main/Languages/IronPython/IronPython.Modules/

See for example the _fsum.py module of Jython:
https://bitbucket.org/jython/jython/src/9cd9ab75eadea898e2e74af82ae414925d6a1135/Lib/_fsum.py?at=default

Victor


More information about the Python-Dev mailing list