andrew wrote: > > >-- SRE is usually faster than the old RE module (PRE). >=20 > Once the compiler is translated to C, it might be worth considering > making SRE available as a standalone library for use outside of > Python. if it will ever be translated, that is... > Hmm... here's an old problem that's returned (recursion on repeated > group matches, I expect): >=20 > >>> p=3Dre.compile('(x)*') > >>> p > <SRE_Pattern object at 0x8127048> > >>> p.match(500000*'x') > Segmentation fault (core dumped) fwiw, that pattern isn't portable: $ jpython test.py File "test.py", line 3, in ? java.lang.StackOverflowError and neither is: def nest(level): if level: nest(level-1) nest(500000) ...but sure, I will fix that in 0.9.9 (SRE, not Python -- Christian has already taken care of the other one ;-). but 0.9.9 won't be out before the 1.6b1 release... (and to avoid scaring the hell out of the beta testers, it's probably better to leave the test out of the regression suite until the bug is fixed...) </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4