Armin Rigo <arigo@users.sourceforge.net> added the comment:
Here is a summarizing implementation that accepts this interface:
if check_impl_detail(): # only on CPython (default)
if check_impl_detail(jython=True): # only on Jython
if check_impl_detail(cpython=False): # everywhere except on CPython
and similarly with the decorator:
@impl_detail() # only on CPython (default)
@impl_detail("reason...") # the same, with an explicit message
@impl_detail(jython=True) # only on Jython
@impl_detail(cpython=False) # everywhere except on CPython
I think this is a nice interface, although it takes some largish number
of lines to implement.
Added file: http://bugs.python.org/file12718/test-impl-details-2.diff
_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4242>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
Here is a summarizing implementation that accepts this interface:
if check_impl_detail(): # only on CPython (default)
if check_impl_detail(jython=True): # only on Jython
if check_impl_detail(cpython=False): # everywhere except on CPython
and similarly with the decorator:
@impl_detail() # only on CPython (default)
@impl_detail("reason...") # the same, with an explicit message
@impl_detail(jython=True) # only on Jython
@impl_detail(cpython=False) # everywhere except on CPython
I think this is a nice interface, although it takes some largish number
of lines to implement.
Added file: http://bugs.python.org/file12718/test-impl-details-2.diff
_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4242>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com