On Thu, Feb 28, 2013 at 1:15 AM, Nick Coghlan email@example.com wrote:
On Thu, Feb 28, 2013 at 1:37 PM, Barry Warsaw firstname.lastname@example.org wrote:
On Feb 27, 2013, at 11:33 AM, email@example.com wrote:
The easy part for Jython is pushing some of our "if is_jython:" stuff into the appropriate spots in CPython's Lib/.
I wonder if there isn't a better way to do this than sprinkling is_jython, is_pypy, is_ironpython, is_thenextbigthing all over the code base. I have no bright ideas here, but it seems like a feature matrix would be a better way to go than something that assumes a particular Python implementation has a particular feature set (which may change in the future).
Yes, avoiding that kind of thing is a key motivation for sys.implementation. Any proposal for "is_jython" blocks should instead be reformulated as a proposal for new sys.implementation attributes.
Ah nice - the merging effort should definitely cause some careful consideration of these. Maybe I'll start a discussion about a "garbage collection type" for sys.implementation. Some way to ask <gc != "refcounted"> would catch some of these.