On 07.02.13 11:49, Peter Otten wrote:
ILLEGAL = "-:./?&="
try:
     TRANS = string.maketrans(ILLEGAL, "_" * len(ILLEGAL))
except AttributeError:
     # python 3
     TRANS = dict.fromkeys(map(ord, ILLEGAL), "_")

str.maketrans()


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to