diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-07-03 21:31:48 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-07-03 21:31:48 (GMT) |
commit | 72b82ba16dea929b3fa9db5208b2353e8449c2d5 (patch) | |
tree | cbb66296997943c1a5849404401a4840a00a8ec5 /Lib/sre_parse.py | |
parent | 6f013982366154ce570f69b6117dbcc6b1d5d89a (diff) | |
download | cpython-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.py | 4 |
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: |