From 325477e20eb6c2b813d06312d9b270706e186ec9 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 13 May 2011 06:54:23 +0200 Subject: [PATCH 1/2] Fix unbound local error in RE tokenizer example. Thanks to Herman L. Jackson. --- Doc/library/re.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/re.rst b/Doc/library/re.rst index 3e9cf026f07..cd3fbb6be0e 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): From 5166375045021dfb2944efee0f63d60b36dfdf58 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 13 May 2011 06:55:28 +0200 Subject: [PATCH 2/2] Use singular they. Thanks to Mark Summerfield. --- Doc/library/sys.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 006905262b1..ae2dbf3044a 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -814,7 +814,7 @@ always available. Python. The highest possible limit is platform-dependent. A user may need to set the - limit higher when she has a program that requires deep recursion and a platform + limit higher when they have a program that requires deep recursion and a platform that supports a higher limit. This should be done with care, because a too-high limit can lead to a crash.