summaryrefslogtreecommitdiffstats
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-06-30 18:39:20 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-06-30 18:39:20 (GMT)
commit4ccea94152599d7a80c01d5ebddb70f5abf3ce21 (patch)
treea60ad484768f718d6dddc89d311486a882f39205 /Lib/sre_parse.py
parent1739be50cb39627c8e6deca7c395854559ba655e (diff)
downloadcpython-4ccea94152599d7a80c01d5ebddb70f5abf3ce21.zip
cpython-4ccea94152599d7a80c01d5ebddb70f5abf3ce21.tar.gz
cpython-4ccea94152599d7a80c01d5ebddb70f5abf3ce21.tar.bz2
- reverted to "\x is binary byte"
- removed evil tabs from sre_parse and sre_compile
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index fb954e9..660bae6 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -19,8 +19,9 @@ from sre_constants import *
# FIXME: should be 65535, but the arraymodule is still broken
MAXREPEAT = 32767
-# FIXME: same here
-CHARMASK = 0x7fff
+# FIXME: might change in 2.0 final. but for now, this seems
+# to be the best way to be compatible with 1.5.2
+CHARMASK = 0xff
SPECIAL_CHARS = ".\\[{()*+?^$|"
REPEAT_CHARS = "*+?{"
@@ -616,9 +617,9 @@ def expand_template(template, match):
a = p.append
sep = match.string[:0]
if type(sep) is type(""):
- char = chr
+ char = chr
else:
- char = unichr
+ char = unichr
for c, s in template:
if c is LITERAL:
a(char(s))