Maciej Fijalkowski wrote: > On Wed, Feb 24, 2010 at 6:35 AM, Nick Coghlan <ncogh...@gmail.com> wrote: >> Tarek Ziadé wrote: >>> That makes me wonder : why don't we have a sys.implementation variable ? >>> (cython/jython/pypi), since we can have several values for cython in >>> sys.platform > > Hello. > > So I propose to have a sys.implementation which would have string > representation like "CPython" or "Jython" and have a couple of extra > attributes on that. I can think about a lot of attributes, however, > couple comes to mind as obvious. > > * supports_c_api - whether it can load and use CPython C modules > * gc_strategy - probably equals "refcounting" or not, useful for some people > * frame_introspection - This is mostly True for everybody except > IronPython which has it as an optional command line argument. Might be > useful to have it for some projects, unsure. > > What do you think?
I think anything along these lines needs to be a PEP so that the developers of the different implementations all get a chance to comment and then have a firm standard to code to afterwards :) Christian was going to write one in the PEP 370 context, so it's worth following up with him to see if he ever got around to drafting anything. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ 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