[Zope-dev] regex.compile used quite often

Eric Kidd eric.kidd@pobox.com
Fri, 11 Jun 1999 21:01:59 -0400


I've been reading through ZPublisher/HTTPRequest.py, and I noticed several
uses of regex.compile. Oddly enough, the result is thrown out after one use
and recomputed later.

Isn't regex.compile an expensive operation? Should the results of
regex.compile by stored between uses?

Cheers,
Eric