mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
backed out of broken minimal repeat patch from July also fixed a couple of minor potential resource leaks in pattern_subx (Guido had already fixed the big one)
This commit is contained in:
parent
ed69aeedb9
commit
82b230732f
4 changed files with 22 additions and 24 deletions
|
@ -83,8 +83,8 @@ class Pattern:
|
|||
if name:
|
||||
ogid = self.groupdict.get(name, None)
|
||||
if ogid is not None:
|
||||
raise error, ("redefinition of group name %s as group %d; " +
|
||||
"was group %d") % (`name`, gid, ogid)
|
||||
raise error, ("redefinition of group name %s as group %d; "
|
||||
"was group %d" % (repr(name), gid, ogid))
|
||||
self.groupdict[name] = gid
|
||||
self.open.append(gid)
|
||||
return gid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue