summaryrefslogtreecommitdiffstats
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-07-03 21:31:48 (GMT)
committerFredrik Lundh <fredrik@pythonware.com>2000-07-03 21:31:48 (GMT)
commit72b82ba16dea929b3fa9db5208b2353e8449c2d5 (patch)
treecbb66296997943c1a5849404401a4840a00a8ec5 /Lib/sre_parse.py
parent6f013982366154ce570f69b6117dbcc6b1d5d89a (diff)
downloadcpython-72b82ba16dea929b3fa9db5208b2353e8449c2d5.zip
cpython-72b82ba16dea929b3fa9db5208b2353e8449c2d5.tar.gz
cpython-72b82ba16dea929b3fa9db5208b2353e8449c2d5.tar.bz2
- fixed grouping error bug
- changed "group" operator to "groupref"
Diffstat (limited to 'Lib/sre_parse.py')
-rw-r--r--Lib/sre_parse.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/sre_parse.py b/Lib/sre_parse.py
index 07ab782..053335a 100644
--- a/Lib/sre_parse.py
+++ b/Lib/sre_parse.py
@@ -241,7 +241,7 @@ def _escape(source, escape, state):
if group:
if (not source.next or
not _group(escape + source.next, state.groups)):
- return GROUP, group
+ return GROUPREF, group
escape = escape + source.get()
elif source.next in OCTDIGITS:
escape = escape + source.get()
@@ -450,7 +450,7 @@ def _parse(source, state):
gid = state.groupdict.get(name)
if gid is None:
raise error, "unknown group name"
- subpattern.append((GROUP, gid))
+ subpattern.append((GROUPREF, gid))
elif source.match("#"):
index = ""
while 1: