This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients barry, ezio.melotti, loewis, nadeem.vawda, orsenthil, r.david.murray, rosslagerwall, serhiy.storchaka
Date 2012-09-19.21:26:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348089988.73.0.431632808707.issue11454@psf.upfronthosting.co.za>
In-reply-to
Content
def _has_surrogates(s):
    try:
        s.encode()
        return False
    except UnicodeEncodeError:
        return True

Results:
0.26 <- re.compile(short_regex).search
0.06 <- try encode
History
Date User Action Args
2012-09-19 21:26:29serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, barry, orsenthil, nadeem.vawda, ezio.melotti, r.david.murray, rosslagerwall
2012-09-19 21:26:28serhiy.storchakasetmessageid: <1348089988.73.0.431632808707.issue11454@psf.upfronthosting.co.za>
2012-09-19 21:26:28serhiy.storchakalinkissue11454 messages
2012-09-19 21:26:27serhiy.storchakacreate