summaryrefslogtreecommitdiff
path: root/Lib/sre_parse.py
diff options
context:
space:
mode:
authorFredrik Lundh <fredrik@pythonware.com>2000-07-03 21:31:48 +0000
committerFredrik Lundh <fredrik@pythonware.com>2000-07-03 21:31:48 +0000
commitc3d03945779155956fb40fc4fd3762315c52e16f (patch)
tree4841c9112955bdbba03d1eabbd96706912e07a07 /Lib/sre_parse.py
parentc8947fbfa2cf94e72d81121ff43a3218388f2467 (diff)
downloadcpython-c3d03945779155956fb40fc4fd3762315c52e16f.tar.gz
- 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 07ab78241f..053335a4d7 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: