Skip to content

Commit 596a2d3

Browse files
committed
_sre.py: resolve named group index for end call
1 parent 9e3c382 commit 596a2d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

graalpython/lib-graalpython/_sre.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def __init__(self, pattern, pos, endpos, result, input_str, compiled_regex, inde
186186
self.__indexgroup = indexgroup
187187

188188
def end(self, groupnum=0):
189-
return self.__result.getEnd(groupnum)
189+
idxarg = self.__groupidx(groupnum)
190+
return self.__result.getEnd(idxarg)
190191

191192
def group(self, *args):
192193
if not args:

0 commit comments

Comments
 (0)