summaryrefslogtreecommitdiffstats
path: root/Lib/re.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2008-02-05 17:32:15 (GMT)
committerGuido van Rossum <guido@python.org>2008-02-05 17:32:15 (GMT)
commit212861c54fe7e3d3b43f27fdbdaedb453731dbe9 (patch)
tree6177ef92cb1f3151d3b482fcde02de71d67d7935 /Lib/re.py
parent727a59070d810fee4920697d560603775e7638dd (diff)
downloadcpython-212861c54fe7e3d3b43f27fdbdaedb453731dbe9.zip
cpython-212861c54fe7e3d3b43f27fdbdaedb453731dbe9.tar.gz
cpython-212861c54fe7e3d3b43f27fdbdaedb453731dbe9.tar.bz2
In the experimental 'Scanner' feature, the group count was set wrong.
Diffstat (limited to 'Lib/re.py')
-rw-r--r--Lib/re.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/re.py b/Lib/re.py
index d715154..1d9c987 100644
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -300,8 +300,8 @@ class Scanner:
p.append(sre_parse.SubPattern(s, [
(SUBPATTERN, (len(p)+1, sre_parse.parse(phrase, flags))),
]))
+ s.groups = len(p)+1
p = sre_parse.SubPattern(s, [(BRANCH, (None, p))])
- s.groups = len(p)
self.scanner = sre_compile.compile(p)
def scan(self, string):
result = []