mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
#2650: Merge with 3.1.
This commit is contained in:
commit
213eb96902
2 changed files with 55 additions and 23 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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue