mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
final 0.9.8 updates:
-- added REPEAT_ONE operator -- added ANY_ALL operator (used to represent "(?s).")
This commit is contained in:
parent
fb06539e99
commit
e186983842
6 changed files with 105 additions and 68 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue