Serhiy Storchaka added the comment:
> If I change the regex to _has_surrogates =
> re.compile('[\udc80-\udcff]').search, the tests still pass but there's no
> improvement on startup time (note: the previous regex was matching all the
> surrogates in this range too, however I'm not sure how well this is tested).
What about
_has_surrogates = re.compile('[^\udc80-\udcff]*\Z').match
?
----------
nosy: +storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11454>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com