*** sre_parse.py.orig Sat Apr 19 09:37:24 2003 --- sre_parse.py Sun Nov 2 07:28:49 2003 *************** *** 174,179 **** --- 174,183 ---- elif op in (ANY, RANGE, IN, LITERAL, NOT_LITERAL, CATEGORY): lo = lo + 1 hi = hi + 1 + elif op is GROUPREF: + hi = hi + 1 # arbitrary: force hi to be different than lo + # indicates GROUPREF has an unknown, potentially + # variable width elif op == SUCCESS: break self.width = int(min(lo, sys.maxint)), int(min(hi, sys.maxint)) *** test\test_re.py.orig Wed Jul 2 21:03:04 2003 --- test\test_re.py Sun Nov 2 07:06:14 2003 *************** *** 196,201 **** --- 196,202 ---- ('a', 'a')) self.assertEqual(re.match(r'^(?:(a)|c)(\1)?$', 'c').groups(), (None, None)) + self.assertRaises(re.error, re.compile, r'(?<=(...)\1)') def test_groupdict(self): self.assertEqual(re.match('(?Pfirst) (?Psecond)',