diff options
author | Raymond Hettinger <python@rcn.com> | 2013-02-17 09:34:17 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-02-17 09:34:17 (GMT) |
commit | 1014b6c21cae26979d17adb6a282392aed88d0d3 (patch) | |
tree | 8c58d6662fc55c0802059ba590f0fab05557e3c0 /Lib | |
parent | 832eddeafbf6265b8d88b468fed9f193459b5678 (diff) | |
parent | d0dbb20f5fcd5829f4bdc194d970d9e4d80e92bc (diff) | |
download | cpython-1014b6c21cae26979d17adb6a282392aed88d0d3.zip cpython-1014b6c21cae26979d17adb6a282392aed88d0d3.tar.gz cpython-1014b6c21cae26979d17adb6a282392aed88d0d3.tar.bz2 |
merge
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/fnmatch.py | 2 | ||||
-rw-r--r-- | Lib/re.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/fnmatch.py b/Lib/fnmatch.py index f446769..6330b0c 100644 --- a/Lib/fnmatch.py +++ b/Lib/fnmatch.py @@ -35,7 +35,7 @@ def fnmatch(name, pat): pat = os.path.normcase(pat) return fnmatchcase(name, pat) -@functools.lru_cache(maxsize=250, typed=True) +@functools.lru_cache(maxsize=256, typed=True) def _compile_pattern(pat): if isinstance(pat, bytes): pat_str = str(pat, 'ISO-8859-1') @@ -261,7 +261,7 @@ def escape(pattern): _pattern_type = type(sre_compile.compile("", 0)) -@functools.lru_cache(maxsize=500, typed=True) +@functools.lru_cache(maxsize=512, typed=True) def _compile(pattern, flags): # internal: compile pattern if isinstance(pattern, _pattern_type): @@ -273,7 +273,7 @@ def _compile(pattern, flags): raise TypeError("first argument must be string or compiled pattern") return sre_compile.compile(pattern, flags) -@functools.lru_cache(maxsize=500) +@functools.lru_cache(maxsize=512) def _compile_repl(repl, pattern): # internal: compile replacement pattern return sre_parse.parse_template(repl, pattern) |