[ python-Feature Requests-1193128 ] 'str'.translate(None) => identity translation

SourceForge.net noreply at sourceforge.net
Sat Apr 30 22:31:09 CEST 2005


Feature Requests item #1193128, was opened at 2005-04-30 13:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1193128&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Bengt Richter (bokr)
Assigned to: Nobody/Anonymous (nobody)
Summary: 'str'.translate(None) => identity translation

Initial Comment:
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)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1193128&group_id=5470


More information about the Python-bugs-list mailing list