On Tue, Apr 24, 2012 at 12:42 AM, Eric Snow email@example.com wrote:
The premise is that sys.implementation would be a "namedtuple" (like sys.version_info). It would contain (as much as is practical) the information that is specific to a particular implementation of Python. "Required" attributes of sys.implementation would be those that the standard library makes use of. For instance, importlib would make use of sys.implementation.name (or sys.implementation.cache_tag) if there were one. The thread from 2009 covered a lot of this ground already. 
Here are the "required" attributes of sys.implementation that I advocate:
- name (mixed case; sys.implementation.name.lower() used as an identifier)
- version (of the implementation, not of the targeted language
version; structured like sys.version_info?)
Here are other variables that _could_ go in sys.implementation:
- cache_tag (e.g. 'cpython33' for CPython 3.3)
- url (or website)
Let's start with a minimum set of expected attributes, which would have an immediate purpose in the stdlib. However, let's not disallow implementations from adding whatever other attributes are meaningful for them.
FYI, I've created a tracker ticket with a patch and moved this over to python-dev.