summaryrefslogtreecommitdiff
path: root/Lib/sre_compile.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-02-24 01:18:35 +0000
committerGuido van Rossum <guido@python.org>2003-02-24 01:18:35 +0000
commit0177df7a80fecbcc57ecb533e9b2d258df5ef282 (patch)
tree5ad5075c7a8044dbdb316c72136f5c579d70d839 /Lib/sre_compile.py
parent28811b2540f8b638982bd8b2d9698b87e41eac8c (diff)
downloadcpython-0177df7a80fecbcc57ecb533e9b2d258df5ef282.tar.gz
Fix from SF patch #633359 by Greg Chapman for SF bug #610299:
The problem is in sre_compile.py: the call to _compile_charset near the end of _compile_info forgets to pass in the flags, so that the info charset is not compiled with re.U. (The info charset is used when searching to find the first character at which a match could start; it is not generated for patterns beginning with a repeat like '\w{1}'.)
Diffstat (limited to 'Lib/sre_compile.py')
-rw-r--r--Lib/sre_compile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/sre_compile.py b/Lib/sre_compile.py
index e5adb7e46a..bb17649523 100644
--- a/Lib/sre_compile.py
+++ b/Lib/sre_compile.py
@@ -399,7 +399,7 @@ def _compile_info(code, pattern, flags):
table[i+1] = table[table[i+1]-1]+1
code.extend(table[1:]) # don't store first entry
elif charset:
- _compile_charset(charset, 0, code)
+ _compile_charset(charset, flags, code)
code[skip] = len(code) - skip
STRING_TYPES = [type("")]