5 ms·
What kind of licensing does this have? It would be interesting to see if this could make it in Python 3.2 (It's supposed to include the Unladen Swallow stuff,
by natmaster 16y ago
What kind of licensing does this have?
It would be interesting to see if this could make it in Python 3.2 (It's supposed to include the Unladen Swallow stuff, so might as well take more awesomeness from Google.)
- mcav 16y agoThe 3-clause BSD license... http://github.com/axiak/pyre2/blob/master/LICENSE http://github.com/axiak/pyre2/blob/master/LICENSE
- axiak 16y agoBSD (as does the google RE2 C++ module)
- dododo 16y agonote it depends upon cython: i suppose it's more likely it will make it into cython rather than python 3.2.
- axiak 16y agoLike the libxml module which uses Cython, the compiled CPP module is distributed along with it, so you don't actually need Cython to install it or compile it. But you would need Cython to do any development on it.
- kingkilr 16y agoIt won't. It doesn't implement the entire regular expression language Python supports.
- kvs 16y agoPlease note that RE2 doesn't support backtracking.
- aaronblohowiak 16y agoif you're using backtracking, maybe "regular expressions" aren't the right tool.
- dkarl 16y agoCould a regex library parse a regular expression and decide reasonably quickly which engine to use?
- kingkilr 16y agoProbably, but python-core has no interest in maintaining multiple regular expression implementations: http://mail.python.org/pipermail/python-dev/2010-July/101606.html http://mail.python.org/pipermail/python-dev/2010-July/101606... (this thread starts talking about regex, which is a backwards compatible enhancement to re, but also covers re2)
- axiak 16y agoYes. That's precisely what pyre2 is doing. It's trying re2, and if it fails because it doesn't support the features, it tries the python re. Since compilation happens rarely, this is fast.