equal
deleted
inserted
replaced
482 # made it explode, so we'll divide the pattern list in two |
482 # made it explode, so we'll divide the pattern list in two |
483 # until it works |
483 # until it works |
484 l = len(pats) |
484 l = len(pats) |
485 if l < 2: |
485 if l < 2: |
486 raise |
486 raise |
487 a, b = matchfn(pats[:l/2], tail), matchfn(pats[l/2:], tail) |
487 a, b = matchfn(pats[:l//2], tail), matchfn(pats[l//2:], tail) |
488 return lambda s: a(s) or b(s) |
488 return lambda s: a(s) or b(s) |
489 except re.error: |
489 except re.error: |
490 for k, p in pats: |
490 for k, p in pats: |
491 try: |
491 try: |
492 re.compile('(?:%s)' % regex(k, p, tail)) |
492 re.compile('(?:%s)' % regex(k, p, tail)) |