H
Hallvard B Furuseth
I have a translation table from
tr = string.maketrans(...)
and want a table which produces the same characters lowercased.
`tr.lower()' works - at least with Python 2.3 - but is that will
that remain reliable? Or should I use something like this?
string.maketrans("".join(map(chr, xrange(256))),
"".join(map(chr, xrange(256))).translate(tr).lower())
BTW, is there a simpler way to write "".join(map(chr, xrange(256)))?
tr = string.maketrans(...)
and want a table which produces the same characters lowercased.
`tr.lower()' works - at least with Python 2.3 - but is that will
that remain reliable? Or should I use something like this?
string.maketrans("".join(map(chr, xrange(256))),
"".join(map(chr, xrange(256))).translate(tr).lower())
BTW, is there a simpler way to write "".join(map(chr, xrange(256)))?