diff options
author | Guido van Rossum <guido@python.org> | 1992-01-01 19:33:02 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1992-01-01 19:33:02 (GMT) |
commit | 42d1f63c54b8f5e3da04155c3369be1b98a7f3d3 (patch) | |
tree | a1a7cacebc06d31541e386e1809239f1131dbc54 /Lib/regexp.py | |
parent | d4e5a733b2c8d692dff11696647731806c2818d6 (diff) | |
download | cpython-42d1f63c54b8f5e3da04155c3369be1b98a7f3d3.zip cpython-42d1f63c54b8f5e3da04155c3369be1b98a7f3d3.tar.gz cpython-42d1f63c54b8f5e3da04155c3369be1b98a7f3d3.tar.bz2 |
New == syntax; regs is no longer a method.
Diffstat (limited to 'Lib/regexp.py')
-rw-r--r-- | Lib/regexp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/regexp.py b/Lib/regexp.py index fc6fcad..2b8a5c0 100644 --- a/Lib/regexp.py +++ b/Lib/regexp.py @@ -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] |