final 0.9.8 updates:

-- added REPEAT_ONE operator
-- added ANY_ALL operator (used to represent "(?s).")
This commit is contained in:
Fredrik Lundh 2000-08-01 22:47:49 +00:00
parent fb06539e99
commit e186983842
6 changed files with 105 additions and 68 deletions

View file

@ -98,7 +98,10 @@ def _compile(pattern, flags=0):
return _cache[key]
except KeyError:
pass
p = sre_compile.compile(pattern, flags)
try:
p = sre_compile.compile(pattern, flags)
except error, v:
raise error, v # invalid expression
if len(_cache) >= _MAXCACHE:
_cache.clear()
_cache[key] = p