>>>>> "Ilpo" == Ilpo NyyssÃnen <iny> writes:
Ilpo> James Stroud <[EMAIL PROTECTED]> writes: >> Is it relevant that Python can produce compiled expressions? I >> don't think that there is such a thing with Perl. Ilpo> The problem in python here is that it needs to always Ilpo> recompile the regexp. I would like to have a way to write a Ilpo> regexp as a constant and then python should compile that Ilpo> regexp to the byte-code file. Ilpo> This is a problem when one has a big amount of regexps. One Ilpo> example is the xmlproc parser in PyXML, Read the source for sre.py, esp. _compile. The compiled regexps are cached, so when you invoke e.g. re.match(), it doesn't recompile the regexp. So this point is moot, and perl's approach is excessive special casing. -- Ville Vainio http://tinyurl.com/2prnb -- http://mail.python.org/mailman/listinfo/python-list