Explicitly mention accelerator modules can be a subset of functionality.

This commit is contained in:
Brett Cannon 2011-04-06 10:05:50 -07:00
parent e68bd8b5ae
commit cfb1d26c38
1 changed files with 16 additions and 14 deletions

View File

@ -14,12 +14,13 @@ Abstract
========
The Python standard library under CPython contains various instances
of modules implemented in both pure Python and C. This PEP requires
that in these instances that both the Python and C code *must* be
semantically identical (except in cases where implementation details
of a VM prevents it entirely). It is also required that new C-based
modules lacking a pure Python equivalent implementation get special
permissions to be added to the standard library.
of modules implemented in both pure Python and C (either entirely or
partially). This PEP requires that in these instances that both the
Python and C code *must* be semantically identical (except in cases
where implementation details of a VM prevents it entirely). It is also
required that new C-based modules lacking a pure Python equivalent
implementation get special permissions to be added to the standard
library.
Rationale
@ -33,14 +34,15 @@ areas where CPython cannot be used, e.g., Jython allowing Python to be
used in Java applications.
A problem all of the VMs other than CPython face is handling modules
from the standard library that are implemented in C. Since they do not
typically support the entire `C API of Python`_ they are unable to use
the code used to create the module. Often times this leads these other
VMs to either re-implement the modules in pure Python or in the
programming language used to implement the VM (e.g., in C# for
IronPython). This duplication of effort between CPython, PyPy, Jython,
and IronPython is extremely unfortunate as implementing a module *at
least* in pure Python would help mitigate this duplicate effort.
from the standard library that are implemented (to some extent) in C.
Since they do not typically support the entire `C API of Python`_ they
are unable to use the code used to create the module. Often times this
leads these other VMs to either re-implement the modules in pure
Python or in the programming language used to implement the VM
(e.g., in C# for IronPython). This duplication of effort between
CPython, PyPy, Jython, and IronPython is extremely unfortunate as
implementing a module *at least* in pure Python would help mitigate
this duplicate effort.
The purpose of this PEP is to minimize this duplicate effort by
mandating that all new modules added to Python's standard library