[Python-bugs-list] re should gripe about repeated group names (PR#16)

tim_one@email.msn.com tim_one@email.msn.com
Mon, 12 Jul 1999 21:06:55 -0400 (EDT)


Full_Name: Tim Peters
Version: 1.5.2
OS: Win95
Submission from: 1cust2.tnt1.bos1.da.uu.net (153.34.158.2)


>>> p = re.compile("(?P<a> a1) (?P<a> b2)")
>>> p.groupindex
{'a': 2}
>>>

re can't do anything sensible with a repeated group name, so it should complain
about it instead of silently redefining it.  Has come up a few times on c.l.py.