Message170765
| Author |
r.david.murray |
| Recipients |
barry, ezio.melotti, loewis, nadeem.vawda, orsenthil, r.david.murray, rosslagerwall, serhiy.storchaka |
| Date |
2012年09月19日.20:19:36 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1348085977.63.0.299625841549.issue11454@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This issue may be about reducing the startup time, but this function is a hot spot in the email package so I would prefer to sacrifice startup time optimization for an increase in speed.
However, given the improvements to import locking in 3.3, what about a self replacing function?
def _has_surrogates(s):
import email.utils
f = re.compile('[\udc80-\udcff]').search
email.utils._has_surrogates = f
return f(s) |
|