| PEP: | 3139 |
|---|---|
| Title: | Cleaning out sys and the "interpreter" module |
| Version: | 63925 |
| Last-Modified: | 2008-06-03 08:18:48 -0700 (Tue, 03 Jun 2008) |
| Author: | Benjamin Peterson |
| Status: | Rejected |
| Type: | Standards Track |
| Content-Type: | text/x-rst |
| Created: | 4-April-2008 |
| Python-Version: | 3.0 |
Contents
Guido's -0.5 put an end to this PEP. See http://mail.python.org/pipermail/python-3000/2008-April/012977.html.
This PEP proposes a new low-level module for CPython-specific interpreter functions in order to clean out the sys module and separate general Python functionality from implementation details.
The sys module currently contains functions and data that can be put into two major groups:
The second collections of items has been steadily increasing over the years causing clutter in sys. Guido has even said he doesn't recognize some of things in it [1]!
Moving these items items off to another module would send a clear message to other Python implementations about what functions need and need not be implemented.
It has also been proposed that the contents of types module be distributed across the standard library [2]; the interpreter module would provide an excellent resting place for internal types like frames and code objects.
A new builtin module named "interpreter" (see Naming) will be added.
The second list of items above will be split into the stdlib as follows:
Once implemented in 3.x, the interpreter module will be back-ported to 2.6. Py3k warnings will be added the the sys functions it replaces.
Some believe that the writing of bytecode is an implementation detail and should be moved [3]. The counterargument is that all current, complete Python implementations do write some sort of bytecode, so it is valuable to be able to disable it. Also, if it is moved, some wish to put it in the imp module.
It was noted that dont_write_bytecode or maybe builtin_module_names might fit nicely in the imp module.
| [1] | http://bugs.python.org/issue1522 |
| [2] | http://mail.python.org/pipermail/stdlib-sig/2008-April/000172.html |
| [3] | http://mail.python.org/pipermail/stdlib-sig/2008-April/000217.html |
| [4] | http://mail.python.org/pipermail/python-3000/2007-November/011351.html |
| [5] | http://mail.python.org/pipermail/stdlib-sig/2008-April/000223.html |
This document has been placed in the public domain.
Local Variables: mode: indented-text indent-tabs-mode: nil sentence-end-double-space: t fill-column: 70 coding: utf-8 End: