def maketrans(fromstr, tostr):
 if (len(fromstr) != len(tostr)):
  raise ValueError, 'maketrans arguments must have same length'
 global _idmapL
 if (not _idmapL):
  _idmapL = list(_idmap)
 L = _idmapL[:]
 fromstr = map(ord, fromstr)
 for i in range(len(fromstr)):
  L[fromstr[i]] = tostr[i]
 return ''.join(L)

def maketrans ( fromstr , tostr ) : if ( len ( fromstr ) != len ( tostr ) ) : raise ValueError , 'maketrans arguments must have same length' global _idmapL if ( not _idmapL ) : _idmapL = list ( _idmap ) L = _idmapL [ : ] fromstr = map ( ord , fromstr ) for i in range ( len ( fromstr ) ) : L [ fromstr [ i ] ] = tostr [ i ] return '' . join ( L )
maketrans -> string return a translation table suitable for use in string .