summaryrefslogtreecommitdiffstats
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index af1edbf..7d9b889 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -647,9 +647,9 @@ def parse_template(source, pattern):
p.append((LITERAL, literal))
sep = source[:0]
if type(sep) is type(""):
- char = chr
+ makechar = chr
else:
- char = unichr
+ makechar = unichr
while 1:
this = s.get()
if this is None:
@@ -693,14 +693,14 @@ def parse_template(source, pattern):
break
if not code:
this = this[1:]
- code = LITERAL, char(atoi(this[-6:], 8) & 0xff)
+ code = LITERAL, makechar(atoi(this[-6:], 8) & 0xff)
if code[0] is LITERAL:
literal(code[1])
else:
a(code)
else:
try:
- this = char(ESCAPES[this][1])
+ this = makechar(ESCAPES[this][1])
except KeyError:
pass
literal(this)