diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-03-25 14:25:36 +0200 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-03-25 14:25:36 +0200 |
commit | 213eb96902387dd1f5af0f5f1b80f3d227fd0186 (patch) | |
tree | 21440775038c38ab46b423af0f7ea6ff1bcac18b /Lib/re.py | |
parent | 32a95a70c919be46f1fa65e0b4d98368cda768e6 (diff) | |
parent | ebbf1e67a8c56a79ee62280d32517e77b103bf8e (diff) | |
download | cpython-git-213eb96902387dd1f5af0f5f1b80f3d227fd0186.tar.gz |
#2650: Merge with 3.1.
Diffstat (limited to 'Lib/re.py')
-rw-r--r-- | Lib/re.py | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -224,8 +224,7 @@ def escape(pattern): if isinstance(pattern, str): alphanum = _alphanum_str s = list(pattern) - 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" |