]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
New == syntax; regs is no longer a method.
authorGuido van Rossum <guido@python.org>
Wed, 1 Jan 1992 19:33:02 +0000 (19:33 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 1 Jan 1992 19:33:02 +0000 (19:33 +0000)
Lib/regexp.py

index fc6fcad2a2aa7ca7417aeb35c9d27682174faadf..2b8a5c00cbcc92d418e985ccc5d46175fbb0bb99 100644 (file)
@@ -12,15 +12,15 @@ class Prog:
                        xxx = regex.set_syntax(save_syntax)
                return self
        def match(self, args):
-               if type(args) = type(()):
+               if type(args) == type(()):
                        str, offset = args
                else:
                        str, offset = args, 0
                if self.prog.search(str, offset) < 0:
                        return ()
-               regs = self.prog.regs()
+               regs = self.prog.regs
                i = len(regs)
-               while i > 0 and regs[i-1] = (-1, -1):
+               while i > 0 and regs[i-1] == (-1, -1):
                        i = i-1
                return regs[:i]