String method conversion.

This commit is contained in:
Eric S. Raymond 2001-02-09 16:56:44 +00:00
parent dcd3a875a5
commit e37340edf2
3 changed files with 4 additions and 8 deletions

View file

@ -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):