mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
New == syntax; regs is no longer a method.
This commit is contained in:
parent
d4e5a733b2
commit
42d1f63c54
1 changed files with 3 additions and 3 deletions
|
@ -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]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue