Author ezio.melotti
Recipients barry, ezio.melotti, loewis, nadeem.vawda, orsenthil, r.david.murray, rosslagerwall, serhiy.storchaka
Date 2012-09-19.20:25:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
That might work.

To avoid the overhead of the cache lookup I was thinking about something like

regex = None
def _has_surrogates(s):
    global regex
    if regex is None:
        regex = re.compile(short_regex)

but I have discarded it because it's not very pretty and still has the overhead of the function and an additional if.  Your version solves both the problems in a more elegant way.
Date User Action Args
2012-09-19 20:25:35ezio.melottisetrecipients: + ezio.melotti, loewis, barry, orsenthil, nadeem.vawda, r.david.murray, rosslagerwall, serhiy.storchaka
2012-09-19 20:25:35ezio.melottisetmessageid: <>
2012-09-19 20:25:34ezio.melottilinkissue11454 messages
2012-09-19 20:25:34ezio.melotticreate