]> granicus.if.org Git - python/commitdiff
Bugfix in match() -- the number of registers shouldn't be divided by two!
authorGuido van Rossum <guido@python.org>
Mon, 27 Oct 1997 18:17:19 +0000 (18:17 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 27 Oct 1997 18:17:19 +0000 (18:17 +0000)
Lib/re.py

index 420f6ed7e1a7c78d41a4a3f3b2343f266aa335b6..bf74808377b08d94ec1688e9d233cc4419f2793e 100644 (file)
--- a/Lib/re.py
+++ b/Lib/re.py
@@ -86,7 +86,7 @@ class RegexObject:
        regs = self.code.match(string, pos, ANCHORED)
        if regs is None:
            return None
-       self.num_regs=len(regs)/2
+       self.num_regs=len(regs)
        return MatchObject(self,
                           string,
                           pos,