In the experimental 'Scanner' feature, the group count was set wrong.

This commit is contained in:
Guido van Rossum 2008-02-05 17:27:23 +00:00
parent 42993fef1c
commit 9decb70349
1 changed files with 1 additions and 1 deletions

View File

@ -290,8 +290,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 = []