[Python-3000] More wishful thinking
skip at pobox.com
skip at pobox.com
Sun Apr 16 14:26:56 CEST 2006
>> Because then the re module wouldn't be thread safe.
talin> True, although I suppose that you could add a "last match" to
talin> regular expression objects:
talin> re_pattern = re.compile( ... )
talin> if re_pattern.match( string ):
talin> text = re_pattern.lastmatch.group( 1 )
No, it would still be thread-unsafe. The re_pattern object can be shared by
multiple threads.
Skip
More information about the Python-3000
mailing list