classification
Title: 'str'.translate(None) => identity translation
Type: enhancement Stage:
Components: Interpreter Core Versions:
process
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 2007-04-12 04:13 by rhettinger. 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
translation
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.
History
Date User Action Args
2005-04-30 20:31:08bokrcreate