Tony Nelson wrote: > But is there really no way to say this fast in pure Python? The way a > one-to-one byte mapping can be done with "".translate()?
Well, .translate isn't exactly pure Python. One-to-one between bytes and Unicode code points simply can't work. Just try all alternatives yourself and see if you can get any better than charmap_decode. Some would argue that charmap_decode *is* fast. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com