Nick Coghlan wrote:
On Fri, Jun 1, 2012 at 7:16 PM, Maciej Fijalkowski <fij...@gmail.com> wrote:
sys.implementation could be added by site or some other startup file.

Yes, why not do that instead of a new thing in C? I don't care about PyPy
actually (since we kind of have to implement sys.implementation in
python/RPython anyway, since it'll be different)

The idea is that sys.implementation is the way some interpreter
internal details are exposed to the Python layer, thus it needs to
handled in the implementation language, and explicitly *not* in Python
(if it's in Python, then the implementation has to come up with some
*other* API for accessing those internals from Python code, thus
missing a large part of the point of the exercise).

Why?

What is wrong with something like the following (for CPython)?

class SysImplemention:
    "Define __repr__(), etc here "
    ...

sys.implementation = SysImplemention()
sys.implementation.name = 'cpython'
sys.implementation.version = (3, 3, 0, 'alpha', 4)
sys.implementation.hexversion = 0x30300a4
sys.implementation.cache_tag = 'cpython-33'

Also, should the build/machine info be removed from sys.version
and moved it to sys.implementation?

Cheers,
Mark.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to