[Python-Dev] a new type for sys.implementation (original) (raw)
Barry Warsaw barry at python.org
Fri Jun 1 05:08:57 CEST 2012
- Previous message: [Python-Dev] a new type for sys.implementation
- Next message: [Python-Dev] a new type for sys.implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jun 01, 2012, at 11:49 PM, Nick Coghlan wrote:
The long term goal here is that all the code in the standard library should be implementation independent - PyPy, Jython, IronPython, et al should be able to grab it and just run it. That means the implementation specific stuff needs to migrate into the C code and get exposed through standard APIs. PEP 421 is one step along that road.
Exactly. Or to put it another way, if you implemented sys.implementation in some stdlib Python module, you wouldn't be able to share that module between the various Python implementations. I think the stdlib should strive for more commonality across Python implementations, not less. Yes, you could conditionalize your way around that, but why do it when writing the code in the interpreter implementation language is easy enough? Plus, who wants to maintain the ugly mass of if-statements that would probably require?
Eric's C code is easily auditable to anyone who knows the C API well enough, and I can't imagine it wouldn't be pretty trivial to write it in Java, RPython, or C#.
Cheers, -Barry
- Previous message: [Python-Dev] a new type for sys.implementation
- Next message: [Python-Dev] a new type for sys.implementation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]