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

Carl Friedrich Bolz cfbolz at gmx.de
Mon Apr 7 22:41:50 CEST 2008


M.-A. Lemburg wrote:
> 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
> way.
> 
> 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.

I think the idea is nice, but PyPy couldn't really expose a "pypy"
module, since that is the namespace the implementation itself is living
in. Maybe add a suffix to the implementation name? cpython_vm or so.

Cheers,

Carl Friedrich Bolz



More information about the stdlib-sig mailing list