[stdlib-sig] Proposal: new "interpreter" module

M.-A. Lemburg mal at egenix.com
Mon Apr 7 17:09:09 CEST 2008

Some comments:

The rational groups the function in two groups and this grouping
makes a lot of sense.

However, your proposal later on doesn't use this rational in any

IMHO, it would be better to keep a "sys" module that exposes everything
you have in group 1 and an implementation specific module "cpython"
that exposes everything you have in group 2.

If an applications needs CPython specific features it would then
import cpython. This would make things easy to see in the source
code and also raise an exception on platforms where this module
is not available, e.g. Jython. The same could be done for
other Python implementations, e.g. have a "jython" module for
Jython specific things, "ironpython" for IronPython, etc.

Introducing a new long name "interpreter" doesn't really help
with resolving the problems you state in the rational and neither
does putting APIs from both groups into that new module :-)

BTW: sys.intern is a CPython implementation detail and needs
to go into group 2.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Apr 07 2008)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::

    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
            Registered at Amtsgericht Duesseldorf: HRB 46611

More information about the stdlib-sig mailing list