This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: 'str'.translate(None) => identity translation
Type: enhancement Stage:
Components: Interpreter Core Versions:
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: bokr, rhettinger
Priority: normal Keywords:

Created on 2005-04-30 20:31 by bokr, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg54516 - (view) Author: Bengt Richter (bokr) Date: 2005-04-30 20:31
This feature would permit passing None as the first
argument to str.translate in place of  an identity
table like ''.join([[chr(i) for i in xrange(256)])

This should be handy for deleting characters, e.g., as in

     s = s.translate(None, delchars)
msg54517 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2007-04-12 04:13
Done.  See revision 54772.
Date User Action Args
2022-04-11 14:56:11adminsetgithub: 41931
2005-04-30 20:31:08bokrcreate