mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
String method conversion.
This commit is contained in:
parent
dcd3a875a5
commit
e37340edf2
3 changed files with 4 additions and 8 deletions
|
@ -395,7 +395,7 @@ def maketrans(fromstr, tostr):
|
|||
fromstr = map(ord, fromstr)
|
||||
for i in range(len(fromstr)):
|
||||
L[fromstr[i]] = tostr[i]
|
||||
return joinfields(L, "")
|
||||
return join(L, "")
|
||||
|
||||
# Substring replacement (global)
|
||||
def replace(s, old, new, maxsplit=0):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue