diff options
Diffstat (limited to 'Lib/re.py')
-rw-r--r-- | Lib/re.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -207,8 +207,7 @@ def escape(pattern): "Escape all non-alphanumeric characters in pattern." s = list(pattern) alphanum = _alphanum - for i in range(len(pattern)): - c = pattern[i] + for i, c in enumerate(pattern): if c not in alphanum: if c == "\000": s[i] = "\\000" |