Array of Chars to String

Scott David Daniels Scott.Daniels at Acm.Org
Wed Apr 20 11:26:13 EDT 2005


Bengt Richter wrote:
> ... BTW, since str has .translate, why not .maketrans?
Probably because, while I can imagine u'whatever'.translate using a
256-wide table (and raising exceptions for other the rest), I have
more problems imagining the size of the table for a UCS-4 unicode
setup (32 bits per character).  I suppose it could be done, but a
naïve program might be in for a big shock about memory consumption.

--Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-list mailing list