Nick Coghlan wrote: > On Fri, Jun 1, 2012 at 7:16 PM, Maciej Fijalkowski <fijall at 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.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4