On 30 May 2015 at 22:54, Wes Turner
Would it be useful to have one Python source file with an OrderedDict of (API_feat_lbl, [(start, None)]) mappings and a lookup?
Your choice of example means I'm not sure what additional capabilities you're seeking. The __future__ module already aims to cover this for compiler directives:
import __future__ __future__.all_feature_names ['nested_scopes', 'generators', 'division', 'absolute_import', 'with_statement', 'print_function', 'unicode_literals'] __future__.print_function _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
If you're looking for particular builtins, importing builtins (Python 3) or __builtin__ (Python 2) and checking attributes lets you see what is available via hasattr(). hasattr() will also cover most feature check needs for other modules (file descriptor support in the os module is an exception, hence the related dedicated query APIs for that). Regards, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia