[Python-checkins] CVS: python/dist/src/Lib sre_parse.py,1.48,1.49

Fredrik Lundh effbot@users.sourceforge.net
Fri, 02 Nov 2001 05:59:53 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv14918/Lib

Modified Files:
	sre_parse.py 
Log Message:


SF bug #476912: flag repeated use of the same groupname as
the error it really is (and always has been)


Index: sre_parse.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_parse.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** sre_parse.py	2001/09/18 20:55:24	1.48
--- sre_parse.py	2001/11/02 13:59:51	1.49
***************
*** 82,85 ****
--- 82,87 ----
          self.groups = gid + 1
          if name:
+             if self.groupdict.has_key(name):
+                 raise error, "can only use each group name once"
              self.groupdict[name] = gid
          self.open.append(gid)
***************
*** 190,194 ****
                  c = self.string[self.index + 1]
              except IndexError:
!                 raise error, "bogus escape"
              char = char + c
          self.index = self.index + len(char)
--- 192,196 ----
                  c = self.string[self.index + 1]
              except IndexError:
!                 raise error, "bogus escape (end of line)"
              char = char + c
          self.index = self.index + len(char)