[Python-ideas] import features; if "print_function" in features.data

Wes Turner wes.turner at gmail.com
Sat May 30 14:54:35 CEST 2015


Would it be useful to have one Python source file with an OrderedDict of
(API_feat_lbl, [(start, None)]) mappings
and a lookup?

* [ ] feat/version segments/rays map
* [ ] .lookup("print[_function]")

Syntax ideas:

* has("print[_function]")

Advantages

* More pythonic to check for features than capabilities
* Forward maintainability

Disadvantages:

*

Alternatives:

* six, nine, future
* try/import ENOENT
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150530/a9e09f58/attachment.html>


More information about the Python-ideas mailing list