Filtering out non-readable characters
Raymond Hettinger
python at rcn.com
Sun Jul 17 21:32:28 EDT 2005
[George Sakkis]
> It's only obvious in the sense that _after_ you see this idiom, you can go back to the docs and
> realize it's not doing something special; OTOH if you haven't seen it, it's not at all the obvious
> solution to "how do I get the first 256 characters". So IMO it should be mentioned, given that
> string.translate often operates on the identity table. I think a single sentence is adequate for the
> reference docs.
For Py2.5, I've accepted a feature request to allow string.translate's
first argument to be None and then run as if an identity string had
been provided.
Raymond Hettinger
More information about the Python-list
mailing list