summaryrefslogtreecommitdiffstats
path: root/Doc/library/re.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/re.rst')
-rw-r--r--Doc/library/re.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/re.rst b/Doc/library/re.rst
index 3e9cf02..cd3fbb6 100644
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -1322,9 +1322,10 @@ successive matches::
line_start = pos
line += 1
elif typ != 'SKIP':
+ val = mo.group(typ)
if typ == 'ID' and val in keywords:
typ = val
- yield Token(typ, mo.group(typ), line, mo.start()-line_start)
+ yield Token(typ, val, line, mo.start()-line_start)
pos = mo.end()
mo = gettok(s, pos)
if pos != len(s):